[Pkg-javascript-commits] [node-entities] 09/63: Replaced fs.readFileSync with require().
Wolfgang Borgert
debacle at moszumanska.debian.org
Mon Sep 22 08:15:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository node-entities.
commit f4a5ce290b2f1a814ca5bb2bfa2f6595e481be2e
Author: James Davidson <jsdavo at gmail.com>
Date: Sun Jan 20 19:29:43 2013 +0800
Replaced fs.readFileSync with require().
---
index.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index e1bad38..c175220 100644
--- a/index.js
+++ b/index.js
@@ -10,9 +10,8 @@ var re_hex = /&#x[\da-f]+;?/gi,
strictHex_func = function(num){return fromCharCode(parseInt(num.slice(3, -1), 16));},
charCode_func = function(c){ return "&#" +c.charCodeAt(0) +";";};
-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");
if(inherits) for(var name in inherits) obj[name] = inherits[name];
@@ -77,4 +76,4 @@ modes.forEach(function(name){
.replace(reverse_re, reverse_func)
.replace(re_notUTF8, charCode_func);
};
-});
\ No newline at end of file
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-entities.git
More information about the Pkg-javascript-commits
mailing list