Comparing version 0.4.2 to 0.4.3
{ | ||
"name": "jsonesc", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Json Escape", | ||
@@ -21,3 +21,3 @@ "repository": { | ||
"base64-js": "^1.3.0", | ||
"bson": "^1.0.9", | ||
"bson": "^4.0.1", | ||
"chai": "^4.1.2", | ||
@@ -27,5 +27,5 @@ "cross-env": "^5.1.6", | ||
"msgpack-lite": "^0.1.26", | ||
"ts-node": "^5.0.1", | ||
"ts-node": "^8.0.2", | ||
"tslint": "^5.9.1", | ||
"typescript": "^2.8.3" | ||
"typescript": "^3.3.3" | ||
}, | ||
@@ -32,0 +32,0 @@ "scripts": { |
# Json Escape | ||
<a href='https://travis-ci.org/ticlo/jsonesc'><img src="https://travis-ci.org/ticlo/jsonesc.svg?branch=master" title="travis-ci"></a> | ||
Json Escape use escape character in string to store types that normally not allowed in JSON | ||
@@ -25,3 +29,3 @@ | ||
"\u001bBin:wFg{A", | ||
"\u001b?" | ||
"\u001b" | ||
] | ||
@@ -28,0 +32,0 @@ ``` |
@@ -47,2 +47,4 @@ import JsonEsc from '../dist/index'; | ||
assert.equal(JsonEsc.stringify(undefined), undefinedStr, 'encode undefined'); | ||
assert.equal(JsonEsc.stringify({a:undefined}), `{"a":${undefinedStr}}`, 'encode undefined in object'); | ||
assert.equal(JsonEsc.parse('"\\u001b"'), undefined, 'undefined'); | ||
@@ -49,0 +51,0 @@ assert.equal(JsonEsc.parse('"\\u001b?"'), undefined, 'invalid escape'); |
Sorry, the diff of this file is not supported yet
82103
26
1275
103