1.0.0 • Published 9 years ago
strify v1.0.0
strify
short cut for fs.readFileSync(__dirname + '/path/file.txt', 'utf-8')
install
npm install --save strify
use
it's just a tiny helper function:
strify('/path/file.txt');
that is equal to:
fs.readFileSync(__dirname + '/path/file.txt', 'utf-8')
example
var strify = require('strify');
var tmpl = strify('./views/login.ejs');
// tmpl holds the read file as a string.
license
MIT
1.0.0
9 years ago