diff options
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill')
4 files changed, 82 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/.bower.json b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/.bower.json new file mode 100644 index 00000000..a6702b10 --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/.bower.json @@ -0,0 +1,14 @@ +{ + "name": "phantomjs-polyfill", + "homepage": "https://github.com/conversocial/phantomjs-polyfill", + "version": "0.0.2", + "_release": "0.0.2", + "_resolution": { + "type": "version", + "tag": "v0.0.2", + "commit": "a1f767df019a1d02bfca39546dfe6bcc8c057c75" + }, + "_source": "https://github.com/conversocial/phantomjs-polyfill.git", + "_target": "^0.0.2", + "_originalSource": "phantomjs-polyfill" +}
\ No newline at end of file diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/README.md new file mode 100644 index 00000000..de67ecda --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/README.md @@ -0,0 +1,26 @@ +# Function.prototype.bind polyfill for PhantomJS + +This is a polyfill for function.prototype.bind which is missing from [PhantomJS](http://phantomjs.org/). + +## Installation + +``` +npm install --save-dev phantomjs-polyfill +``` + +## Usage + +``` +require('phantomjs-polyfill') +``` + +### Usage with Karma + +Include the polyfill directly in the files list of your karma.conf +``` +... +files: [ + './node_modules/phantomjs-polyfill/bind-polyfill.js', + ... +] +... diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js new file mode 100644 index 00000000..1457cf5d --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js @@ -0,0 +1,18 @@ +if (typeof Function.prototype.bind != 'function') { + Function.prototype.bind = function bind(obj) { + var args = Array.prototype.slice.call(arguments, 1), + self = this, + nop = function() { + }, + bound = function() { + return self.apply( + this instanceof nop ? this : (obj || {}), args.concat( + Array.prototype.slice.call(arguments) + ) + ); + }; + nop.prototype = this.prototype || {}; + bound.prototype = new nop(); + return bound; + }; +} diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/package.json b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/package.json new file mode 100644 index 00000000..02aaf927 --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/package.json @@ -0,0 +1,24 @@ +{ + "name": "phantomjs-polyfill", + "version": "0.0.2", + "description": "Polyfill for Function.prototype.bind", + "main": "bind-polyfill.js", + "repository": { + "type": "git", + "url": "git@github.com:tom-james-watson/phantomjs-polyfill.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "phantomjs", + "bind", + "polyfill" + ], + "author": "Tom Watson <tom.james.watson@gmail.com>", + "license": "ISC", + "bugs": { + "url": "https://github.com/tom-james-watson/phantomjs-polyfill/issues" + }, + "homepage": "https://github.com/tom-james-watson/phantomjs-polyfill" +} |