Socket
Socket
Sign inDemoInstall

mine

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mine - npm Package Compare versions

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);
```
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc