Get Started
Welcome to Fuji.ts!
Fuji.ts is a fast, modern TypeScript utility collection. It contains simple yet robust utilities for everyday use, has zero dependencies, and is bundled to tree-shakable ES modules.
Why Fuji.ts
While utility libraries like lodash and es-toolkit bring brilliant functions we need, they also include tons of meaningless things like at, fill or trim.
As I'm not a fan of functional programming, these functions are often redundant because there exist native equivant JavaScript methods, or I can simply write a little more code to achieve my goal.
What we actually want is just a part from those libraries, like debounce, shuffle and chunk. It will be annoying if we rewrite them every time in different codebases, and that's the philosophy of Fuji.ts - to provide simple, commonly used and reusable helpers.
Fuji.ts is more like a shared library across your projects, rather than just utilities.
Installation
Node.js
You can install Fuji.ts on Node.js via NPM:
npm i fujitsIf you have a bundler, it's recommended to install fujits under devDependencies (i.e. --save-dev).
Since Fuji.ts provides tiny helper functions, doing so will improve performance becase you actually bundle Fuji.ts into your code. However, you can certainly keep fujits under your dependencies.
Deno
You can install Fuji.ts on Deno via JSR:
deno add @fujits/fujitsCDN
Fuji.ts is only bundled in ESM format, so you can install it using the following method:
<script type="importmap">
{
"imports": {
"fujits": "https://esm.sh/fujits@latest"
}
}
</script>
<script type="module">
import { debounce } from 'fujits';
// ...
</script>Prerequisites
Technically and hopefully speaking, Fuji.ts is compatible with the most of JavaScript environments, for it uses few modern JS features. However, we suggest you to check the prerequisites below to ensure Fuji.ts works properly:
- Node.js
>=18(or equivant runtime version) - Browser:
- Chrome
>=89 - Firefox
>=108 - Safari
>=16.4 - Opera
>=76
- Chrome
For TypeScript, Fuji.ts is designed to use with TS >=5.4.
Usage
Import utilities from fujits, enjoy!
Read references for more details on using Fuji.ts.
Last updated on