funtool
A modern, efficient, and modular JavaScript utility library designed to enhance developer productivity.
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