searequire
Get require() like node-detective by lexical analysis
Last updated 10 years ago by army8735 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install searequire 
SYNC missed versions from official npm registry.

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
}

Current Tags

  • 1.5.3                                ...           latest (10 years ago)

11 Versions

  • 1.5.3                                ...           10 years ago
  • 1.5.2                                ...           10 years ago
  • 1.5.1                                ...           10 years ago
  • 1.5.0                                ...           10 years ago
  • 1.4.2                                ...           10 years ago
  • 1.4.0                                ...           10 years ago
  • 1.3.0                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (9)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |