No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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"); 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"); require(str)', true)