1.0.0 • Published 12 years ago

bloodhound v1.0.0

Weekly downloads
36
License
-
Repository
github
Last release
12 years ago

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)
1.0.0

12 years ago