feature(bower) currify v2.0.3

This commit is contained in:
coderaiser 2016-12-05 17:10:01 +02:00
parent f63772668e
commit 7667b4daa6
7 changed files with 17 additions and 56 deletions

2
.gitignore vendored
View file

@ -12,6 +12,8 @@ modules/fancybox/lib/
modules/fancybox/demo
modules/fancybox/sprite.psd
modules/currify/dist/currify.js
.nyc_output
*.swp

View file

@ -42,6 +42,6 @@
"promise-polyfill": "6.0.2",
"smalltalk": "2.1.3",
"jquery": "3.1.1",
"currify": "2.0.2"
"currify": "2.0.3"
}
}

View file

@ -19,15 +19,15 @@
"**/.*",
"test"
],
"version": "2.0.2",
"_release": "2.0.2",
"version": "2.0.3",
"_release": "2.0.3",
"_resolution": {
"type": "version",
"tag": "v2.0.2",
"commit": "c12ef5cc8caacd81d9a3aebd5b3fb3ba18a53878"
"tag": "v2.0.3",
"commit": "be9ab0b0f7b8e685da89321df384ac902fa3c587"
},
"_source": "https://github.com/coderaiser/currify.git",
"_target": "^2.0.2",
"_target": "^2.0.3",
"_originalSource": "currify",
"_direct": true
}

View file

@ -1,3 +1,9 @@
2016.12.05, v2.0.3
fix:
- (currify) bundle: empty currify in dist
2016.11.23, v2.0.2
fix:

View file

@ -1,48 +0,0 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.currify = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"currify":[function(require,module,exports){
'use strict';
const tail = list => [].slice.call(list, 1);
const f = (fn) => [
function(a) {
return fn(...arguments);
},
function(a, b) {
return fn(...arguments);
},
function(a, b, c) {
return fn(...arguments);
},
function(a, b, c, d) {
return fn(...arguments);
},
function(a, b, c, d, e) {
return fn(...arguments);
}
];
module.exports = function currify(fn) {
check(fn);
const args = tail(arguments);
if (args.length >= fn.length)
return fn(...args);
const again = function() {
return currify(...[fn, ...args, ...arguments]);
};
const count = fn.length - arguments.length;
const func = f(again)[count];
return func || again;
}
function check(fn) {
if (typeof fn !== 'function')
throw Error('fn should be function!');
}
},{}]},{},["currify"])("currify")
});

View file

@ -0,0 +1 @@
!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.currify=r()}}(function(){return function r(n,e,t){function o(f,u){if(!e[f]){if(!n[f]){var c="function"==typeof require&&require;if(!u&&c)return c(f,!0);if(i)return i(f,!0);var l=new Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l}var p=e[f]={exports:{}};n[f][0].call(p.exports,function(r){var e=n[f][1][r];return o(e?e:r)},p,p.exports,r,n,e,t)}return e[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({currify:[function(r,n,e){"use strict";function t(r){if(Array.isArray(r)){for(var n=0,e=Array(r.length);n<r.length;n++)e[n]=r[n];return e}return Array.from(r)}function o(r){if("function"!=typeof r)throw Error("fn should be function!")}var i=function(r){return[].slice.call(r,1)},f=function(r){return[function(n){return r.apply(void 0,arguments)},function(n,e){return r.apply(void 0,arguments)},function(n,e,t){return r.apply(void 0,arguments)},function(n,e,t,o){return r.apply(void 0,arguments)},function(n,e,t,o,i){return r.apply(void 0,arguments)}]};n.exports=function r(n){o(n);var e=i(arguments);if(e.length>=n.length)return n.apply(void 0,t(e));var u=function(){return r.apply(void 0,[n].concat(t(e),Array.prototype.slice.call(arguments)))},c=n.length-arguments.length,l=f(u)[c];return l||u}},{}]},{},["currify"])("currify")});

View file

@ -1,6 +1,6 @@
{
"name": "currify",
"version": "2.0.2",
"version": "2.0.3",
"description": "translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments",
"main": "lib/currify.js",
"scripts": {
@ -13,7 +13,7 @@
"wisdom": "npm run build",
"clean": "rimraf dist/* legacy/*",
"bundle:base": "browserify -s currify --ng false",
"bundle": "npm run bundle:base -- -r ./lib/currify.js:currify ./lib/currify.js -o dist/currify.js",
"bundle": "npm run bundle:base -- -r ./legacy/lib/currify.js:currify ./legacy/lib/currify.js -o dist/currify.js",
"watcher": "nodemon -w test -w lib --exec",
"watch:test": "npm run watcher -- npm test",
"watch:lint": "npm run watcher -- 'npm run lint'",