bloodhound

1.0.0 • Public • Published

Build Status

Get the require(name) calls from a string of code. Really all of them.

// returns ["foo", "bar"], no `str` because it's not a string!
require('bloodhound')('require("foo"); require("bar").foo.bar()()().z; require(str)')

// returns an array of three nodes:
// [{type: "string", value: "foo"}, {type: "string", value: "bar"}, {type: "name", value: "str"}]
require('bloodhound')('require("foo"); require("bar").foo.bar()()().z; require(str)', true)

Readme

Keywords

none

Package Sidebar

Install

npm i bloodhound

Weekly Downloads

74

Version

1.0.0

License

none

Last publish

Collaborators

  • thejh