Skip to content

Integrate the functions commonly used in the project

License

Notifications You must be signed in to change notification settings

sishen654/mazp-util

Repository files navigation

@mazp/util

Introduce

Integrate the functions commonly used in the project.

Install

npm i @mazp/util
yarn add @mazp/util
pnpm i @mazp/util

Usage

// ESM
import util from "@mazp/util";
util.formatTime(1671198728746)
// CJS
let util = require("@mazp/util");
util.formatTime(1671198728746)

API

formatTime

Transform timeStamp to a standard format like 2022-12-16-21-52-8.

declare function formatTime(time: number): string;

randomChars

Randomly generate your input parameter length, which is a [a-z][A-Z] composition string.

declare function randomChars(len: number): string;

About

Integrate the functions commonly used in the project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published