initial commit

This commit is contained in:
air66
2019-07-24 18:16:32 +01:00
commit 5efebf4ded
8591 changed files with 899103 additions and 0 deletions

3
node_modules/es6-symbol/test/implement.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof Symbol, 'function'); };

12
node_modules/es6-symbol/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
var d = require('d')
, defineProperty = Object.defineProperty;
module.exports = function (T, a) {
var symbol = T('test'), x = {};
defineProperty(x, symbol, d('foo'));
a(x.test, undefined, "Name");
a(x[symbol], 'foo', "Get");
};

14
node_modules/es6-symbol/test/is-implemented.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var global = require('es5-ext/global')
, polyfill = require('../polyfill');
module.exports = function (t, a) {
var cache;
a(typeof t(), 'boolean');
cache = global.Symbol;
global.Symbol = polyfill;
a(t(), true);
if (cache === undefined) delete global.Symbol;
else global.Symbol = cache;
};

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t, 'boolean'); };

16
node_modules/es6-symbol/test/is-symbol.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
'use strict';
var SymbolPoly = require('../polyfill');
module.exports = function (t, a) {
a(t(undefined), false, "Undefined");
a(t(null), false, "Null");
a(t(true), false, "Primitive");
a(t('raz'), false, "String");
a(t({}), false, "Object");
a(t([]), false, "Array");
if (typeof Symbol !== 'undefined') {
a(t(Symbol()), true, "Native");
}
a(t(SymbolPoly()), true, "Polyfill");
};

29
node_modules/es6-symbol/test/polyfill.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
var d = require('d')
, isSymbol = require('../is-symbol')
, defineProperty = Object.defineProperty;
module.exports = function (T, a) {
var symbol = T('test'), x = {};
defineProperty(x, symbol, d('foo'));
a(x.test, undefined, "Name");
a(x[symbol], 'foo', "Get");
a(x instanceof T, false);
a(isSymbol(symbol), true, "Symbol");
a(isSymbol(T.iterator), true, "iterator");
a(isSymbol(T.toStringTag), true, "toStringTag");
x = {};
x[symbol] = 'foo';
if (typeof symbol !== 'symbol') {
a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
value: 'foo', writable: true });
}
symbol = T.for('marko');
a(isSymbol(symbol), true);
a(T.for('marko'), symbol);
a(T.keyFor(symbol), 'marko');
};

19
node_modules/es6-symbol/test/validate-symbol.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
var SymbolPoly = require('../polyfill');
module.exports = function (t, a) {
var symbol;
a.throws(function () { t(undefined); }, TypeError, "Undefined");
a.throws(function () { t(null); }, TypeError, "Null");
a.throws(function () { t(true); }, TypeError, "Primitive");
a.throws(function () { t('raz'); }, TypeError, "String");
a.throws(function () { t({}); }, TypeError, "Object");
a.throws(function () { t([]); }, TypeError, "Array");
if (typeof Symbol !== 'undefined') {
symbol = Symbol();
a(t(symbol), symbol, "Native");
}
symbol = SymbolPoly();
a(t(symbol), symbol, "Polyfill");
};