2.1.1 • Published 7 years ago

qb-json-tok-writer v2.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

qb-json-tok-writer

npm downloads bitHound Dependencies dev dependencies code analysis

Quick JSON writer for transforming tokenized output from qb-json-tok back into JSON/UTF-8 output.

Complies with the 100% test coverage and minimum dependency requirements of qb-standard .

Install

npm install qb-json-tok-writer

API 1.x -> 2.x update

qb-json-tok-writer 2.1.0 works with the updated qb-json-tok 2.1.0 output. (versioning was kept in sync for clarity).

Example

var utf8 = require( 'qb-utf8-ez' );               // for transforming to/from UTF-8
var tokenize = require( 'qb-json-tok' );          
var writer = require( 'qb-json-tok-writer' );

var w = writer();
var dst = [];
var di = 0;
tokenize(
    utf8.buffer( '{ "a":1, "b": [1,2,3], "c": true, "d": null }' ),
    function() {
        di = w.write( arguments, dst, di );
    }
)
console.log( utf8.string( dst ) );

> {"a":1,"b":[1,2,3],"c":true,"d":null}
2.1.1

7 years ago

2.1.0

7 years ago

3.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago