Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

derequire

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derequire - npm Package Compare versions

Comparing version 2.0.3 to 2.0.5

license.md

2

package.json
{
"name": "derequire",
"version": "2.0.3",
"version": "2.0.5",
"description": "remove requires",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,2 +8,6 @@ derequire [![Build Status](https://travis-ci.org/calvinmetcalf/derequire.svg)](https://travis-ci.org/calvinmetcalf/derequire)

`derequire` can be used either as a JavaScript API or as a CLI.
### JavaScript API
```javascript

@@ -32,1 +36,13 @@ var derequire = require('derequire');

__Note:__ In order to avoid quite a few headaches the token you're changing from and the token you're changing to need to be the same length.
### Command-line API
There's a CLI that accepts a file path as an argument (absolute or relative to CWD) or reads from `stdin` if file path is `-` or omitted, and accepts `-f|--from` and `-t|--to` options that correspond to the API `tokenFrom` and `tokenTo` options. Examples:
```bash
derequire input.js > output.js
derequire < input.js > output.js
browserify input.js | derequire > output.js
browserify input.js | derequire - > output.js
derequire input.js --from require --to _gonzo_ > output.js
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc