mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Transition to monorepo on a new Dev branch
This commit is contained in:
11
App/Source/node_modules/has-symbols/.eslintrc
generated
vendored
Normal file
11
App/Source/node_modules/has-symbols/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"max-statements-per-line": [2, { "max": 2 }],
|
||||
"no-magic-numbers": 0,
|
||||
"multiline-comment-style": 0,
|
||||
}
|
||||
}
|
12
App/Source/node_modules/has-symbols/.github/FUNDING.yml
generated
vendored
Normal file
12
App/Source/node_modules/has-symbols/.github/FUNDING.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/has-symbols
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
9
App/Source/node_modules/has-symbols/.nycrc
generated
vendored
Normal file
9
App/Source/node_modules/has-symbols/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
21
App/Source/node_modules/has-symbols/LICENSE
generated
vendored
Normal file
21
App/Source/node_modules/has-symbols/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Jordan Harband
|
||||
|
||||
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.
|
13
App/Source/node_modules/has-symbols/index.js
generated
vendored
Normal file
13
App/Source/node_modules/has-symbols/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
||||
var hasSymbolSham = require('./shams');
|
||||
|
||||
module.exports = function hasNativeSymbols() {
|
||||
if (typeof origSymbol !== 'function') { return false; }
|
||||
if (typeof Symbol !== 'function') { return false; }
|
||||
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
||||
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
||||
|
||||
return hasSymbolSham();
|
||||
};
|
101
App/Source/node_modules/has-symbols/package.json
generated
vendored
Normal file
101
App/Source/node_modules/has-symbols/package.json
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"name": "has-symbols",
|
||||
"version": "1.0.3",
|
||||
"description": "Determine if the JS environment has Symbol support. Supports spec, or shams.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"pretest": "npm run --silent lint",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"tests-only": "npm run test:stock && npm run test:staging && npm run test:shams",
|
||||
"test:stock": "nyc node test",
|
||||
"test:staging": "nyc node --harmony --es-staging test",
|
||||
"test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs",
|
||||
"test:shams:corejs": "nyc node test/shams/core-js.js",
|
||||
"test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/inspect-js/has-symbols.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Symbol",
|
||||
"symbols",
|
||||
"typeof",
|
||||
"sham",
|
||||
"polyfill",
|
||||
"native",
|
||||
"core-js",
|
||||
"ES6"
|
||||
],
|
||||
"author": {
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com",
|
||||
"url": "http://ljharb.codes"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com",
|
||||
"url": "http://ljharb.codes"
|
||||
}
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/has-symbols/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/has-symbols#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^20.2.3",
|
||||
"aud": "^2.0.0",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"core-js": "^2.6.12",
|
||||
"eslint": "=8.8.0",
|
||||
"get-own-property-symbols": "^0.9.5",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.5.2"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"iexplore/6.0..latest",
|
||||
"firefox/3.0..6.0",
|
||||
"firefox/15.0..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/4.0..10.0",
|
||||
"chrome/20.0..latest",
|
||||
"chrome/canary",
|
||||
"opera/10.0..latest",
|
||||
"opera/next",
|
||||
"safari/4.0..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"greenkeeper": {
|
||||
"ignore": [
|
||||
"core-js"
|
||||
]
|
||||
}
|
||||
}
|
42
App/Source/node_modules/has-symbols/shams.js
generated
vendored
Normal file
42
App/Source/node_modules/has-symbols/shams.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
||||
module.exports = function hasSymbols() {
|
||||
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
||||
if (typeof Symbol.iterator === 'symbol') { return true; }
|
||||
|
||||
var obj = {};
|
||||
var sym = Symbol('test');
|
||||
var symObj = Object(sym);
|
||||
if (typeof sym === 'string') { return false; }
|
||||
|
||||
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
||||
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
||||
|
||||
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
||||
// if (sym instanceof Symbol) { return false; }
|
||||
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
||||
// if (!(symObj instanceof Symbol)) { return false; }
|
||||
|
||||
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
||||
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
||||
|
||||
var symVal = 42;
|
||||
obj[sym] = symVal;
|
||||
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
||||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
||||
|
||||
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
||||
|
||||
var syms = Object.getOwnPropertySymbols(obj);
|
||||
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
||||
|
||||
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
||||
|
||||
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
||||
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
22
App/Source/node_modules/has-symbols/test/index.js
generated
vendored
Normal file
22
App/Source/node_modules/has-symbols/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var hasSymbols = require('../');
|
||||
var runSymbolTests = require('./tests');
|
||||
|
||||
test('interface', function (t) {
|
||||
t.equal(typeof hasSymbols, 'function', 'is a function');
|
||||
t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Symbols are supported', { skip: !hasSymbols() }, function (t) {
|
||||
runSymbolTests(t);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Symbols are not supported', { skip: hasSymbols() }, function (t) {
|
||||
t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined');
|
||||
t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist');
|
||||
t.end();
|
||||
});
|
28
App/Source/node_modules/has-symbols/test/shams/core-js.js
generated
vendored
Normal file
28
App/Source/node_modules/has-symbols/test/shams/core-js.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
|
||||
test('has native Symbol support', function (t) {
|
||||
t.equal(typeof Symbol, 'function');
|
||||
t.equal(typeof Symbol(), 'symbol');
|
||||
t.end();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var hasSymbols = require('../../shams');
|
||||
|
||||
test('polyfilled Symbols', function (t) {
|
||||
/* eslint-disable global-require */
|
||||
t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
|
||||
require('core-js/fn/symbol');
|
||||
require('core-js/fn/symbol/to-string-tag');
|
||||
|
||||
require('../tests')(t);
|
||||
|
||||
var hasSymbolsAfter = hasSymbols();
|
||||
t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
|
||||
/* eslint-enable global-require */
|
||||
t.end();
|
||||
});
|
28
App/Source/node_modules/has-symbols/test/shams/get-own-property-symbols.js
generated
vendored
Normal file
28
App/Source/node_modules/has-symbols/test/shams/get-own-property-symbols.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
|
||||
test('has native Symbol support', function (t) {
|
||||
t.equal(typeof Symbol, 'function');
|
||||
t.equal(typeof Symbol(), 'symbol');
|
||||
t.end();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var hasSymbols = require('../../shams');
|
||||
|
||||
test('polyfilled Symbols', function (t) {
|
||||
/* eslint-disable global-require */
|
||||
t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
|
||||
|
||||
require('get-own-property-symbols');
|
||||
|
||||
require('../tests')(t);
|
||||
|
||||
var hasSymbolsAfter = hasSymbols();
|
||||
t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
|
||||
/* eslint-enable global-require */
|
||||
t.end();
|
||||
});
|
56
App/Source/node_modules/has-symbols/test/tests.js
generated
vendored
Normal file
56
App/Source/node_modules/has-symbols/test/tests.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
module.exports = function runSymbolTests(t) {
|
||||
t.equal(typeof Symbol, 'function', 'global Symbol is a function');
|
||||
|
||||
if (typeof Symbol !== 'function') { return false; }
|
||||
|
||||
t.notEqual(Symbol(), Symbol(), 'two symbols are not equal');
|
||||
|
||||
/*
|
||||
t.equal(
|
||||
Symbol.prototype.toString.call(Symbol('foo')),
|
||||
Symbol.prototype.toString.call(Symbol('foo')),
|
||||
'two symbols with the same description stringify the same'
|
||||
);
|
||||
*/
|
||||
|
||||
/*
|
||||
var foo = Symbol('foo');
|
||||
|
||||
t.notEqual(
|
||||
String(foo),
|
||||
String(Symbol('bar')),
|
||||
'two symbols with different descriptions do not stringify the same'
|
||||
);
|
||||
*/
|
||||
|
||||
t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function');
|
||||
// t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol');
|
||||
|
||||
t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function');
|
||||
|
||||
var obj = {};
|
||||
var sym = Symbol('test');
|
||||
var symObj = Object(sym);
|
||||
t.notEqual(typeof sym, 'string', 'Symbol is not a string');
|
||||
t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly');
|
||||
t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly');
|
||||
|
||||
var symVal = 42;
|
||||
obj[sym] = symVal;
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (sym in obj) { t.fail('symbol property key was found in for..in of object'); }
|
||||
|
||||
t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object');
|
||||
t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object');
|
||||
t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object');
|
||||
t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable');
|
||||
t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: 42,
|
||||
writable: true
|
||||
}, 'property descriptor is correct');
|
||||
};
|
Reference in New Issue
Block a user