handle-easy
v1.0.1
Published
Makes a function handable.
Readme
handle-easy
Makes a function handable.
USE
There are currently two functions.
handleFunction()
import { handleFunction } from "handle-easy"
// or...
import hae from "handle-easy"
const handleFunction = hae.handleFunction
const add = (a: number, b: number) => a + b
handleFunction(add)(3, 5) // 8asyncHandleFunction()
import { asyncHandleFunction } from "handle-easy"
// or...
import hae from "handle-easy"
const asyncHandleFunction = hae.asyncHandleFunction
asyncHandleFunction(fetch)("https://mywebsite.com").then(value => {
console.log(value.data?.text)
})