0.0.3 • Published 5 years ago

@earthtone/tiny-curry v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Tiny Curry

A javascript curry function. That's it. Nothing else.


Basic Usage

import curry from '@earthtone/tiny-curry'

const get = curry((prop, obj) => obj[prop])
const getFirstName = get('first_name')

const result = getFirstName({
  first_name: 'Wally'
  last_name: 'West'
})

console.log(result) // -> 'Wally'