buffer-codec
Advanced tools
Comparing version 1.2.0 to 1.3.0
{ | ||
"name": "buffer-codec", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "add the codec ability to abstract-nosql database.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/snowyu/node-buffer-codec", |
@@ -39,2 +39,3 @@ # AbstractCodec | ||
* isBuffer(): it's true if have a interal buffer. | ||
* byteLength(value): return the byte length of the value. | ||
@@ -87,2 +88,4 @@ | ||
_decodeString: (data)->data | ||
byteLength: (data)-> | ||
if data? then data.length || String(data).length else 0 | ||
@@ -95,2 +98,3 @@ class JsonCodec | ||
_decodeString: JSON.parse | ||
byteLength: (data)->@_encodeString(data).length | ||
@@ -131,2 +135,3 @@ | ||
* Json Codec: encode via JSON.stringify(.toJSON), decode via JSON.parse | ||
* Hex Codec: hex string to Binary. | ||
* Binary Codec: | ||
@@ -133,0 +138,0 @@ * encodeBuffer: encode string or array to a buffer. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55379
144