@artstesh/collections
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@artstesh/collections

Overview

The basic set of collections for the typescript.

Queue

// interface Student {name: string, age: number}
it("take success", () => {
  const queue = new Queue<string>();
  const item = Forger.create<string>()!;
  //
  queue.put(item);
  const took = queue.take();
  //
  should().string(took).equals(item);
});

Dictionary

// interface Student {name: string, age: number}
it("take success", () => {
  const dictionary = new Dictionary<string>();
  const key = Forger.create<string>()!;
  const value = Forger.create<string>()!;
  dictionary.put(key, value);
  //
  const took = queue.key();
  //
  should().string(took).equals(value);
});

License

This project is under the MIT license

Package Sidebar

Install

npm i @artstesh/collections

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

12.6 kB

Total Files

15

Last publish

Collaborators

  • artstesh