kindled-utils
Advanced tools
Comparing version 1.0.5 to 1.0.6
10
index.js
const fs = require('fs-extra') | ||
const { writeFile } = require('fs-extra'); | ||
exports.getUUID = function(length) { | ||
@@ -42,1 +43,10 @@ var result = ''; | ||
} | ||
exports.toJSONFile = function(path, object){ | ||
let data = JSON.stringify(object); | ||
writeFile(path, data, (err) => { | ||
if (err) throw err; | ||
console.log(`\n[UTILS] Object writted to ${path}`); | ||
}); | ||
} | ||
{ | ||
"name": "kindled-utils", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A few functions all in one module.", | ||
@@ -10,3 +10,11 @@ "main": "index.js", | ||
"author": "Kindled", | ||
"license": "ISC" | ||
"license": "ISC", | ||
"keywords": [ | ||
"utils", | ||
"uuid", | ||
"time", | ||
"date", | ||
"fs", | ||
"replace" | ||
] | ||
} |
@@ -11,5 +11,5 @@ # Kindled Utils | ||
**Update v1.3** | ||
Fixed up time() and made date() it's own thing | ||
**Update v1.6** | ||
Added toJSONFile(path, object) - writes JS object to JSON | ||
2126
44
3