English | 简体中文
funtool
is a modern, modular JavaScript utility library designed to boost developer productivity. It offers well-organized modules, full TypeScript support, and an automated documentation system, making it suitable for multilingual projects, web applications, Node.js environments, and more. This project is a complete refactor of an older utility library, with versioning reset. Written in TypeScript, it features a cleaner structure, enhanced flexibility, and a more robust documentation system. funtool
provides type-safe, reusable utility functions that significantly improve development efficiency for both JavaScript and TypeScript projects.
📚 Documentation
👉 View Full Docs »
- 🚀 Boost Productivity: Standardizes common logic to avoid reinventing the wheel, letting developers focus on core business logic.
- 🌈 Modular Design: Import only what you need—such as
array
,object
,string
, ortype
modules—to keep bundle size minimal. - 🔍 Type Safety: Built with TypeScript, offering comprehensive type declarations and seamless IDE integration for a smoother development experience.
- 🧪 Robust Test Coverage: High test coverage ensures the library's reliability and stability.
- 🧱 Progressive Integration: Use it fully or integrate specific modules on demand.
- 🔧 Automated Release Workflow: Supports semantic versioning, changelog generation, pre-releases, dry runs, and more.
npm install funtool
# or
pnpm add funtool
import { isString } from 'funtool/type';
import { isNumber } from 'funtool';
console.log(isNumber(1)); // ✅ true
console.log(isString('hello')); // ✅ true
import { regex } from 'funtool';
const mobile = "13800138000";
console.log(
regex.checker(mobile).use('mobile').isValid()
); // ✅ true
src/
├── array/ # Array utilities
├── common/ # Common/shared utilities
├── function/ # Function-related utilities
├── object/ # Object utilities
├── regex/ # Regular expression utilities
├── string/ # String utilities
├── type/ # Type checking utilities
├── version.ts # Version information
└── index.ts # Main entry point
npm run dev
npm run build
npm run test
npm run generate:module
pnpm run release
You can explore more advanced usage, module API reference, and examples in the official documentation: 👉 Docs
Copyright (c) 2019-present xiaoqiujun