https://github.com/imcuttle/function-json
Make function to be serializable
https://github.com/imcuttle/function-json
Last synced: 12 months ago
JSON representation
Make function to be serializable
- Host: GitHub
- URL: https://github.com/imcuttle/function-json
- Owner: imcuttle
- License: mit
- Created: 2019-05-13T13:27:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-07T14:01:31.000Z (over 4 years ago)
- Last Synced: 2025-06-02T21:08:54.717Z (about 1 year ago)
- Language: JavaScript
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
# function-json
[](https://travis-ci.org/imcuttle/function-json)
[](https://codecov.io/github/imcuttle/function-json?branch=master)
[](https://www.npmjs.com/package/function-json)
[](https://www.npmjs.com/package/function-json)
[](https://prettier.io/)
[](https://conventionalcommits.org)
> Make function to be serializable
## Installation
```bash
npm install function-json
# or use yarn
yarn add function-json
```
## Usage
```javascript
const { stringify, parse } = require('function-json')
parse(stringify((a, b) => a + b))(1, 23) === 24
parse(
stringify({
fn: (a, b) => a + b
})
).fn(1, 23) === 24
```
## Contributing
- Fork it!
- Create your new branch:
`git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:
`git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)
## Authors
This library is written and maintained by imcuttle, moyuyc95@gmail.com.
## License
MIT - [imcuttle](https://github.com/imcuttle) 🐟