Skip to content

Instantly share code, notes, and snippets.

@spadgos
Created May 21, 2012 10:29
Show Gist options
  • Save spadgos/2761737 to your computer and use it in GitHub Desktop.
Save spadgos/2761737 to your computer and use it in GitHub Desktop.
A check to see if augment.js is required
var methods = {
'every': Array.prototype.every,
'filter': Array.prototype.filter,
'forEach': Array.prototype.forEach,
'indexOf': Array.prototype.indexOf,
'isArray': Array.isArray,
'lastIndexOf': Array.prototype.lastIndexOf,
'map': Array.prototype.map,
'reduce': Array.prototype.reduce,
'reduceRight': Array.prototype.reduceRight,
'some': Array.prototype.some,
'now': Date.now,
'toISOString': Date.prototype.toISOString,
'toJSON': Date.prototype.toJSON,
'bind': Function.prototype.bind,
'getPrototypeOf': Object.getPrototypeOf,
'keys': Object.keys,
'trim': String.prototype.trim
};
for (var i in methods) {
console.log(i + ': ' + (methods[i] ? 'OK' : 'FAIL'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment