This is a large library of many things that the Technobuddha has found useful over the years. There is a plethora of functions and classes for working with arrays, strings, numbers, dates, objects, and more. Ranging from the simple (clamp) to the complex (largestInscribedRectangle), this library has something for everyone.
| Group | Entities |
|---|---|
| Array | 7 Functions and 6 Types |
| Binary | 8 Classes, 13 Functions, and 2 Types |
| Geometry | 2 Constants, 43 Functions, and 12 Types |
| JSON | 2 Classes, 2 Constants, 2 Functions, and 4 Types |
| Math | 5 Constants, 32 Functions, and 12 Types |
| Object | 25 Functions and 1 Type |
| Programming | 20 Functions and 4 Types |
| Random | 1 Class, 4 Functions, and 1 Type |
| RegExp | 8 Constants and 7 Functions |
| String | 58 Functions and 21 Types |
| Time | 1 Class, 17 Constants, 28 Functions, and 12 Types |
| Unicode | 16 Constants, 5 Functions, and 2 Types |
| Utility | 1 Class |
Using npm:
npm install @technobuddha/libraryMost modern build systems will now do proper tree-shaking, so you can import only the functions you need:
import { plural, summarize } from '@technobuddha/library';
plural('mouse'); // 'mice'
summarize(Number.MAX_SAFE_INTEGER); // '9.01 quadrillion'The Technobuddha Library is released under the MIT license.
Dive into the Technobuddha Library documentation
The documentation is written by the Technobuddha assisted by AI. Some of what the AI has written is good, some not so much. If you find something that is incorrect or could be improved, please raise an issue or make a pull request.
In one form or another, this library has been around since the later part of the 20th century. I ported my library to Typescript in 2021, version 2 brings many improvements and new features, as well as a complete rewrite of the documentation.
