Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurkimus/curry
Javascript curry utility
https://github.com/yurkimus/curry
deno functional-programming javascript node utilities
Last synced: about 1 month ago
JSON representation
Javascript curry utility
- Host: GitHub
- URL: https://github.com/yurkimus/curry
- Owner: yurkimus
- License: mit
- Created: 2024-08-12T20:14:51.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-12T23:26:44.000Z (3 months ago)
- Last Synced: 2024-10-01T07:20:15.125Z (about 2 months ago)
- Topics: deno, functional-programming, javascript, node, utilities
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Curry
JavaScript curry utility.
## Table of Contents
- [Installation](#installation)
- [Exports](#exports)
- [curry](#curry)
- [License](#license)## Installation
### npm
```
npm install @yurkimus/curry
```### urls
```
"@yurkimus/curry": "npm:@yurkimus/curry"
``````
"@yurkimus/curry": "github:yurkimus/curry"
``````
"@yurkimus/curry": "https://raw.githubusercontent.com/yurkimus/curry/main/source/index.js"
```## Exports
### curry
#### Definition:
```
curry :: function -> number -> function
```#### Example:
```javascript
curry(
// predicate, no need to specify length unless using variadic function parameters
(a, b) => a + b
)(1)(2); // => 3curry(
// predicate
(a, ...numbers) => a + numbers.reduce((x, a) => x + a, 0),
// specified length to handle variadic function parameters
2
)(1)(2, 3); // => 6
```## License
[MIT](LICENSE)