Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buffer-codec

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-codec - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc