Comparing version
# curriable CHANGELOG | ||
## 1.2.5 | ||
- Change minifier from `babel-minify` to `terser` | ||
## 1.2.4 | ||
@@ -4,0 +8,0 @@ |
@@ -31,3 +31,3 @@ 'use strict'; | ||
for (var index = 0; index < length; index++) { | ||
value = combined[index] = | ||
combined[index] = value = | ||
args[index] === __ && newArgsIndex < newArgsLength | ||
@@ -43,4 +43,3 @@ ? newArgs[newArgsIndex++] | ||
for (; newArgsIndex < newArgsLength; newArgsIndex++) { | ||
value = newArgs[newArgsIndex]; | ||
combined.push(value); | ||
combined[combined.length] = value = newArgs[newArgsIndex]; | ||
if (value !== __ && newArgsIndex < arity) { | ||
@@ -47,0 +46,0 @@ --remaining; |
@@ -27,3 +27,3 @@ /** | ||
for (var index = 0; index < length; index++) { | ||
value = combined[index] = | ||
combined[index] = value = | ||
args[index] === __ && newArgsIndex < newArgsLength | ||
@@ -39,4 +39,3 @@ ? newArgs[newArgsIndex++] | ||
for (; newArgsIndex < newArgsLength; newArgsIndex++) { | ||
value = newArgs[newArgsIndex]; | ||
combined.push(value); | ||
combined[combined.length] = value = newArgs[newArgsIndex]; | ||
if (value !== __ && newArgsIndex < arity) { | ||
@@ -43,0 +42,0 @@ --remaining; |
@@ -33,3 +33,3 @@ (function (global, factory) { | ||
for (var index = 0; index < length; index++) { | ||
value = combined[index] = | ||
combined[index] = value = | ||
args[index] === __ && newArgsIndex < newArgsLength | ||
@@ -45,4 +45,3 @@ ? newArgs[newArgsIndex++] | ||
for (; newArgsIndex < newArgsLength; newArgsIndex++) { | ||
value = newArgs[newArgsIndex]; | ||
combined.push(value); | ||
combined[combined.length] = value = newArgs[newArgsIndex]; | ||
if (value !== __ && newArgsIndex < arity) { | ||
@@ -49,0 +48,0 @@ --remaining; |
@@ -1,1 +0,1 @@ | ||
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.curriable={}))})(this,function(a){"use strict";var b="function"==typeof Symbol?Symbol("curriable placeholder"):60881,c=function(a,d,e){return function(){var f,g=e.length,h=arguments,i=h.length,j=[],k=0,l=d;if(g)for(var m=0;m<g;m++)f=j[m]=e[m]===b&&k<i?h[k++]:e[m],f!==b&&--l;if(k<i)for(;k<i;k++)f=h[k],j.push(f),f!==b&&k<d&&--l;return 0<l?c(a,d,j):a.apply(this,j)}},d=function(a,b){void 0===b&&(b=a.length);var d=c(a,b,[]);return d.arity=b,d.fn=a,d};d.__=b;var e=function(a){return a.fn};d.uncurry=e,a.__=b,a.curry=d,a.uncurry=e,a.default=d,Object.defineProperty(a,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).curriable={})}(this,function(e){"use strict";var n="function"==typeof Symbol?Symbol("curriable placeholder"):60881,r=function(e,t,f){return function(){var o,u=f.length,i=arguments,c=i.length,l=[],a=0,d=t;if(u)for(var y=0;y<u;y++)l[y]=o=f[y]===n&&a<c?i[a++]:f[y],o!==n&&--d;if(a<c)for(;a<c;a++)l[l.length]=o=i[a],o!==n&&a<t&&--d;return d>0?r(e,t,l):e.apply(this,l)}},t=function(e,n){void 0===n&&(n=e.length);var t=r(e,n,[]);return t.arity=n,t.fn=e,t};t.__=n;var f=function(e){return e.fn};t.uncurry=f,e.__=n,e.curry=t,e.uncurry=f,e.default=t,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -17,4 +17,4 @@ { | ||
"devDependencies": { | ||
"@types/jest": "^23.3.11", | ||
"benchmark": "^2.1.4", | ||
"@types/jest": "^23.3.13", | ||
"benchee": "^1.0.3", | ||
"cli-table": "^0.3.1", | ||
@@ -29,14 +29,13 @@ "cli-table2": "^0.2.0", | ||
"ramda": "^0.26.1", | ||
"rollup": "^0.68.2", | ||
"rollup-plugin-babel-minify": "^6.2.0", | ||
"rollup-plugin-typescript2": "^0.18.1", | ||
"rollup-plugin-uglify": "^6.0.0", | ||
"rollup": "^1.1.1", | ||
"rollup-plugin-terser": "^4.0.2", | ||
"rollup-plugin-typescript2": "^0.19.2", | ||
"ts-jest": "^23.10.4", | ||
"ts-loader": "^5.2.2", | ||
"tslint": "^5.11.0", | ||
"ts-loader": "^5.3.3", | ||
"tslint": "^5.12.1", | ||
"tslint-config-airbnb": "^5.11.0", | ||
"tslint-loader": "^3.5.4", | ||
"typescript": "^3.1.3", | ||
"webpack": "^4.9.1", | ||
"webpack-cli": "^3.1.2", | ||
"typescript": "^3.2.4", | ||
"webpack": "^4.29.0", | ||
"webpack-cli": "^3.2.1", | ||
"webpack-dev-server": "^3.1.4" | ||
@@ -73,3 +72,3 @@ }, | ||
"types": "index.d.ts", | ||
"version": "1.2.4" | ||
"version": "1.2.5" | ||
} |
@@ -21,3 +21,3 @@ # curriable | ||
`curriable` provides a `curry` method that is [highly performant](#benchmarks) with a small footprint (_573 bytes minified+gzipped_). You can call the method with any combination of parameters (one at a time, all at once, or any number in between), and placeholders are supported. | ||
`curriable` provides a `curry` method that is [highly performant](#benchmarks) with a small footprint (_562 bytes minified+gzipped_). You can call the method with any combination of parameters (one at a time, all at once, or any number in between), and placeholders are supported. | ||
@@ -131,23 +131,23 @@ If `fn` is the curried function and `_` is the placeholder value, the following are all equivalent: | ||
| Library | Operations / second | Relative margin of error | | ||
| ------------- | ------------------- | ------------------------ | | ||
| **curriable** | **3,577,400** | **1.22%** | | ||
| ramda | 2,327,403 | 1.00% | | ||
| lodash | 211,666 | 0.62% | | ||
| Library | Operations / second | | ||
| ------------- | ------------------- | | ||
| **curriable** | **4,052,206** | | ||
| ramda | 2,423,105 | | ||
| lodash | 241,736 | | ||
#### Passing all parameters in one call | ||
| Library | Operations / second | Relative margin of error | | ||
| ------------- | ------------------- | ------------------------ | | ||
| **curriable** | **17,081,266** | **0.59%** | | ||
| ramda | 13,347,748 | 0.67% | | ||
| lodash | 9,398,950 | 0.70% | | ||
| Library | Operations / second | | ||
| ------------- | ------------------- | | ||
| **curriable** | **18,106,685** | | ||
| ramda | 10,718,796 | | ||
| lodash | 9,052,257 | | ||
#### Using placeholder parameters in curried calls | ||
| Library | Operations / second | Relative margin of error | | ||
| ------------- | ------------------- | ------------------------ | | ||
| **curriable** | **4,341,722** | **0.63%** | | ||
| ramda | 2,902,086 | 0.66% | | ||
| lodash | 280,139 | 0.50% | | ||
| Library | Operations / second | | ||
| ------------- | ------------------- | | ||
| **curriable** | **4,821,329** | | ||
| ramda | 2,963,699 | | ||
| lodash | 336,687 | | ||
@@ -154,0 +154,0 @@ ## Development |
import typescript from "rollup-plugin-typescript2"; | ||
import minify from "rollup-plugin-babel-minify"; | ||
import { terser } from "rollup-plugin-terser"; | ||
@@ -52,10 +52,4 @@ import pkg from "./package.json"; | ||
}, | ||
plugins: [ | ||
...UMD_CONFIG.plugins, | ||
minify({ | ||
comments: false, | ||
sourceMap: false | ||
}) | ||
] | ||
plugins: [...UMD_CONFIG.plugins, terser()] | ||
} | ||
]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23
-4.17%32281
-1.6%323
-2.71%