Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danprince/zaphod
🌌 Clojure's API for JavaScript's Objects
https://github.com/danprince/zaphod
clojure immutable javascript zaphod
Last synced: about 2 months ago
JSON representation
🌌 Clojure's API for JavaScript's Objects
- Host: GitHub
- URL: https://github.com/danprince/zaphod
- Owner: danprince
- License: mit
- Created: 2016-08-12T22:54:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-17T21:22:19.000Z (over 3 years ago)
- Last Synced: 2024-04-15T07:13:17.372Z (10 months ago)
- Topics: clojure, immutable, javascript, zaphod
- Language: JavaScript
- Homepage: https://zaphod.surge.sh
- Size: 267 KB
- Stars: 54
- Watchers: 5
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Zaphod
[![Travis](https://img.shields.io/travis/danprince/zaphod.svg?maxAge=2592000)](https://travis-ci.org/danprince/zaphod)
[![Coveralls](https://img.shields.io/coveralls/danprince/zaphod.svg?maxAge=2592000)](https://coveralls.io/github/danprince/zaphod)
[![npm](https://img.shields.io/npm/v/zaphod.svg?maxAge=2592000)](https://npmjs.com/package/zaphod)
[![Gitter](https://img.shields.io/gitter/room/zaphodjs/Lobby.svg?maxAge=2592000)](https://gitter.im/zaphodjs/Lobby)
[![API Docs](https://img.shields.io/badge/API-Docs-blue.svg)][4][Clojure's][2] immutable data API for JavaScript's own data structures, using the [function bind operator][9].
```js
import { inc, update } from 'zaphod';const state = { count: 0 };
state::update('count', inc)
// => { count: 1 }
```However, you don't need to know Clojure to make the most of Zaphod. This library is just a set of JavaScript functions that make working with immutable data more fun!
Find the [docs][4], [cheatsheet][5] and [rationale][6] at [the website][3].
```sh
npm install --save zaphod
# or
https://unpkg.com/zaphod
```Check out the [getting started][7] guide for an in-depth explanation on configuring Babel to work with the function-bind operator.
[1]: https://en.wikipedia.org/wiki/Zaphod_Beeblebrox
[2]: https://clojure.org/
[3]: https://zaphod.surge.sh
[4]: https://zaphod.surge.sh/api
[5]: https://zaphod.surge.sh/cheatsheet
[6]: https://zaphod.surge.sh/tutorial
[7]: https://zaphod.surge.sh/getting-started
[8]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/rest_parameters
[9]: https://github.com/tc39/proposal-bind-operator
[10]: https://gitter.im/zaphod
[11]: https://github.com/danprince/zaphod
[12]: http://babeljs.io/
[13]: http://babeljs.io/docs/plugins/transform-function-bind/
[14]: https://babeljs.io/docs/plugins/preset-stage-0/
[15]: https://github.com/danprince/zaphod/issues/6
[16]: https://github.com/sebmarkbage/ecmascript-immutable-data-structures