No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.travis.yml
Readme.md
index.js
package.json

Readme.md

Build Status

Get the require(name) calls from a string of code. Really all of them. Well, at least the direct ones where the thing in front of the call is the name node require.

// 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 like this (they actually have other properties, too):
// [{type: "string", value: "foo"}, {type: "string", value: "bar"}, {type: "name", value: "str"}]
require('bloodhound')('require("foo"); require("bar").foo.bar()()().z; require(str)', true)