This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/default-require-extensions
2020-11-01 22:46:04 +00:00
..
node_modules/strip-bom Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
js.js Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
json.js Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
license Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
package.json Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
readme.md Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00

default-require-extensions Build Status

Nodes default require extensions as a separate module

Handy for require extension authors that want reliable access to the default extension implementations.

By the time your extension is loaded, the default extension may have already been replaced. This provides extensions functionally identical to the default ones, which you know you can access reliably, no matter what extensions have been installed previously.

Install

$ npm install default-require-extensions

Usage

const js = require('default-require-extensions/js');
const json = require('default-require-extensions/json');

require.extensions['.js'] = js;
require.extensions['.js'] = json;

Note: You would never actually do the above. Use these in your custom require extensions instead.