1. @ephox/katamari
Basic data type library
@ephox/katamari
Package: @ephox/katamari
Created by: tinymce
Last modified: Tue, 06 Feb 2024 17:11:40 GMT
Version: 9.1.6
License: MIT
Downloads: 16,866
Repository: https://github.com/tinymce/tinymce

Install

npm install @ephox/katamari
yarn add @ephox/katamari

Description

katamari is a collection of various data structures and reusable higher-order functions. It does not bundle any commands. It is only a collection of modules.

Installation

katamari is available as an npm package. You can install it via the npm package @ephox/katamari

Install from npm

npm install @ephox/katamari.

Usage

Note, refrain from using any modules that are not in the api package.

Below is a list of commonly used parts of katamari

Data Structures

Optional Data Types

  • Optional: A representation of None or Some(x)
  • Result: A representation of Error(str) or Value(v)

Asynchronous Data Types

  • Future: An abstraction over an asynchronous value
  • FutureResult: A composition of a Result and a Future
  • LazyValue: An asynchronous value that is only calculated once

Mutable Data Types

  • Cell: A mutable piece of data
  • Singleton: A mutable piece of optional data

Algebraic Data Types

Higher-order Functions

  • Arr: collection of functions that operate on arrays
  • Obj: collection of functions that operate on JavaScript objects
  • Merger: collection of functions to merge JavaScript objects

Tests

katamari uses bedrock to run atomic tests. The tests are chiefly written using fast-check

Running Tests

$ yarn test

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code