Descriptions
This package is used to add time prefix and write file
Install
npm install fs-time-prefix
Usage
Sample Code
var fsp = require('../index');
var testData = {
name : "lulala",
nickname : "poka"
};
fsp.writeTimePrefix('./test123.json', testData);
fsp.writeJsonFile('./test123.json', testData);
Sample Result
There's a file named 20151219_231425_YourUserName_wahaha.json appears in '../data/' directory.
Details
- If you input JSON object, we'll stringify for you, so don't worry. (If you use timeprefix function)
- This is a extension package of
fs-promise
, most original functions are not JSON processed.