Basic data type library


9,7217738.0.125 days ago5 years agoMinified + gzip package size for @ephox/katamari in KB



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.


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

Install from npm

npm install @ephox/katamari.


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


katamari uses bedrock to run atomic tests. The tests are chiefly written using jsverify

Running Tests

$ yarn test

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.