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

lossless-json

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lossless-json - npm Package Versions

13

2.0.7

Diff

Changelog

Source

2.0.7 (2023-03-06)

Bug Fixes

  • do to throw a duplicate key error when the values are equal (452f385)
josdejong
published 2.0.6 •

Changelog

Source

2.0.6 (2023-02-15)

  • Fix: empty objects and arrays being formatted with indentation inside.
josdejong
published 2.0.5 •

Changelog

Source

2.0.5 (2023-01-06)

  • Fix: error handling unicode characters containing a 9.
josdejong
published 2.0.4 •

Changelog

Source

2.0.4 (2022-12-19)

  • Improved performance.
josdejong
published 2.0.3 •

Changelog

Source

2.0.3 (2022-12-01)

  • Fix: parse not throwing an exception on illegal characters inside a string, like an unescaped new line.
josdejong
published 2.0.2 •

Changelog

Source

2.0.2 (2022-11-17)

  • Fix: parse throwing a duplicate key error when using built-in property name like toString as key.
josdejong
published 2.0.1 •

Changelog

Source

2.0.1 (2022-10-03)

  • Fix: configure exports in package.json to fix problems with Jest (#243). Thanks @akphi.
josdejong
published 2.0.0 •

Changelog

Source

2.0.0 (2022-09-28)

IMPORTANT: BREAKING CHANGES

Breaking changes:

  • Function parse now throws an error when a duplicate key is encountered.
  • Dropped support for circular references. If you encounter circular references in your data structures, please rethink your datastructures: better prevent circular references in the first place.
  • The constructor of the LosslessNumber class now only supports a string as argument. Use toLosslessNumber to convert a number into a LosslessNumber in a safe way.
  • Dropped the undocumented property .type on LosslessNumber instances. Please use .isLosslessNumber instead.
  • Dropped official support for Node.js 12.

Non-breaking changes:

  • Serialization of numeric values is now fully customizable via new options parseNumber and numberStringifiers, making it easier to integrate with a BigNumber library, or to write your own logic to turn numeric values into bigint when needed.
  • Built in support for bigint.
  • Built-in support for Date (turned off by default), see reviveDate.
  • Export a set of utility functions: isInteger, isNumber, isSafeNumber, toSafeNumberOrThrow, getUnsafeNumberReason, parseLosslessNumber, parseNumberAndBigInt, reviveDate, isLosslessNumber, toLosslessNumber.
  • THe library is modular now: it exports ES modules and an UMD bundle. The ES modules allow to import only the functions that you need, instead of pulling in the full bundle.
  • The library now comes with TypeScript definitions, and the code has been rewritten in TypeScript,
  • Performance of both parse and stringify has been improved a lot.
josdejong
published 1.0.5 •

Changelog

Source

1.0.5 (2021-07-22)

  • Fixed stringifing of object keys containing special characters like backslash, see #239. Thanks @mengfanliao.
josdejong
published 1.0.4 •

Changelog

Source

1.0.4 (2020-05-08)

  • Fix #117: remove unnecessary configuration files from npm package.
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