New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cmd-deps

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmd-deps - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

2

package.json
{
"name": "cmd-deps",
"version": "2.2.2",
"version": "2.2.3",
"description": "Transform cmd and get cmd dependences",

@@ -5,0 +5,0 @@ "author": {

# cmd-deps
>Transform cmd and get cmd dependences
> Transform cmd and get cmd dependences
>
>[![NPM Version][npm-image]][npm-url]
>[![Download Status][download-image]][npm-url]
>[![Linux Status][travis-image]][travis-url]
>[![Windows Status][appveyor-image]][appveyor-url]
>[![Test Coverage][coveralls-image]][coveralls-url]
>[![Dependencies][david-image]][david-url]
> [![NPM Version][npm-image]][npm-url]
> [![Download Status][download-image]][npm-url]
> [![Linux Status][travis-image]][travis-url]
> [![Windows Status][appveyor-image]][appveyor-url]
> [![Test Coverage][coveralls-image]][coveralls-url]
> [![Dependencies][david-image]][david-url]
### Installation
```

@@ -18,9 +19,12 @@ npm install cmd-deps

### Api
* parseDependencies(code:String, replace:Function, flags:Boolean|Array):String
* parseDependencies(code:String, flags:Boolean|Array):Array
* flags means if use "require.async" like, the result should have a property "flag" of "async"
* if flags is boolean, it will be trasform to an array inside, ```true -> ['async']``` and ```false -> []```
* if flags is boolean, it will be trasform to an array inside, `true -> ['async']` and `false -> []`
### Example
source:
```js

@@ -30,5 +34,6 @@ require('a');

/require('c')/;
'require("d")';
if(true)/require('e')/;
do /require('f')/.test(s); while(false);
('require("d")');
if (true) /require('e')/;
do /require('f')/.test(s);
while (false);
require.async('g');

@@ -39,2 +44,3 @@ require.async(['h']);

js:
```js

@@ -49,17 +55,18 @@ var parseDependencies = require('cmd-deps');

parser output:
```js
[
{
"flag": null,
"path": "a"
flag: null,
path: 'a'
},
{
"flag": 'async',
"path": "g"
flag: 'async',
path: 'g'
},
{
"flag": 'async',
"path": "h"
flag: 'async',
path: 'h'
}
]
];
```

@@ -66,0 +73,0 @@

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