🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@telegram.ts/collection

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telegram.ts/collection

Utility data structure used in telegramsjs

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

@telegram.ts/collection

NPM Version Bot API NPM Downloads License

@telegram.ts/collection is a TypeScript library that provides a collection of utility classes and functions for managing collections of data. It offers a set of data structures optimized for various use cases, such as managing lists, maps, and sets efficiently.

Features

  • Typed Collections: Benefit from TypeScript's type system with fully typed collections.
  • Efficient Data Management: Efficiently manage collections of data with optimized data structures.
  • Versatile Functionality: Access a wide range of utility functions for manipulating collections.

Installation

You can install @telegram.ts/collection via npm or yarn:

npm install @telegram.ts/collection
# or
yarn add @telegram.ts/collection

Usage

import { Collection } from "@telegram.ts/collection";

// Create a new collection
const myCollection = new Collection<string, number>();

// Add items to the collection
myCollection.set("key1", 1);
myCollection.set("key2", 2);

// Retrieve an item from the collection
const value = myCollection.get("key1");
console.log(value); // Output: 1

// Iterate over the collection
myCollection.forEach((value, key) => {
  console.log(`${key}: ${value}`);
});

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please create a GitHub issue or submit a pull request. Additionally, feel free to reach out to me on Telegram via my username @SempaiJS or on Discord using my username sempaika_chess.

Keywords

javascript

FAQs

Package last updated on 02 May 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