- Fixed an issue with
types
in theexports
ofpackage.json
that introduced in version0.6.2
- Added
spaceBytes
field tostringifyInfo()
result, which indicates the number of bytes used for white spaces. This allows for estimating size ofJSON.stringify()
result with and without formatting (whenspace
option is used) in a single pass instead of two - Fixed
stringifyInfo()
to correctly accept thespace
parameter from options, i.e.stringifyInfo(data, { space: 2 })
- Enhanced the performance of
stringifyChunked()
by 1.5-3x - Enhanced the performance of
stringifyInfo()
by 1.5-5x - Fixed
parseFromWebStream()
to ensure that the lock on the reader is properly released
- Added
stringifyChunked()
as a generator function (as a replacer forstringifyStream()
) - Added
createStringifyWebStream()
function - Added
parseFromWebStream()
function - Changed
parseChunked()
to accept an iterable or async iterable that iterates over string, Buffer, or TypedArray elements - Removed
stringifyStream()
, useReadable.from(stringifyChunked())
instead - Fixed conformance
stringifyChunked()
withJSON.stringify()
when replacer a list of keys and a key refer to an entry in a prototype chain stringifyInfo()
:- Aligned API with
stringifyChunked
by acceptingoptions
as the second parameter. Now supports:stringifyInfo(value, replacer?, space?)
stringifyInfo(value, options?)
- Renamed
minLength
field intobytes
in functions result - Removed the
async
option - The function result no longer contains the
async
andduplicate
fields - Fixed conformance with
JSON.stringify()
when replacer a list of keys and a key refer to an entry in a prototype chain
- Aligned API with
- Discontinued exposing the
version
attribute - Converted to Dual Package, i.e. ESM and CommonJS support
- Fixed adding entire
package.json
content to a bundle when target is a browser
- Fixed
stringifyStream()
hang when last element in a stream takes a long time to process (#9, @kbrownlees)
- Added missed TypeScript typings file into the npm package
- Added TypeScript typings (#7, @lexich)
- Fixed
stringifyStream()
andstringifyInfo()
to work properly when replacer is an allowlist parseChunked()
- Fixed wrong parse error when chunks are splitted on a whitespace inside an object or array (#6, @alexei-vedder)
- Fixed corner cases when wrong placed or missed comma doesn't cause to parsing failure
- Fixed
RangeError: Maximum call stack size exceeded
inparseChunked()
on very long arrays (corner case)
- Fixed
parseChunked()
crash when input has trailing whitespaces (#4, @smelukov)
- Added support for Node.js 10
- Added
parseChunked()
method - Fixed
stringifyInfo()
to not throw when meet unknown value type
- Added missed file for build purposes
- Changed build setup to allow building by any bundler that supports
browser
property inpackage.json
- Exposed version
- Renamed
info()
method intostringifyInfo()
- Fixed lib's distribution setup
- Added
dist
version to package (dist/json-ext.js
anddist/json-ext.min.js
)
- Fixed main entry point
- Initial release