https://github.com/johanholmerin/tsaphod
Clojure's API for JavaScript's Objects - TypeScript fork of Zaphod
https://github.com/johanholmerin/tsaphod
Last synced: 3 months ago
JSON representation
Clojure's API for JavaScript's Objects - TypeScript fork of Zaphod
- Host: GitHub
- URL: https://github.com/johanholmerin/tsaphod
- Owner: johanholmerin
- License: mit
- Created: 2021-05-09T18:34:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-14T17:25:55.000Z (about 4 years ago)
- Last Synced: 2025-02-02T17:38:45.054Z (4 months ago)
- Language: JavaScript
- Homepage: https://tsaphod.surge.sh
- Size: 456 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tsaphod
*Tsaphod is a TypeScript fork of [Zaphod][11], without the stalled [bind operator][9] proposal*
[Clojure's][2] immutable data API for JavaScript's own data structures.
```js
import { inc, update } from 'tsaphod';const state = { count: 0 };
update(state, 'count', inc)
// => { count: 1 }
```However, you don't need to know Clojure to make the most of Tsaphod. 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 tsaphod
```*Note: Tsaphod is an ES module and requires Node >= 12.20*
[1]: https://en.wikipedia.org/wiki/Zaphod_Beeblebrox
[2]: https://clojure.org/
[3]: https://tsaphod.surge.sh
[4]: https://tsaphod.surge.sh/api
[5]: https://tsaphod.surge.sh/cheatsheet
[6]: https://tsaphod.surge.sh/tutorial
[8]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/rest_parameters
[9]: https://github.com/tc39/proposal-bind-operator
[11]: https://github.com/danprince/zaphod
[15]: https://github.com/danprince/zaphod/issues/6
[16]: https://github.com/sebmarkbage/ecmascript-immutable-data-structures