1.0.0 • Published 9 years ago

json-size v1.0.0

Weekly downloads
4,223
License
MIT
Repository
github
Last release
9 years ago

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