Comparing version 1.2.0 to 1.2.1
// | ||
// Polyfill taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find#Polyfill | ||
// | ||
require('../ex')(Array.prototype, function find (predicate) { | ||
require('../ex')(Array.prototype, 'find', function find (predicate) { | ||
// 1. Let O be ? ToObject(this value). | ||
@@ -6,0 +6,0 @@ if (this == null) { |
// | ||
// Taken from https://github.com/jacwright/date.format | ||
// | ||
require('../ex')(Date.prototype, function format (formatString) { | ||
require('../ex')(Date.prototype, 'format', function format (formatString) { | ||
var date = this; | ||
@@ -6,0 +6,0 @@ return formatString.replace(/(\\?)(.)/g, function(_, esc, chr) { |
module.exports = function (prototype, func) { | ||
module.exports = function (prototype, name, func) { | ||
// Don't override existing definitions | ||
if ( prototype[func.name] ) return; | ||
if ( prototype[name] ) return; | ||
Object.defineProperty(prototype, func.name, { | ||
Object.defineProperty(prototype, name, { | ||
value: func, | ||
@@ -9,0 +9,0 @@ writable: true, |
// | ||
// See more at https://github.com/mindeavor/es-papp | ||
// | ||
require('../ex')(Function.prototype, function papp () { | ||
require('../ex')(Function.prototype, 'papp', function papp () { | ||
var slice = Array.prototype.slice; | ||
@@ -6,0 +6,0 @@ var fn = this; |
// | ||
// See more at https://github.com/mindeavor/es-papp | ||
// | ||
require('../ex')(Function.prototype, function pappRight () { | ||
require('../ex')(Function.prototype, 'pappRight', function pappRight () { | ||
var slice = Array.prototype.slice; | ||
@@ -6,0 +6,0 @@ var fn = this; |
@@ -6,3 +6,3 @@ // | ||
// | ||
require('../ex')(Function.prototype, function throttle (waittime, threshhold, explicitContext) { | ||
require('../ex')(Function.prototype, 'throttle', function throttle (waittime, threshhold, explicitContext) { | ||
threshhold || (threshhold = 250); | ||
@@ -9,0 +9,0 @@ var fn = this |
{ | ||
"name": "exjs", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "README.md", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
28266