https://github.com/serapath/fnjson
stringify objects containing functions
https://github.com/serapath/fnjson
Last synced: about 1 year ago
JSON representation
stringify objects containing functions
- Host: GitHub
- URL: https://github.com/serapath/fnjson
- Owner: serapath
- License: mit
- Created: 2016-02-17T18:00:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T20:31:26.000Z (over 10 years ago)
- Last Synced: 2025-04-02T23:45:24.827Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fnjson
stringify objects containing functions
## example
```js
var fnjson = require('fnjson')
var stringify = fnjson.stringify
var parse = fnjson.parse
var clone = fnjson.clone
console.log(JSON.parse(stringify({
a: function () { return 5 }
})))
//// or to e.g. minimize browserify bundle size
var parse = require('fnjson/source/node_modules/_parse')
var clone = require('fnjson/source/node_modules/_clone')
var stringify = require('fnjson/source/node_modules/_stringify')
```