npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mcswift/utils

v1.0.19

Published

[English](#english) | [中文](#中文)

Readme

@mcswift/utils

English | 中文


中文

@mcswift/utils 是一个聚合包,它重新导出了 @mcswift 命名空间下所有基础工具库的功能,方便开发者一次性安装并按需引入各类工具。

安装

npm install @mcswift/utils
# or
pnpm add @mcswift/utils

功能模块与导出路径

为了减小打包体积,所有的子包都通过 exports 进行了路径映射。你可以通过如下方式引入对应模块的功能:

1. 基础工具 (@mcswift/base-utils)

包括了队列调度、日志打印、对象处理等通用工具。

import { Scheduler, Logger, deepFreeze } from "@mcswift/utils/common";

2. Node.js 工具 (@mcswift/node)

包括了文件路径解析、子进程处理、系统 Path 变量解析等。

import { getAbsolutePath, getFilePaths, child_process } from "@mcswift/utils/node";

3. Windows 特有工具 (@mcswift/windows)

封装了在 Windows 系统下执行的特有操作。

import { windows } from "@mcswift/utils/windows";

4. CLI 构建工具 (@mcswift/cli)

用于快速构建命令行应用的类和方法。

import { Cli, Command } from "@mcswift/utils/cli";

其他子包

像 esbuild、npm、svn、tsc 等功能也被默认导出在了根路径下,你可以直接从 @mcswift/utils 中导入:

import { NpmPackage, Svn, generatorDeclare } from "@mcswift/utils";

详细的模块 API 请参考对应子包的 README 文档。


English

@mcswift/utils is an aggregated package that re-exports all the features of the foundational utility libraries under the @mcswift namespace. This allows developers to install once and import various tools on demand.

Installation

npm install @mcswift/utils
# or
pnpm add @mcswift/utils

Feature Modules and Export Paths

To reduce bundle size, all sub-packages are mapped using the exports field. You can import features from specific modules as follows:

1. Base Utilities (@mcswift/base-utils)

Includes common tools like queue schedulers, loggers, and object manipulation.

import { Scheduler, Logger, deepFreeze } from "@mcswift/utils/common";

2. Node.js Utilities (@mcswift/node)

Includes file path resolution, child process handling, system Path variable parsing, etc.

import { getAbsolutePath, getFilePaths, child_process } from "@mcswift/utils/node";

3. Windows Specific Utilities (@mcswift/windows)

Encapsulates specific operations executed on Windows systems.

import { windows } from "@mcswift/utils/windows";

4. CLI Build Utilities (@mcswift/cli)

Classes and methods for quickly building command-line applications.

import { Cli, Command } from "@mcswift/utils/cli";

Other Sub-packages

Features like esbuild, npm, svn, tsc, etc., are also exported at the root level by default. You can import them directly from @mcswift/utils:

import { NpmPackage, Svn, generatorDeclare } from "@mcswift/utils";

For detailed module APIs, please refer to the README documentation of the respective sub-packages.