Irina Glushko 2389e7160b HW1 done | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
.. | ||
index.js | %!s(int64=3) %!d(string=hai) anos | |
license | %!s(int64=3) %!d(string=hai) anos | |
package.json | %!s(int64=3) %!d(string=hai) anos | |
readme.md | %!s(int64=3) %!d(string=hai) anos |
Load module from string in Node.
$ npm install --save require-from-string
var requireFromString = require('require-from-string');
requireFromString('module.exports = 1');
//=> 1
Required
Type: string
Module code.
Type: string
Default: ''
Optional filename.
Type: object
Type: Array
List of paths
, that will be appended to module paths
. Useful, when you want
to be able require modules from these paths.
Type: Array
Same as appendPaths
, but paths will be prepended.
MIT © Vsevolod Strukchinsky