ソースを参照

fixed promisify arguments usage

mightyplow 8 年 前
コミット
faf2eb72d2
2 ファイル変更3 行追加2 行削除
  1. 2 1
      lib/function.js
  2. 1 1
      package.json

+ 2 - 1
lib/function.js

@@ -24,7 +24,8 @@ const curry = fn => {
 
 const combine = argsToArray(fns => fns.reverse().reduce((fnc, fn) => val => fnc(fn(val))));
 
-const promisify = (fn, context = null) => () => {
+// cannot use fat arrow function since we don't get the arguments, then
+const promisify = (fn, context = null) => function () {
     // copy passed arguments to a new array
     const args = toArray(arguments);
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@mightyplow/jslib",
-  "version": "0.2.4",
+  "version": "0.2.5",
   "description": "js, helpers library",
   "main": "jslib.js",
   "devDependencies": {