Skip to content

Commit

Permalink
Updating license, adding gruntfile, publishing to npm.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Jan 11, 2012
1 parent ff46303 commit 79a3047
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 298 deletions.
278 changes: 0 additions & 278 deletions LICENSE-GPL

This file was deleted.

8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -6,8 +6,10 @@ An optionally-asynchronous forEach with an interesting interface.


This code should work just fine in Node.js: This code should work just fine in Node.js:


First, install the module with: `npm install async-foreach`

```javascript ```javascript
var forEach = require('lib/foreach').forEach; var forEach = require('async-foreach').forEach;
forEach(["a", "b", "c"], function(item, index, arr) { forEach(["a", "b", "c"], function(item, index, arr) {
console.log("each", item, index, arr); console.log("each", item, index, arr);
}); });
Expand Down Expand Up @@ -184,6 +186,6 @@ Invalid length properties are now sanitized.
This closes issue #1 (like a boss). This closes issue #1 (like a boss).


## License ## License
Copyright (c) 2011 "Cowboy" Ben Alman Copyright (c) 2012 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses. Licensed under the MIT license.
<http://benalman.com/about/license/> <http://benalman.com/about/license/>
4 changes: 2 additions & 2 deletions dist/ba-foreach.js
@@ -1,6 +1,6 @@
/* JavaScript Sync/Async forEach - v0.1.2 - 11/17/2011 /* JavaScript Sync/Async forEach - v0.1.2 - 1/10/2012
* http://github.com/cowboy/javascript-sync-async-foreach * http://github.com/cowboy/javascript-sync-async-foreach
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ * Copyright (c) 2012 "Cowboy" Ben Alman; Licensed MIT */


(function(exports) { (function(exports) {


Expand Down
4 changes: 2 additions & 2 deletions dist/ba-foreach.min.js
@@ -1,4 +1,4 @@
/* JavaScript Sync/Async forEach - v0.1.2 - 11/17/2011 /* JavaScript Sync/Async forEach - v0.1.2 - 1/10/2012
* http://github.com/cowboy/javascript-sync-async-foreach * http://github.com/cowboy/javascript-sync-async-foreach
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ * Copyright (c) 2012 "Cowboy" Ben Alman; Licensed MIT */
(function(a){a.forEach=function(a,b,c){var d=-1,e=a.length>>>0;(function f(g){var h,j=g===!1;do++d;while(!(d in a)&&d!==e);if(j||d===e){c&&c(!j,a);return}g=b.call({async:function(){return h=!0,f}},a[d],d,a),h||f(g)})()}})(typeof exports=="object"&&exports||this) (function(a){a.forEach=function(a,b,c){var d=-1,e=a.length>>>0;(function f(g){var h,j=g===!1;do++d;while(!(d in a)&&d!==e);if(j||d===e){c&&c(!j,a);return}g=b.call({async:function(){return h=!0,f}},a[d],d,a),h||f(g)})()}})(typeof exports=="object"&&exports||this)
15 changes: 5 additions & 10 deletions grunt.js
@@ -1,17 +1,12 @@
/*global config:true, task:true*/ /*global config:true, task:true*/
config.init({ config.init({
pkg: '<json:package.json>',
meta: { meta: {
name: 'javascript-sync-async-foreach',
title: 'JavaScript Sync/Async forEach', title: 'JavaScript Sync/Async forEach',
version: '0.1.2', license: ['MIT'],
description: 'An optionally-asynchronous forEach with an interesting interface.', copyright: 'Copyright (c) 2012 "Cowboy" Ben Alman',
homepage: 'http://github.com/cowboy/javascript-sync-async-foreach', banner: '/* {{meta.title}} - v{{pkg.version}} - {{today "m/d/yyyy"}}\n' +
author: '"Cowboy" Ben Alman', ' * {{pkg.homepage}}\n' +
license: ['MIT', 'GPL'],
copyright: 'Copyright (c) 2011 "Cowboy" Ben Alman',
repository: 'git://github.com/cowboy/javascript-sync-async-foreach.git',
banner: '/* {{meta.title}} - v{{meta.version}} - {{today "m/d/yyyy"}}\n' +
' * {{meta.homepage}}\n' +
' * {{{meta.copyright}}}; Licensed {{join meta.license}} */' ' * {{{meta.copyright}}}; Licensed {{join meta.license}} */'
}, },
concat: { concat: {
Expand Down
6 changes: 3 additions & 3 deletions lib/foreach.js
@@ -1,9 +1,9 @@
/*! /*!
* Sync/Async forEach * Sync/Async forEach
* http://benalman.com/ * https://github.com/cowboy/javascript-sync-async-foreach
* *
* Copyright (c) 2011 "Cowboy" Ben Alman * Copyright (c) 2012 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses. * Licensed under the MIT license.
* http://benalman.com/about/license/ * http://benalman.com/about/license/
*/ */


Expand Down
25 changes: 25 additions & 0 deletions package.json
@@ -0,0 +1,25 @@
{
"author": "\"Cowboy\" Ben Alman (http://benalman.com/)",
"name": "async-foreach",
"description": "An optionally-asynchronous forEach with an interesting interface.",
"version": "0.1.2",
"homepage": "http://github.com/cowboy/javascript-sync-async-foreach",
"bugs": "https://github.com/cowboy/javascript-sync-async-foreach/issues",
"repository": {
"type": "git",
"url": "git://github.com/cowboy/javascript-sync-async-foreach.git"
},
"main": "lib/foreach",
"engines": {
"node": "~0.6.6"
},
"keywords": [
"array",
"loop",
"sync",
"async",
"foreach"
],
"dependencies": {},
"devDependencies": {}
}

0 comments on commit 79a3047

Please sign in to comment.