@mathigon/core
TypeScript icon, indicating that this package has built-in type declarations

1.1.17 • Public • Published

Core.ts

Build Status npm npm

Core.ts is a library of TypeScript utility function and classes, including array and string helpers, function wrappers and event classes. It was developed for Mathigon.org, an award-winning mathematics education project.

Features

  • Function wrappers for caching and throttling (cache(), throttle())
  • Array generation (tabulate(), repeat(), list())
  • Array utilities (total(), flatten(), chunk(), intersect(), …)
  • String utilities (toCamelCase(), isPalindrome(), autoCorrect(), …)
  • Event Target class, supporting .on(), .off() and .trigger() methods
  • Color parsing, conversion and interpolation
  • Misc utilities (uid(), isOneOf(), …)

Usage

First, install Core.ts from NPM using

npm install @mathigon/core

Now, simply import all functions and classes you need, using

import {tabulate, toCamelCase, EventTarget} from '@mathigon/core'

Contributing

We welcome community contributions: please file any bugs you find or send us pull requests with improvements. You can find out more on Mathigon.io.

Before submitting a pull request, you will need to sign the Mathigon Individual Contributor License Agreement.

Copyright and License

Copyright © Mathigon (dev@mathigon.org)
Released under the MIT license

Package Sidebar

Install

npm i @mathigon/core

Weekly Downloads

3,261

Version

1.1.17

License

MIT

Unpacked Size

174 kB

Total Files

33

Last publish

Collaborators

  • plegner