updeep-remeda/lib/wrap.js

7 lines
184 B
JavaScript
Raw Normal View History

2017-04-19 00:55:46 +00:00
import curry from './util/curry'
import freeze from './freeze'
export default function wrap(func, length = func.length) {
2017-04-19 00:55:46 +00:00
return curry((...args) => freeze(func(...args)), length)
}