Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via pnpm
Package summary
Share
0
issues
1
license
16
MIT
Package created
21 Oct 2019
Version published
9 Feb 2023
Maintainers
1
Total deps
16
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
16 Packages, Including:
call-bind@1.0.7
define-data-property@1.1.4
es-define-property@1.0.0
es-errors@1.3.0
function-bind@1.1.2
get-intrinsic@1.2.4
gopd@1.0.1
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
has@1.0.4
hasown@2.0.2
internal-slot@1.0.5
object-inspect@1.13.1
set-function-length@1.2.2
side-channel@1.0.6
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of internal-slot 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
get-intrinsic1.2.412.21 kBMIT
prod
has1.0.41.59 kBMIT
prod
side-channel1.0.622.7 kBMIT
prod

Visualizations

Frequently Asked Questions

What does internal-slot do?

Internal-Slot is a functional npm package created to provide truly private storage, like the internal slots concept in JavaScript specification. It aims to act as a secure and private storage medium when coding in JavaScript. The package utilizes a WeakMap when available, falls back to a Map if the WeakMap is not present, and finally resorts to a standard object in older engines. Precisely, it tailors its performance and garbage collection behavior according to the environment's capabilities.

How do you use internal-slot?

To use the internal-slot package, you first need to install it via npm, deploy it into your JavaScript code, and use its functions as accordingly. Here is a basic code snippet illustrating how to work with internal-slot:

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'); });

In this code, you're first requiring the internal-slot package and then assigning an empty object to a variable. You can use the SLOT.set method to store data (42 in this case) with a key value ('foo' in this case). Similarly, SLOT.get and SLOT.has help you fetch and verify the data respectively.

Where are the internal-slot docs?

You can find the documentation and further usage details for the internal-slot package on the GitHub repository page linked in the README. Explore the git+https://github.com/ljharb/internal-slot.git URL for a detailed overview. Currently, the README file of the package serves as the primary source of documentation. Be sure to check out this GitHub repository to get deeper insights into installation, usage, and test scenarios associated with this package.