Comparing version 0.0.2 to 0.1.0
10
mine.js
@@ -7,3 +7,3 @@ "use strict"; | ||
function mine(js) { | ||
js = String(js); | ||
js = "" + js; | ||
var names = []; | ||
@@ -16,3 +16,3 @@ var state = 0; | ||
var isIdent = /[a-z0-9_.]/i; | ||
var isIdent = /[a-z0-9_.$]/i; | ||
var isWhitespace = /[ \r\n\t]/; | ||
@@ -43,3 +43,3 @@ | ||
return $call; | ||
}else{ | ||
} else { | ||
if (isWhitespace.test(char)){ | ||
@@ -107,3 +107,3 @@ if (ident !== 'yield' && ident !== 'return'){ | ||
function $escape(char) { | ||
function $escape() { | ||
return $string; | ||
@@ -134,3 +134,3 @@ } | ||
var state = $start; | ||
state = $start; | ||
for (var i = 0, l = js.length; i < l; i++) { | ||
@@ -137,0 +137,0 @@ state = state(js[i]); |
{ | ||
"name": "mine", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "Digs into a javascript file looking for require calls. Used to statically extract common js dependencies.", | ||
"main": "mine.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
@@ -10,0 +7,0 @@ "type": "git", |
mine.js | ||
======= | ||
The mine script accepts js source and returns all the require call locations as well as the target string. This is a submodule of [js-linker](https://github.com/creationix/js-linker). | ||
The mine script accepts js source and returns all the require call locations as well as the target string. This is a submodule of [js-linker](https://github.com/creationix/js-linker) and [my-filters](https://github.com/creationix/my-filters). | ||
@@ -11,2 +11,2 @@ ``` js | ||
var deps = mine(code); | ||
``` | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12
7911
23