Skip to content

JavaScript UtilsModern JavaScript utility library

Type-safe, Tree Shaking optimized, and developer-friendly

JavaScript Utils

Quick Start

bash
# Install
npm install @tofrankie/utils
# or
pnpm add @tofrankie/utils
# or
yarn add @tofrankie/utils
typescript
// Use
import { debounce, throttle } from '@tofrankie/utils'

const debouncedFn = debounce(() => {
  console.log('Debounced execution')
}, 300)

const throttledFn = throttle(() => {
  console.log('Throttled execution')
}, 300)

Why JavaScript Utils?

  • 🎯 Focused: Each function has a single responsibility
  • 🔧 Practical: Functions you actually need in daily development
  • 📈 Performant: Optimized for speed and minimal bundle size
  • 🛡️ Type-safe: Full TypeScript support with intelligent hints
  • 🌳 Tree-shakable: Import only what you need
  • 📖 Well-documented: Complete documentation with examples
  • 🧪 Tested: Comprehensive test coverage with benchmarks

Bundle Size

Import MethodBundle SizeTree Shaking
import { debounce } from '@tofrankie/utils'~0.5KB
import { debounce, throttle } from '@tofrankie/utils'~1.0KB
import * as utils from '@tofrankie/utils'~15KB

Online Demo

Try JavaScript Utils in your browser without installation:

🎮 Open Playground

Community

基于 MIT 许可发布