Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

require-from-string

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Issues
File Explorer

Advanced tools

require-from-string

Require module from string

    2.0.2latest
    Github

Version published
Maintainers
1
Weekly downloads
22,706,971
increased by0.75%

Weekly downloads

Readme

Source

require-from-string Build Status

Load module from string in Node.

Install

$ npm install --save require-from-string

Usage

var requireFromString = require('require-from-string'); requireFromString('module.exports = 1'); //=> 1

API

requireFromString(code, [filename], [options])

code

Required
Type: string

Module code.

filename

Type: string
Default: ''

Optional filename.

options

Type: object

appendPaths

Type: Array

List of paths, that will be appended to module paths. Useful, when you want to be able require modules from these paths.

prependPaths

Type: Array

Same as appendPaths, but paths will be prepended.

License

MIT © Vsevolod Strukchinsky

FAQs

What is require-from-string?

Require module from string

Is require-from-string popular?

The npm package require-from-string receives a total of 18,501,859 weekly downloads. As such, require-from-string popularity was classified as popular.

Is require-from-string well maintained?

We found that require-from-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 09 Apr 2018

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc