Comparing version 1.3.0 to 1.4.0
@@ -112,3 +112,3 @@ var functools = (function(undefined){ | ||
fn(iterable[i], i, iterable, partial(next, [i+1])); | ||
fn(iterable[i], partial(next, [i+1])); | ||
@@ -115,0 +115,0 @@ }(0)); |
{ | ||
"name":"functools", | ||
"version":"1.3.0", | ||
"version":"1.4.0", | ||
"description":"A minimal library of functional operations", | ||
@@ -5,0 +5,0 @@ "author":"Azer Koculu <azer@kodfabrik.com>", |
functools is a JavaScript library for functional programming. | ||
Inspired by: Common Lisp, Clojure and Python. | ||
Tested on: Chrome, IE6 and Node. (See *test/results.json* for details) | ||
@@ -68,3 +69,3 @@ # SYNOPSIS | ||
09.06.2012 | ||
06.09.2012 | ||
* each.async | ||
@@ -74,7 +75,7 @@ * memoize | ||
06.06.2012 | ||
06.08.2012 | ||
* IE6, IE7 and IE8 bugfixes | ||
* better testing | ||
# API | ||
# DOCUMENTATION | ||
@@ -153,3 +154,3 @@ * [compose](#compose) | ||
<a name="each.async" /> | ||
## each(*function*,*iterable*,*callback*) | ||
## each.async(*function*,*iterable*,*callback*) | ||
@@ -160,3 +161,6 @@ Call async *function* once for each element in *iterable*, and *callback* after iteration. | ||
> function uploadFile(filename, index, files, callback){ console.log('Uploading ', filename); callback(); } | ||
> function uploadFile(filename, callback){ | ||
console.log('Uploading ', filename); | ||
callback(); | ||
} | ||
@@ -260,7 +264,7 @@ > each.async(uploadFile, [ '/docs/intro', '/docs/body', '/docs/outro' ], function(error){ | ||
function capitalize(){ | ||
return string.charAt(0).toUpperCase() + string.slice(1); | ||
function capitalize(str){ | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
} | ||
map(capitalize, capitalize); // returns { 'en':'Hello', 'tr':'Merhaba', 'fr':'Bonjour' } | ||
map(capitalize, dict); // returns { 'en':'Hello', 'tr':'Merhaba', 'fr':'Bonjour' } | ||
``` | ||
@@ -267,0 +271,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17713
407
0