Skip to content

Instantly share code, notes, and snippets.

View hthetiot's full-sized avatar

Harold Thétiot hthetiot

View GitHub Profile
@WebReflection
WebReflection / each.js
Created April 3, 2012 19:28
all you need to `each(obj, cb [,context])`
var each = function (Array) {"use strict";
/*! all you need to `each(obj, cb [,context])`
* @author WebReflection
* @license WTFPL - http://en.wikipedia.org/wiki/WTFPL
* @gist https://gist.github.com/2294934
*/
var
toString = {}.toString,
hasOwnProperty = {}.hasOwnProperty,
array = toString.call([]),