Comparing version 1.0.18 to 1.0.19
{ | ||
"name": "kscryp", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"description": "Cryptography package with support for: JWT, RSA, MD5, SHA, Base64, HEX, JSON, Basic", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,3 +38,3 @@ const KsDriver = require("../KsDriver"); | ||
.replace(/\][\s|'|"]+/g, ']') | ||
.replace(/\][\s|,]+\]/g, ']]') | ||
@@ -49,3 +49,3 @@ .replace(/\}[\s|,]+\]/g, '}]') | ||
.replace(/false[\s|,]+\]/g, 'false]') | ||
; | ||
; | ||
} | ||
@@ -58,3 +58,5 @@ | ||
options.clean && (value = this.#clean(value)); | ||
return this.respond(value, null, options) ?? JSON.stringify(value, this.#check()); | ||
let replacer = options.replacer instanceof Function ? options.replacer : this.#check(); | ||
let space = options.space; | ||
return this.respond(value, null, options) ?? JSON.stringify(value, replacer, space); | ||
} | ||
@@ -61,0 +63,0 @@ catch (error) { |
91000
1729