Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adhityaramadhanus/curryjs
Simple naive currying library in js
https://github.com/adhityaramadhanus/curryjs
Last synced: 12 days ago
JSON representation
Simple naive currying library in js
- Host: GitHub
- URL: https://github.com/adhityaramadhanus/curryjs
- Owner: AdhityaRamadhanus
- License: mit
- Created: 2016-06-20T12:54:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-20T13:45:57.000Z (over 8 years ago)
- Last Synced: 2024-11-23T09:44:42.737Z (29 days ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/AdhityaRamadhanus/curryjs.svg?branch=master)](https://travis-ci.org/AdhityaRamadhanus/curryjs)
CurryJs
Installation |
Usage |
License
Simple, naive, small library for currying function
composing and curry are two important technique in functional programming, you can build more functions from these
Installation
------------`npm install curryjs`
Usage
-----```js
var curryJs = require('curryjs')
var composeJs = require('composejs')
var split = curryJs(function (delim, str) { return str.split(delim)})
var join = curryJs(function (delim, arr) { return arr.join(delim)})
var map = curryJs(function (fn, arr) { return arr.map(fn)})
var toLowerCase = Function.prototype.call.bind(String.prototype.toLowerCase)
var composed = composeJs(join(' '), map(toLowerCase), split(' '))
composed('Hello World') // hello world
```License
----MIT © [Adhitya Ramadhanus]