We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 566b997 commit ab68fffCopy full SHA for ab68fff
1 file changed
index.js
@@ -1,6 +1,9 @@
1
'use strict'
2
3
function promisify (fn) {
4
+ if (typeof fn !== 'function') {
5
+ throw new Error('fn parameter must be a function')
6
+ }
7
return function () {
8
const args = Array.prototype.slice.call(arguments)
9
return new Promise(function (resolve, reject) {
0 commit comments