Socket
Socket
Sign inDemoInstall

require-from-string

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-from-string

Require module from string


Version published
Maintainers
1
Weekly downloads
26,224,565
decreased by-8.22%

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])

code

Required
Type: string

Module code.

filename

Type: string

Optional filename.

License

MIT © Vsevolod Strukchinsky

FAQs

Last updated on 18 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc