Socket
Book a DemoInstallSign in
Socket

remove-require

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remove-require

Remove requires and replace them with something else of the same length

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

remove-require

Remove requires and replace them with something else of the same length.

It is clever enough to detect if _dereq_ is already taken, and always choose a token that is unused. It also changes any parameter names, variable declarations etc. to match. It will change the variable even if it appears to be global, this saves it from having to do scope analysis.

Build Status Dependency Status NPM version

Installation

npm install remove-require

Usage

var removeRequire = require('remove-require');

var result = removeRequire('var x = require("foo");');
// => {src: 'var x = _dereq_("foo");', name: '_dereq_'}

License

MIT

FAQs

Package last updated on 05 Apr 2015

Did you know?

Socket

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