Socket
Book a DemoInstallSign in
Socket

@hqtsm/meek

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hqtsm/meek

Weak data collections without the limitations

1.0.5
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

HQTSM: Meek

Weak data collections without the limitations

weakset weakmap weakvaluemap enumerable iterable collection

JSR npm CI

Features

  • Pure TypeScript, run anywhere
  • Enumerable WeakSet: MeekSet
  • Enumerable WeakMap: MeekMap
  • WeakValueMap: MeekValueMap
  • Designed to be as compatible with the native collection types as possible
  • Do almost anything you can with regular collections with weak collections

Usage

MeekSet

import { MeekSet } from '@hqtsm/meek';

const values = [{ a: 1 }, { b: 2 }, { c: 3 }];
const set = new MeekSet(values);
console.assert(JSON.stringify([...set]) === JSON.stringify(values));

MeekMap

import { MeekMap } from '@hqtsm/meek';

const values: [{ i: number }, number][] = [
	[{ i: 0 }, 1],
	[{ i: 1 }, 2],
	[{ i: 2 }, 3],
];
const map = new MeekMap(values);
console.assert(JSON.stringify([...map]) === JSON.stringify(values));

MeekValueMap

import { MeekValueMap } from '@hqtsm/meek';

const values: [number, { i: number }][] = [
	[1, { i: 0 }],
	[2, { i: 1 }],
	[3, { i: 2 }],
];
const map = new MeekValueMap(values);
console.assert(JSON.stringify([...map]) === JSON.stringify(values));

Keywords

weakset

FAQs

Package last updated on 17 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.