json-size

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    14,088
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    14,088

Package Sidebar

Install

npm i json-size

Weekly Downloads

14,088

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bendrucker