good-sort-json
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -1,3 +0,5 @@ | ||
module.exports = function (jsobject) { | ||
return JSON.stringify(sort(jsobject), null, 2); | ||
module.exports = function (jsobject, options) { | ||
if (!options) options = {}; | ||
const spaces = options.spaces || 2; | ||
return JSON.stringify(sort(jsobject), null, spaces); | ||
}; | ||
@@ -4,0 +6,0 @@ |
{ | ||
"name": "good-sort-json", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Sort json the good way", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3190
39