entities
Advanced tools
Comparing version 0.1.1 to 0.2.0
19
index.js
@@ -13,5 +13,4 @@ var re_hex = /&#x[\da-f]+;?/gi, | ||
var readFile = require("fs").readFileSync; | ||
var fetch = function(filename, inherits){ | ||
var obj = JSON.parse(readFile(__dirname +"/entities/" +filename +".json", "utf8")); | ||
var obj = require("./entities/" +filename +".json"); | ||
@@ -65,10 +64,8 @@ if(inherits) for(var name in inherits) obj[name] = inherits[name]; | ||
if(!module.exports["decode" +name]){ | ||
module.exports["decode" +name] = function(data){ | ||
return data | ||
.replace(regex, func) | ||
.replace(re_hex, hex_func) | ||
.replace(re_charCode, num_func); | ||
}; | ||
} | ||
module.exports["decode" +name] = function(data){ | ||
return data | ||
.replace(regex, func) | ||
.replace(re_hex, hex_func) | ||
.replace(re_charCode, num_func); | ||
}; | ||
@@ -84,2 +81,2 @@ var reverse = getReverse(obj.obj), | ||
}; | ||
}); | ||
}); |
{ | ||
"name": "entities", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Encode & decode XML/HTML entities with ease", | ||
@@ -11,3 +11,4 @@ "author": "Felix Boehm <me@feedic.com>", | ||
, "url": "git://github.com/fb55/node-entities.git" | ||
} | ||
} | ||
}, | ||
"license": "BSD-like" | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
49431
8
0
83