1.0.0 • Published 3 years ago

obj-string v1.0.0

Weekly downloads
53
License
MIT
Repository
github
Last release
3 years ago

Usage

See all valid object properties and limitations here

import { stringifyObject } from 'obj-string'

let str = stringifyObject({
  data: {
    list: [0,2,4,6,8],
    nested: {
      value: 4
    }
  },
  method(param){
    console.log(param)
  }
})

console.log(str)

/*
{
  "data":{
    "list":[0,2,4,6,8],
    "nested":{
      "value":4
    }
  },
  "method": function (param){
    console.log(param)
  }
}
*/

References

Code heavily inspired by stringified-handler


License

MIT © Marshall Brandt