[READ-ONLY] Mirror of https://github.com/okikio/native. An initiative which aims to make it easy to create complex, light-weight, and perfor okikio.github.io/native
native src pages manager index.md
3.5 kB · 109 lines
Markdown
at beta

--- layout: layout:PagesLayout --- # @okikio/manager [NPM](https://www.npmjs.com/package/@okikio/manager) <span style="padding-inline: 1rem">|</span> [Github](https://github.com/okikio/native/tree/beta/packages/manager#readme) <span style="padding-inline: 1rem">|</span> [API Guide](/docs/manager/api.md) <span style="padding-inline: 1rem">|</span> [Licence](/packages/manager/LICENSE) A superset of the Map class, it extends the Map classes capabilities with awesome new features; it weighs **~325 B** (minified and gzipped). ## Getting started The `Manager` class makes Maps easier to use, as well as adding 7 methods, **getMap**, **last**, **methodCall**, **add**, **remove**, **keys** and **values**, (**methodCall** is a separate method from the `Manager` class, so treeshaking can get rid of it, if it isn't need). > _**Note**: the behavior of the keys and values methods are slightly modified, to return an Array of keys/values instead of an iterator. You can get the keys and values original effects by using `.getMap().keys()` or `.getMap().values()`._ ### Installation You can install [@okikio/manager](/docs/manager/) from [npm](https://www.npmjs.com/package/@okikio/manager) via ```bash npm i @okikio/manager ``` <details> <summary>Others</summary> ```bash yarn add @okikio/manager ``` or ```bash pnpm i @okikio/manager ``` </details> <br/> You can use `@okikio/manager` on the web via: - [https://unpkg.com/@okikio/manager](https://unpkg.com/@okikio/manager) - [https://cdn.skypack.dev/@okikio/manager](https://cdn.skypack.dev/@okikio/manager) - [https://cdn.jsdelivr.net/npm/@okikio/manager](https://cdn.jsdelivr.net/npm/@okikio/manager) Once installed it can be used like this: ```typescript // There is, // .cjs - Common JS Module // .mjs - Modern ES Module // .js - UMD import { Manager } from "@okikio/manager"; import { Manager } from "https://unpkg.com/@okikio/manager"; import { Manager } from "https://cdn.jsdelivr.net/npm/@okikio/manager"; // Or import { Manager } from "https://cdn.skypack.…