0.10.3 • Published 3 years ago

jsbindat v0.10.3

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

JS Binary Data

Binary data serializer and unserializer for Node.js.

Beta.

Serialize and unserialize any Javascript data.

Supports:

  • All Javascript basic types: undefined, null, boolean, number, string, array and object
  • ES6 Set and Map
  • Relational data & circular references: no object duplication, the output structure is the same than the input was
  • Prototype chain is supported (require the 'prototypeChain' serializer option)
  • Instance of non-trivial object are supported, if a map of names to prototype/constructor is provided (require the 'classMap' option to be set to a common object/map on both the serializer and unserializer)

Serializing to a file example

var stream = fs.createWriteStream( 'path/to/my/file.jsdat' ) ;
await jsbindat.serialize( stream , data ) ;

... or just:

await jsbindat.writeFile( 'path/to/my/file.jsdat' , data ) ;

Unserializing from a file example

var stream = fs.createReadStream( 'path/to/my/file.jsdat' ) ;
var data = await jsbindat.unserialize( stream ) ;
stream.close() ;
// Do something with the data

... or just:

var data = jsbindat.readFile( 'path/to/my/file.jsdat' ) ;

Non-trivial object

TODO: documentation

0.10.2

3 years ago

0.10.3

3 years ago

0.10.1

4 years ago

0.10.0

5 years ago

0.9.10

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago