๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket
Book a DemoInstallSign in
Socket

funtool

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

funtool

A modern, efficient, and modular JavaScript utility library designed to enhance developer productivity.

1.1.0
latest
Source
npm
Version published
Weekly downloads
14
-80.56%
Maintainers
1
Weekly downloads
ย 
Created
Source

๐Ÿงฐ funtool - A Modern Modular Utility Library

English | ็ฎ€ไฝ“ไธญๆ–‡

๐Ÿ“Œ 1. Introduction

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 ยป

โœจ 2. Features

  • ๐Ÿš€ 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, or type 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.

โš™๏ธ 3. Getting Started

Installation

npm install funtool
# or
pnpm add funtool

๐Ÿ’ก 4. Usage Examples

Type Checking

import { isString } from 'funtool/type';
import { isNumber } from 'funtool';

console.log(isNumber(1)); // โœ… true
console.log(isString('hello')); // โœ… true

Regex Utilities

import { regex } from 'funtool';

const mobile = "13800138000";
console.log(
  regex.checker(mobile).use('mobile').isValid()
); // โœ… true

๐Ÿงฑ 5. Module Structure

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

๐Ÿ”จ 6. Build & Release

Start Development

npm run dev

Build the Project

npm run build

Run Tests

npm run test

Generate Modules (No manual import needed)

npm run generate:module

Release a New Version

pnpm run release

๐Ÿ“„ 7. License

MIT

๐Ÿ“š 8. Docs

You can explore more advanced usage, module API reference, and examples in the official documentation: ๐Ÿ‘‰ Docs

Copyright (c) 2019-present xiaoqiujun

Keywords

utility

FAQs

Package last updated on 16 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts