mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
20
web/node_modules/internal-slot/.editorconfig
generated
vendored
Normal file
20
web/node_modules/internal-slot/.editorconfig
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 150
|
||||
|
||||
[CHANGELOG.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
max_line_length = off
|
||||
|
||||
[Makefile]
|
||||
max_line_length = off
|
1
web/node_modules/internal-slot/.eslintignore
generated
vendored
Normal file
1
web/node_modules/internal-slot/.eslintignore
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
coverage/
|
12
web/node_modules/internal-slot/.eslintrc
generated
vendored
Normal file
12
web/node_modules/internal-slot/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"max-params": [2, 3],
|
||||
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
|
||||
"no-magic-numbers": 0,
|
||||
"operator-linebreak": [2, "before"],
|
||||
},
|
||||
}
|
12
web/node_modules/internal-slot/.github/FUNDING.yml
generated
vendored
Normal file
12
web/node_modules/internal-slot/.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/internal-slot
|
||||
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 a single custom sponsorship URL
|
13
web/node_modules/internal-slot/.nycrc
generated
vendored
Normal file
13
web/node_modules/internal-slot/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
58
web/node_modules/internal-slot/CHANGELOG.md
generated
vendored
Normal file
58
web/node_modules/internal-slot/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
### Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [v1.0.3](https://github.com/ljharb/internal-slot/compare/v1.0.2...v1.0.3)
|
||||
|
||||
> 26 January 2021
|
||||
|
||||
- [Tests] use shared travis-ci configs [`0ef2263`](https://github.com/ljharb/internal-slot/commit/0ef22634fa2269d9df0d784aca3c5748e8eabd3b)
|
||||
- [Tests] migrate tests to Github Actions [`6253915`](https://github.com/ljharb/internal-slot/commit/6253915d28721df2eda5630849bc6b57647e3ee2)
|
||||
- [meta] do not publish github action workflow files [`ef94e55`](https://github.com/ljharb/internal-slot/commit/ef94e555727ed6a649ef64010904fe89a468d459)
|
||||
- [Tests] run `nyc` on all tests; use `tape` runner [`917d6ca`](https://github.com/ljharb/internal-slot/commit/917d6ca630cdcd6b4da9a2c300c6a3abb6e724fe)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`8dcb6fe`](https://github.com/ljharb/internal-slot/commit/8dcb6fe01d6a45e1af17a9dace95ca47c99b4328)
|
||||
- [actions] add "Allow Edits" workflow [`7aa3e86`](https://github.com/ljharb/internal-slot/commit/7aa3e86edb0149fd882717481885760aeb28474e)
|
||||
- [Refactor] use `get-intrinsic` instead of `es-abstract`; update `side-channel` [`11ad17d`](https://github.com/ljharb/internal-slot/commit/11ad17d4255adcbc55fd4eca0bf6733bac59f1bf)
|
||||
- [readme] remove travis badge [`5b75452`](https://github.com/ljharb/internal-slot/commit/5b754523aa07e8f67d0135df75059a18047292bb)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`d531688`](https://github.com/ljharb/internal-slot/commit/d5316880956b4dd83e6b6c9ab48fdd8171a4a268)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`c76fa91`](https://github.com/ljharb/internal-slot/commit/c76fa91a7e623a738e22332bee4e985aea41122e)
|
||||
- [Dev Deps] update `eslint`, `tape` [`e733ccd`](https://github.com/ljharb/internal-slot/commit/e733ccd68e81c72ef2e02726e001895053de7887)
|
||||
- [Dev Deps] update `auto-changelog`; add `aud` [`df20bf5`](https://github.com/ljharb/internal-slot/commit/df20bf5d3943a533c20799d8cc1449997e85d53b)
|
||||
- [meta] fix autochangelog [`e89e6f1`](https://github.com/ljharb/internal-slot/commit/e89e6f1ff9f10f386e6400b586db78ad9c0f1309)
|
||||
- [Tests] only audit prod deps [`71317b9`](https://github.com/ljharb/internal-slot/commit/71317b95ec6bbd9877807da0c0316ee9f5f30fab)
|
||||
- [Deps] update `es-abstract` [`c17ccf4`](https://github.com/ljharb/internal-slot/commit/c17ccf45f4cb0d3b7a1536e9cd3a7ff9a7dafd21)
|
||||
- [Dev Deps] update `tape` [`d81ae03`](https://github.com/ljharb/internal-slot/commit/d81ae030a0e8f58cee00f752601ce60405a93d78)
|
||||
- [Deps] update `es-abstract` [`b56303b`](https://github.com/ljharb/internal-slot/commit/b56303b4c3af7a510f9f51860895a46fd2e14752)
|
||||
- [Deps] update `es-abstract` [`9996d1c`](https://github.com/ljharb/internal-slot/commit/9996d1cf3507750c7a6845a2fb0d0f849ea898a1)
|
||||
|
||||
#### [v1.0.2](https://github.com/ljharb/internal-slot/compare/v1.0.1...v1.0.2)
|
||||
|
||||
> 20 December 2019
|
||||
|
||||
- [Deps] update `es-abstract`, `side-channel` [`5c9df03`](https://github.com/ljharb/internal-slot/commit/5c9df03a25518f5c482cff4e1447a26fa071df9a)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7820f98`](https://github.com/ljharb/internal-slot/commit/7820f984e523a64ddf3068c4e5631abf61eb1ea4)
|
||||
|
||||
#### [v1.0.1](https://github.com/ljharb/internal-slot/compare/v1.0.0...v1.0.1)
|
||||
|
||||
> 1 December 2019
|
||||
|
||||
- [Refactor] use `side-channel` package [`d38639f`](https://github.com/ljharb/internal-slot/commit/d38639f0a3cdb5090711179d0e78df857ecbd5d3)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`74267e6`](https://github.com/ljharb/internal-slot/commit/74267e6e591e18ba39186cb99139d3fd7a757c9f)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest` [`b042eef`](https://github.com/ljharb/internal-slot/commit/b042eefc067b830bbd370833f7f21754e802b0b2)
|
||||
- [Deps] update `es-abstract` [`98cf4e8`](https://github.com/ljharb/internal-slot/commit/98cf4e86c1bfe99eda7b11a8ea70394368f33e4f)
|
||||
|
||||
#### v1.0.0
|
||||
|
||||
> 20 October 2019
|
||||
|
||||
- Tests [`b50fa41`](https://github.com/ljharb/internal-slot/commit/b50fa41b6f47aba39ac4cb733658580974a0b00a)
|
||||
- implementation [`c5a59f3`](https://github.com/ljharb/internal-slot/commit/c5a59f3753677f81aa12a0226d3b1187846d06dd)
|
||||
- Initial commit [`15ebe4d`](https://github.com/ljharb/internal-slot/commit/15ebe4dc6d46885f67969d64c9c3e705780963f8)
|
||||
- readme [`382a3f5`](https://github.com/ljharb/internal-slot/commit/382a3f53d8975e6488373a0fc2abcdc7c4c44247)
|
||||
- npm init [`d5e7c97`](https://github.com/ljharb/internal-slot/commit/d5e7c977ef694e89c245fd11165f63c06a7a5040)
|
||||
- [meta] add FUNDING.yml [`685b608`](https://github.com/ljharb/internal-slot/commit/685b6087613f6735f4411a558500d92f8a3ec3f2)
|
||||
- [meta] add `auto-changelog`, `safe-publish-latest` [`f8fdf1c`](https://github.com/ljharb/internal-slot/commit/f8fdf1c3f0c592f71746da6d7f8bea18f8946dda)
|
||||
- [Tests] add `npm run lint` [`baaaa09`](https://github.com/ljharb/internal-slot/commit/baaaa09ab6e5bc5fcc0e7c76e10c55aa18f4ca7e)
|
||||
- Only apps should have lockfiles [`dfa7efa`](https://github.com/ljharb/internal-slot/commit/dfa7efa3d5cd23261cb75c2adab6ee3c06790fee)
|
21
web/node_modules/internal-slot/LICENSE
generated
vendored
Normal file
21
web/node_modules/internal-slot/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 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.
|
52
web/node_modules/internal-slot/README.md
generated
vendored
Normal file
52
web/node_modules/internal-slot/README.md
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
# internal-slot <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Truly private storage, akin to the JS spec’s concept of internal slots.
|
||||
|
||||
Uses a WeakMap when available; a Map when not; and a regular object in even older engines. Performance and garbage collection behavior will reflect the environment’s capabilities accordingly.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var SLOT = require('internal-slot');
|
||||
var assert = require('assert');
|
||||
|
||||
var o = {};
|
||||
|
||||
assert.throws(function () { SLOT.assert(o, 'foo'); });
|
||||
|
||||
assert.equal(SLOT.has(o, 'foo'), false);
|
||||
assert.equal(SLOT.get(o, 'foo'), undefined);
|
||||
|
||||
SLOT.set(o, 'foo', 42);
|
||||
|
||||
assert.equal(SLOT.has(o, 'foo'), true);
|
||||
assert.equal(SLOT.get(o, 'foo'), 42);
|
||||
|
||||
assert.doesNotThrow(function () { SLOT.assert(o, 'foo'); });
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
## Security
|
||||
|
||||
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
||||
|
||||
[package-url]: https://npmjs.org/package/internal-slot
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/internal-slot.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/internal-slot.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/internal-slot
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/internal-slot/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/internal-slot#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/internal-slot.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/internal-slot.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/internal-slot.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=internal-slot
|
59
web/node_modules/internal-slot/index.js
generated
vendored
Normal file
59
web/node_modules/internal-slot/index.js
generated
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var has = require('has');
|
||||
var channel = require('side-channel')();
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var SLOT = {
|
||||
assert: function (O, slot) {
|
||||
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
||||
throw new $TypeError('`O` is not an object');
|
||||
}
|
||||
if (typeof slot !== 'string') {
|
||||
throw new $TypeError('`slot` must be a string');
|
||||
}
|
||||
channel.assert(O);
|
||||
},
|
||||
get: function (O, slot) {
|
||||
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
||||
throw new $TypeError('`O` is not an object');
|
||||
}
|
||||
if (typeof slot !== 'string') {
|
||||
throw new $TypeError('`slot` must be a string');
|
||||
}
|
||||
var slots = channel.get(O);
|
||||
return slots && slots['$' + slot];
|
||||
},
|
||||
has: function (O, slot) {
|
||||
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
||||
throw new $TypeError('`O` is not an object');
|
||||
}
|
||||
if (typeof slot !== 'string') {
|
||||
throw new $TypeError('`slot` must be a string');
|
||||
}
|
||||
var slots = channel.get(O);
|
||||
return !!slots && has(slots, '$' + slot);
|
||||
},
|
||||
set: function (O, slot, V) {
|
||||
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
||||
throw new $TypeError('`O` is not an object');
|
||||
}
|
||||
if (typeof slot !== 'string') {
|
||||
throw new $TypeError('`slot` must be a string');
|
||||
}
|
||||
var slots = channel.get(O);
|
||||
if (!slots) {
|
||||
slots = {};
|
||||
channel.set(O, slots);
|
||||
}
|
||||
slots['$' + slot] = V;
|
||||
}
|
||||
};
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(SLOT);
|
||||
}
|
||||
|
||||
module.exports = SLOT;
|
63
web/node_modules/internal-slot/package.json
generated
vendored
Normal file
63
web/node_modules/internal-slot/package.json
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "internal-slot",
|
||||
"version": "1.0.3",
|
||||
"description": "ES spec-like internal slots",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublish": "safe-publish-latest",
|
||||
"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)\")\"",
|
||||
"pretest": "npm run lint",
|
||||
"lint": "eslint .",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/internal-slot.git"
|
||||
},
|
||||
"keywords": [
|
||||
"internal",
|
||||
"slot",
|
||||
"internal slot",
|
||||
"ecmascript",
|
||||
"es",
|
||||
"spec",
|
||||
"private",
|
||||
"data",
|
||||
"private data",
|
||||
"weakmap"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/internal-slot/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/internal-slot#readme",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^17.5.0",
|
||||
"aud": "^1.1.3",
|
||||
"auto-changelog": "^2.2.1",
|
||||
"eslint": "^7.18.0",
|
||||
"foreach": "^2.0.5",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.9.0",
|
||||
"safe-publish-latest": "^1.1.4",
|
||||
"tape": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.0",
|
||||
"has": "^1.0.3",
|
||||
"side-channel": "^1.0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false
|
||||
}
|
||||
}
|
120
web/node_modules/internal-slot/test/index.js
generated
vendored
Normal file
120
web/node_modules/internal-slot/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var inspect = require('object-inspect');
|
||||
var forEach = require('foreach');
|
||||
|
||||
var SLOT = require('../');
|
||||
|
||||
test('assert', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.assert(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.assert({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
t['throws'](
|
||||
function () { SLOT.assert({}, 'whatever'); },
|
||||
TypeError,
|
||||
'nonexistent slot throws'
|
||||
);
|
||||
|
||||
var o = {};
|
||||
SLOT.set(o, 'x');
|
||||
t.doesNotThrow(function () { SLOT.assert(o, 'x'); }, 'existent slot noops');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('has', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.has(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.has({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
var o = {};
|
||||
|
||||
t.equal(SLOT.has(o, 'nonexistent'), false, 'nonexistent slot yields false');
|
||||
|
||||
SLOT.set(o, 'foo');
|
||||
t.equal(SLOT.has(o, 'foo'), true, 'existent slot yields true');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('get', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.get(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.get({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
var o = {};
|
||||
t.equal(SLOT.get(o, 'nonexistent'), undefined, 'nonexistent slot is undefined');
|
||||
|
||||
var v = {};
|
||||
SLOT.set(o, 'f', v);
|
||||
t.equal(SLOT.get(o, 'f'), v, '"get" retrieves value set by "set"');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('set', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.set(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.set({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
var o = function () {};
|
||||
t.equal(SLOT.get(o, 'f'), undefined, 'slot not set');
|
||||
|
||||
SLOT.set(o, 'f', 42);
|
||||
t.equal(SLOT.get(o, 'f'), 42, 'slot was set');
|
||||
|
||||
SLOT.set(o, 'f', Infinity);
|
||||
t.equal(SLOT.get(o, 'f'), Infinity, 'slot was set again');
|
||||
|
||||
t.end();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue