jie-dash
v1.0.1
Published
A simple lodash-like utility library (pure JS)
Maintainers
Readme
jie-dash
A lightweight utility library with lodash-style helpers for everyday frontend work.
Features
- Pure JavaScript utility collection
- ESM, CommonJS, and UMD bundles
- TypeScript declaration output
- Helpers for arrays, dates, colors, files, auth, images, trees, and more
Installation
npm install jie-dashUsage
Named import
import { chunk, formatDate, listToTree } from "jie-dash";
const groups = chunk([1, 2, 3, 4], 2);
const today = formatDate(new Date(), "yyyy-MM-dd");
const tree = listToTree([
{ id: 1, parentId: 0, name: "Root" },
{ id: 2, parentId: 1, name: "Child" },
]);Default import
import jieDash from "jie-dash";
jieDash.chunk([1, 2, 3, 4], 2);
jieDash.maskPhone("13812345678");
jieDash.listToTree([
{ id: 1, parentId: 0, name: "Root" },
{ id: 2, parentId: 1, name: "Child" },
]);Browser UMD
<script src="https://cdn.jsdelivr.net/npm/jie-dash/dist/index.umd.js"></script>
<script>
const result = $jie.chunk([1, 2, 3, 4], 2);
console.log(result);
</script>Modules
array: chunking, grouping, sorting, lookup helperscolor: color inspection and conversiondate: formatting and relative time helpersfile: file type and file size helpersdesensitization: phone, name, email, and bank card maskingother: clone, debounce, throttle, object helpers, UUID, tree shapingimage: URL validation and safe image helpersauth: token helpers based onjs-cookietree: list/tree conversion helpers
Repository
Source: https://gitee.com/ckjwq/jie-dash
git clone https://gitee.com/ckjwq/jie-dash.gitllms.txt (for AI assistants)
The file lives in the Git repo, not at the site root. https://gitee.com/ckjwq/jie-dash/llms.txt returns 404 on Gitee.
Use one of these instead:
- Raw (for tools to fetch): raw/dev-jie-dash/llms.txt
- Browse in UI: blob/dev-jie-dash/llms.txt
- After npm publish:
https://unpkg.com/jie-dash/llms.txt
To serve /llms.txt at a domain root, enable Gitee Pages and put llms.txt in the Pages site root.
Publish to npm
One-time setup: npm signup, enable 2FA, then:
npm login --registry=https://registry.npmjs.org/Publish (builds via prepublishOnly, then uploads to npm):
npm run publishIf 2FA asks for a code:
npm run publish -- --otp=123456Push to Gitee only (no npm): npm run publish:git
Build
npm run buildGenerated files:
dist/index.esm.mjsdist/index.cjs.jsdist/index.umd.jsdist/index.d.ts
License
MIT
