# @dwlib/internal-slots

> Internal Slots

Latest version **1.0.4** (published 2022-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dwlib/internal-slots
pnpm add @dwlib/internal-slots
yarn add @dwlib/internal-slots
bun add @dwlib/internal-slots
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-03-29 |
| First published | 2022-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Pavel Wolf |
| Maintainers | pavelwolfdark |
| Keywords | internal, slots |

## Links

- npm: https://www.npmjs.com/package/@dwlib/internal-slots
- Repository: https://github.com/dwlib-js/internal-slots
- Homepage: https://github.com/dwlib-js/internal-slots#readme
- Issues: https://github.com/dwlib-js/internal-slots/issues
- npm.io page: https://npm.io/package/@dwlib/internal-slots

## Dependencies (3)

- [@dwlib/abstract](https://npm.io/package/@dwlib/abstract.md) ^1.0.8
- [@dwlib/intrinsics](https://npm.io/package/@dwlib/intrinsics.md) ^1.0.4
- [@dwlib/primordials](https://npm.io/package/@dwlib/primordials.md) ^1.0.4

## Recent versions

- 1.0.4 (latest) — 2022-03-29
- 1.0.3 — 2022-03-24
- 1.0.2 — 2022-03-23
- 1.0.1 — 2022-03-12
- 1.0.0 — 2022-02-23

## README

# Internal Slots

## Install
`npm i --save @dwlib/internal-slots`

## Usage
```javascript
/** Module */
// CJS
const InternalSlots = require('@dwlib/internal-slots');
const InternalSlotsAssign = require('@dwlib/internal-slots/assign');
const InternalSlotsDelete = require('@dwlib/internal-slots/delete');
const InternalSlotsGet = require('@dwlib/internal-slots/get');
const InternalSlotsHas = require('@dwlib/internal-slots/has');
const InternalSlotsSet = require('@dwlib/internal-slots/set');
const DeleteInternalSlot = require('@dwlib/internal-slots/abstract/DeleteInternalSlot');
const GetInternalSlot = require('@dwlib/internal-slots/abstract/GetInternalSlot');
const GetInternalSlotOrThrow = require('@dwlib/internal-slots/abstract/GetInternalSlotOrThrow');
const HasInternalSlot = require('@dwlib/internal-slots/abstract/HasInternalSlot');
const RequireInternalSlot = require('@dwlib/internal-slots/abstract/RequireInternalSlot');
const SetInternalSlot = require('@dwlib/internal-slots/abstract/SetInternalSlot');
// ESM
import InternalSlots from '@dwlib/internal-slots';
import InternalSlotsAssign from '@dwlib/internal-slots/assign';
import InternalSlotsDelete from '@dwlib/internal-slots/delete';
import InternalSlotsGet from '@dwlib/internal-slots/get';
import InternalSlotsHas from '@dwlib/internal-slots/has';
import InternalSlotsSet from '@dwlib/internal-slots/set';
import DeleteInternalSlot from '@dwlib/internal-slots/abstract/DeleteInternalSlot';
import GetInternalSlot from '@dwlib/internal-slots/abstract/GetInternalSlot';
import GetInternalSlotOrThrow from '@dwlib/internal-slots/abstract/GetInternalSlotOrThrow';
import HasInternalSlot from '@dwlib/internal-slots/abstract/HasInternalSlot';
import RequireInternalSlot from '@dwlib/internal-slots/abstract/RequireInternalSlot';
import SetInternalSlot from '@dwlib/internal-slots/abstract/SetInternalSlot';

const target = {};
InternalSlots.assign(target, {
  text: 'Ave, Darkwolf!'
});
InternalSlots.get(target, 'text'); // => 'Ave, Darkwolf!'
InternalSlots.get(target, 'key'); // => undefined
InternalSlots.get(target, 'key', true); // throws TypeError
InternalSlots.set(target, 'test', true);
InternalSlots.has(target, 'test'); // => true
InternalSlots.delete(target, 'test'); // => true
```

---
_Source: https://npm.io/package/@dwlib/internal-slots · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
