CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
1# require-from-string [![Build Status](https://travis-ci.org/floatdrop/require-from-string.svg?branch=master)](https://travis-ci.org/floatdrop/require-from-string)2 3Load module from string in Node.4 5## Install6 7```8$ npm install --save require-from-string9```10 11 12## Usage13 14```js15var requireFromString = require('require-from-string');16 17requireFromString('module.exports = 1');18//=> 119```20 21 22## API23 24### requireFromString(code, [filename], [options])25 26#### code27 28*Required*  29Type: `string`30 31Module code.32 33#### filename34Type: `string`  35Default: `''`36 37Optional filename.38 39 40#### options41Type: `object`42 43##### appendPaths44Type: `Array`45 46List of `paths`, that will be appended to module `paths`. Useful, when you want47to be able require modules from these paths.48 49##### prependPaths50Type: `Array`51 52Same as `appendPaths`, but paths will be prepended.53 54## License55 56MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)57