summaryrefslogtreecommitdiff
path: root/src/node_modules/es6-object-assign
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2021-12-21 16:52:28 +0100
committerMinteck <contact@minteck.org>2021-12-21 16:52:28 +0100
commit46e43f4bde4a35785b4997b81e86cd19f046b69b (patch)
treec53c2f826f777f9d6b2d249dab556feb72a6c3a6 /src/node_modules/es6-object-assign
downloadlangdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz
langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2
langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip
Commit
Diffstat (limited to 'src/node_modules/es6-object-assign')
-rw-r--r--src/node_modules/es6-object-assign/LICENSE22
-rw-r--r--src/node_modules/es6-object-assign/README.md96
-rw-r--r--src/node_modules/es6-object-assign/auto.js3
-rw-r--r--src/node_modules/es6-object-assign/dist/object-assign-auto.js54
-rw-r--r--src/node_modules/es6-object-assign/dist/object-assign-auto.min.js1
-rw-r--r--src/node_modules/es6-object-assign/dist/object-assign.js50
-rw-r--r--src/node_modules/es6-object-assign/dist/object-assign.min.js1
-rw-r--r--src/node_modules/es6-object-assign/index.js46
-rw-r--r--src/node_modules/es6-object-assign/package.json44
9 files changed, 317 insertions, 0 deletions
diff --git a/src/node_modules/es6-object-assign/LICENSE b/src/node_modules/es6-object-assign/LICENSE
new file mode 100644
index 0000000..3fef2a2
--- /dev/null
+++ b/src/node_modules/es6-object-assign/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2015-2017 Rubén Norte <rubennorte@gmail.com>
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/node_modules/es6-object-assign/README.md b/src/node_modules/es6-object-assign/README.md
new file mode 100644
index 0000000..3917299
--- /dev/null
+++ b/src/node_modules/es6-object-assign/README.md
@@ -0,0 +1,96 @@
+[![npm](https://img.shields.io/npm/l/es6-object-assign.svg)](https://www.npmjs.org/package/es6-object-assign)
+[![npm](https://img.shields.io/npm/v/es6-object-assign.svg)](https://www.npmjs.org/package/es6-object-assign)
+
+# ES6 Object.assign()
+
+ECMAScript 2015 (ES2015/ES6) [Object.assign()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) polyfill and [ponyfill](https://ponyfill.com) for ECMAScript 5 environments.
+
+The main definition of this package has been copied from the polyfill defined in the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign).
+
+## Installation
+
+### NPM
+
+```bash
+npm install es6-object-assign
+```
+
+### Manual download and import
+
+The package is also available as a UMD module (compatible with AMD, CommonJS and exposing a global variable `ObjectAssign`) in `dist/object-assign.js` and `dist/object-assign.min.js` (833 bytes minified and gzipped).
+
+The versions with automatic polyfilling are `dist/object-assign-auto.js` and `dist/object-assign-auto.min.js`.
+
+## Usage
+
+**CommonJS**:
+
+```javascript
+// Polyfill, modifying the global Object
+require('es6-object-assign').polyfill();
+var obj = Object.assign({}, { foo: 'bar' });
+
+// Same version with automatic polyfilling
+require('es6-object-assign/auto');
+var obj = Object.assign({}, { foo: 'bar' });
+
+// Or ponyfill, using a reference to the function without modifying globals
+var assign = require('es6-object-assign').assign;
+var obj = assign({}, { foo: 'bar' });
+```
+
+**Globals**:
+
+Manual polyfill:
+
+```html
+<script src="<your-libs-directory>/object-assign.min.js"></script>
+<script>
+ // Polyfill, modifying the global Object
+ window.ObjectAssign.polyfill();
+ var obj = Object.assign({}, { foo: 'bar' });
+</script>
+```
+
+Automatic polyfill:
+
+```html
+<script src="<your-libs-directory>/object-assign-auto.min.js"></script>
+<script>
+ var obj = Object.assign({}, { foo: 'bar' });
+</script>
+```
+
+Ponyfill, without modifying globals:
+
+```html
+<script src="<your-libs-directory>/object-assign.min.js"></script>
+<script>
+ var assign = window.ObjectAssign.assign;
+ var obj = assign({}, { foo: 'bar' });
+</script>
+```
+
+## License
+
+The MIT License (MIT)
+
+Copyright (c) 2017 Rubén Norte
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/src/node_modules/es6-object-assign/auto.js b/src/node_modules/es6-object-assign/auto.js
new file mode 100644
index 0000000..43b68da
--- /dev/null
+++ b/src/node_modules/es6-object-assign/auto.js
@@ -0,0 +1,3 @@
+'use strict';
+
+require('./index').polyfill();
diff --git a/src/node_modules/es6-object-assign/dist/object-assign-auto.js b/src/node_modules/es6-object-assign/dist/object-assign-auto.js
new file mode 100644
index 0000000..12d22b6
--- /dev/null
+++ b/src/node_modules/es6-object-assign/dist/object-assign-auto.js
@@ -0,0 +1,54 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+require('./index').polyfill();
+
+},{"./index":2}],2:[function(require,module,exports){
+/**
+ * Code refactored from Mozilla Developer Network:
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
+ */
+
+'use strict';
+
+function assign(target, firstSource) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+function polyfill() {
+ if (!Object.assign) {
+ Object.defineProperty(Object, 'assign', {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+ value: assign
+ });
+ }
+}
+
+module.exports = {
+ assign: assign,
+ polyfill: polyfill
+};
+
+},{}]},{},[1]);
diff --git a/src/node_modules/es6-object-assign/dist/object-assign-auto.min.js b/src/node_modules/es6-object-assign/dist/object-assign-auto.min.js
new file mode 100644
index 0000000..e116628
--- /dev/null
+++ b/src/node_modules/es6-object-assign/dist/object-assign-auto.min.js
@@ -0,0 +1 @@
+!function r(e,t,n){function o(u,f){if(!t[u]){if(!e[u]){var c="function"==typeof require&&require;if(!f&&c)return c(u,!0);if(i)return i(u,!0);var a=new Error("Cannot find module '"+u+"'");throw a.code="MODULE_NOT_FOUND",a}var l=t[u]={exports:{}};e[u][0].call(l.exports,function(r){var t=e[u][1][r];return o(t?t:r)},l,l.exports,r,e,t,n)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}({1:[function(r,e,t){"use strict";r("./index").polyfill()},{"./index":2}],2:[function(r,e,t){"use strict";function n(r,e){if(void 0===r||null===r)throw new TypeError("Cannot convert first argument to object");for(var t=Object(r),n=1;n<arguments.length;n++){var o=arguments[n];if(void 0!==o&&null!==o)for(var i=Object.keys(Object(o)),u=0,f=i.length;u<f;u++){var c=i[u],a=Object.getOwnPropertyDescriptor(o,c);void 0!==a&&a.enumerable&&(t[c]=o[c])}}return t}function o(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:n})}e.exports={assign:n,polyfill:o}},{}]},{},[1]);
diff --git a/src/node_modules/es6-object-assign/dist/object-assign.js b/src/node_modules/es6-object-assign/dist/object-assign.js
new file mode 100644
index 0000000..8b9895a
--- /dev/null
+++ b/src/node_modules/es6-object-assign/dist/object-assign.js
@@ -0,0 +1,50 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ObjectAssign = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+/**
+ * Code refactored from Mozilla Developer Network:
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
+ */
+
+'use strict';
+
+function assign(target, firstSource) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+function polyfill() {
+ if (!Object.assign) {
+ Object.defineProperty(Object, 'assign', {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+ value: assign
+ });
+ }
+}
+
+module.exports = {
+ assign: assign,
+ polyfill: polyfill
+};
+
+},{}]},{},[1])(1)
+}); \ No newline at end of file
diff --git a/src/node_modules/es6-object-assign/dist/object-assign.min.js b/src/node_modules/es6-object-assign/dist/object-assign.min.js
new file mode 100644
index 0000000..ad90fda
--- /dev/null
+++ b/src/node_modules/es6-object-assign/dist/object-assign.min.js
@@ -0,0 +1 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.ObjectAssign=e()}}(function(){return function e(n,r,t){function o(f,u){if(!r[f]){if(!n[f]){var l="function"==typeof require&&require;if(!u&&l)return l(f,!0);if(i)return i(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=r[f]={exports:{}};n[f][0].call(a.exports,function(e){var r=n[f][1][e];return o(r?r:e)},a,a.exports,e,n,r,t)}return r[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({1:[function(e,n,r){"use strict";function t(e,n){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),t=1;t<arguments.length;t++){var o=arguments[t];if(void 0!==o&&null!==o)for(var i=Object.keys(Object(o)),f=0,u=i.length;f<u;f++){var l=i[f],c=Object.getOwnPropertyDescriptor(o,l);void 0!==c&&c.enumerable&&(r[l]=o[l])}}return r}function o(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}n.exports={assign:t,polyfill:o}},{}]},{},[1])(1)});
diff --git a/src/node_modules/es6-object-assign/index.js b/src/node_modules/es6-object-assign/index.js
new file mode 100644
index 0000000..b3d6fb0
--- /dev/null
+++ b/src/node_modules/es6-object-assign/index.js
@@ -0,0 +1,46 @@
+/**
+ * Code refactored from Mozilla Developer Network:
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
+ */
+
+'use strict';
+
+function assign(target, firstSource) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+function polyfill() {
+ if (!Object.assign) {
+ Object.defineProperty(Object, 'assign', {
+ enumerable: false,
+ configurable: true,
+ writable: true,
+ value: assign
+ });
+ }
+}
+
+module.exports = {
+ assign: assign,
+ polyfill: polyfill
+};
diff --git a/src/node_modules/es6-object-assign/package.json b/src/node_modules/es6-object-assign/package.json
new file mode 100644
index 0000000..dd1390e
--- /dev/null
+++ b/src/node_modules/es6-object-assign/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "es6-object-assign",
+ "version": "1.1.0",
+ "description": "ECMAScript 2015 (ES6) Object.assign polyfill and ponyfill",
+ "main": "index.js",
+ "scripts": {
+ "compile": "npm run compile:manual && npm run compile:auto",
+ "compile:manual": "browserify index.js -o dist/object-assign.js --standalone ObjectAssign",
+ "compile:auto": "browserify auto.js -o dist/object-assign-auto.js",
+ "compress": "npm run compress:manual && npm run compress:auto",
+ "compress:manual": "uglifyjs dist/object-assign.js --compress --mangle > dist/object-assign.min.js",
+ "compress:auto": "uglifyjs dist/object-assign-auto.js --compress --mangle > dist/object-assign-auto.min.js",
+ "build": "npm run compile && npm run compress"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rubennorte/es6-object-assign.git"
+ },
+ "keywords": [
+ "Object",
+ "assign",
+ "ES6",
+ "ECMAScript 6",
+ "ES2015",
+ "ECMAScript 2015",
+ "polyfill",
+ "ponyfill"
+ ],
+ "author": "Rubén Norte <rubennorte@gmail.com>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/rubennorte/es6-object-assign/issues"
+ },
+ "homepage": "https://github.com/rubennorte/es6-object-assign",
+ "devDependencies": {
+ "browserify": "^10.1.3",
+ "uglify-js": "^2.4.21"
+ },
+ "files": [
+ "index.js",
+ "auto.js",
+ "dist"
+ ]
+}