You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Eterlaze 3ef3bdc921
Vue与Idea
4 months ago
..
.github Vue与Idea 4 months ago
test Vue与Idea 4 months ago
.editorconfig Vue与Idea 4 months ago
.eslintignore Vue与Idea 4 months ago
.eslintrc Vue与Idea 4 months ago
.nycrc Vue与Idea 4 months ago
CHANGELOG.md Vue与Idea 4 months ago
LICENSE Vue与Idea 4 months ago
README.md Vue与Idea 4 months ago
index.js Vue与Idea 4 months ago
package.json Vue与Idea 4 months ago

README.md

internal-slot Version Badge

dependency status dev dependency status License Downloads

npm badge

Truly private storage, akin to the JS specs 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 environments capabilities accordingly.

Example

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 or see https://tidelift.com/security if you have a potential security vulnerability to report.