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

kr-corekit

v1.0.0

Published

A lightweight and modern utility toolkit for JavaScript and TypeScript. kr-corekit provides essential functions for strings, arrays, objects, and more, designed for simplicity and productivity.

Readme

kr-corekit

语言: English | 한국어 | 简体中文 | 日本語

一个为 JavaScript/TypeScript 打造的工具函数库,强调清晰且实用的 API 设计。

主要特性

  • 覆盖字符串、数组、对象、异步、Promise、日期、数学、语言等 130+ 函数
  • 适合 Tree-shaking 的模块导出结构
  • 提供 TypeScript .d.ts 类型
  • 提供 ESM/CJS 打包产物

安装

npm install kr-corekit
# or
pnpm add kr-corekit
# or
yarn add kr-corekit

快速示例

import {
  stringUtil,
  arrayUtil,
  objectUtil,
  asyncUtil,
  promiseUtil,
  dateUtil,
  mathUtil,
  langUtil,
} from "kr-corekit";

const id = stringUtil.camelCase("user profile id");
const rows = arrayUtil.chunk([1, 2, 3, 4, 5], 2);
const city = objectUtil.get({ user: { profile: { city: "Seoul" } } }, "user.profile.city");

const mapped = await asyncUtil.mapAsync([1, 2, 3], async (v) => v * 2);
const safe = await promiseUtil.withTimeout(fetch("/api/health"), 1000);

const tomorrow = dateUtil.addDays(new Date(), 1);
const average = mathUtil.mean([10, 20, 30]);
const enabled = langUtil.toBoolean("yes");

模块

  • stringUtil: 大小写转换、HTML escape/unescape、truncate、slugify
  • arrayUtil: chunk、flatten、uniq/uniqBy、groupBy、sortBy、集合运算、抽样
  • collectionUtil: 面向数组/对象的 map/filter/reduce/find/every/some/includes
  • objectUtil: get/set/has/merge/defaults/pick/omit/deepClone/deepFreeze
  • numberUtil: clamp、inRange、random、ceil/floor/round、sum/subtract/multiply
  • mathUtil: mean/median/min/max/sumBy/minBy/maxBy
  • dateUtil: 日期加减、当天起止、formatDate、日期比较
  • langUtil: toBoolean/toNumber/toString/defaultTo/castArray/isEqual
  • asyncUtil: pLimit、mapAsync、filterAsync、eachAsync、series、parallel
  • promiseUtil: defer、withTimeout、retryWithDelay、settle、toResult
  • 其他模块: commonUtil, functionUtil, validationUtil, formatUtil, typeUtil, cookieUtil, deviceUtil, searchQueryUtil

Tree-Shaking 导入

import { camelCase } from "kr-corekit/stringUtil";
import { chunk } from "kr-corekit/arrayUtil";
import { get } from "kr-corekit/objectUtil";
import { mapAsync } from "kr-corekit/asyncUtil";
import { withTimeout } from "kr-corekit/promiseUtil";

完整 API 示例

基准测试

npm run benchmark

该命令会在构建后执行本地微基准脚本 benchmark/index.mjs

最新本地样例(2026-02-25):

array.chunk       ~1,065,050 ops/s
object.get        ~2,681,055 ops/s
string.camelCase  ~1,902,407 ops/s
async.mapAsync    ~1,514,005 ops/s

说明

  • 完整 API 可查看 package/*/index.tsdist/types/*/index.d.ts
  • 若继续扩展函数文档,请同步更新多语言 README。

许可证

MIT