Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.

Commit

Permalink
refactor(compose): remove runtime type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
David Zukowski committed May 25, 2017
1 parent 36c5ced commit af6d1ae
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,5 @@ import pipe from './pipe'
* isSqrtEven(16) // => true
*/
export default _defn('compose', function (fns) {
var i = 0

// TODO(zuko): abstract for use in other functions and disable in production.
for (; i < fns.length; i++) {
if (!isType('function', fns[i])) {
throw new TypeError(
'Invalid argument supplied to `compose`. The value at index ' +
'[' + i + '] was not a function; what was received was of type: ' +
type(fns[i]) + '.'
)
}
}
return pipe(_reverse.call(fns))
})

0 comments on commit af6d1ae

Please sign in to comment.