destr

🚀 Faster, secure and convenient alternative for JSON.parse for arbitrary inputs

MIT License

Downloads
8.2M
Stars
1.1K
Committers
16

Bot releases are visible (Hide)

destr - v2.0.3 Latest Release

Published by pi0 8 months ago

compare changes

🩹 Fixes

  • Improve compatibility with runtimes not supporting String.prototype.at() (#102)

🏡 Chore

❤️ Contributors

destr - v2.0.2

Published by pi0 12 months ago

compare changes

🩹 Fixes

  • Parsing decimals and scientific notation (#94)
  • Avoid fast path with possible escape chars (#89)

❤️ Contributors

  • Pooya Parsa (@pi0)
  • Kricsleo
  • Nobkd
  • Alexander Lichter (@manniL)
destr - v2.0.1

Published by pi0 about 1 year ago

compare changes

🔥 Performance

📖 Documentation

  • Correct safeDestr example usage and tests (#75)

🏡 Chore

🎨 Styles

❤️ Contributors

destr - v2.0.0

Published by pi0 over 1 year ago

compare changes

⭐ What is new

  • Destr is now typesafe by default
  • Supporting newly named export safeDestr to throw errors instead of silently ignoring them
  • Faster string handling with fast path
  • [Check The Docs]

Breaking Changes

  • Support generic type with unkown default (#68)
  • Use named destr export (#69)
-- import destr from 'destr'
++ import { destr } from 'destr'

-- const destr = require('destr')
++ const { destr } = require('destr')

🚀 Enhancements

  • ⚠️ Support generic type with unkown default (#68)
  • Show warning when dropping unsafe keys (#57)
  • Support minus infinity (#67)
  • Support safeDestr (#70)
  • Parse double-quoted string with fast path (#71)

🔥 Performance

  • Move common check earlier (5be5732)

💅 Refactors

  • ⚠️ Use named destr export (#69)

❤️ Contributors