Socket
Book a DemoInstallSign in
Socket

searequire

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

searequire

Get require() like node-detective by lexical analysis

1.5.3
latest
Source
npmnpm
Version published
Weekly downloads
124
90.77%
Maintainers
2
Weekly downloads
 
Created
Source

Get require() like node-requires by lexical analysis

NPM version Build Status

Installation

npm install searequire

Api

  • parseDependencies(code:String, callback:Function = null, flag:Boolean = false):String
  • parseDependencies(code:String, flag:Boolean = false):String
    • flag means if use "require.async" like, the result should have a property "flag" of ".async"

Example

js:

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

parser output:

{
  "string": "require('a')",
  "path": "a",
  "index": 0,
  "flag": null
}

Keywords

require

FAQs

Package last updated on 22 Sep 2014

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.