0.3.0 • Published 1 year ago

@domp/fp v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

@domp/fp

Convert regular dom-packages to auto-curried, iteratee-first and data-last methods I.e. Will call fnc with last argument as the first argument when full arity has been reached. Since the first argument is always the element.

fp(fnc, arity = fnc.length)

import appendTo from '@domp/append-to'
import fp from '@domp/fp'

const appendToFp = fp(appendTo)
const curried = appendTo(target)

curried(element)

// same as

appendTo(element, target)