JSPM

json-size

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13152
  • Score
    100M100P100Q128951F
  • License MIT

Find the size (bytes) of a serialized object

Package Exports

  • json-size

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-size) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

json-size Build Status

Find the size (bytes) of a serialized object

Install

$ npm install --save json-size

Usage

var jsonSize = require('json-size')

jsonSize({foo: 'bar'})
//=> 13

API

jsonSize(value) -> number

Returns the number of bytes of the resulting JSON.

value

Required
Type: any

A value to stringify.

License

MIT © Ben Drucker