@miop/common-utils
v0.0.1
Published
Merge functional methods in the project
Downloads
4
Readme
@miop/common-utils
Merge functional methods in the project
Using
npm i @miop/common-utils
Common Methods
import { getUniqueId, getRandomString, isValidUrl, resolveExt } from '@miop/common-utils';
// getUniqueId() => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
// getUniqueId(true) => xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx
// getRandomString(32) => xxxxxxxxxxxxyxxxyxxxxxxxxxxxxxxx
// isValidUrl('https://www.apiyux.com')
// resolveExt('aa.png')
Date Format
import { getDateFormat } from '@miop/common-utils';
// getDateFormat(null, 'yyyy-MM-dd hh:mm:ss');
Tags Format
import { fmtTags, removeHTMLTag } from '@miop/common-utils';
Strings Format
import { trimAll, trimLeft, trimRight, trimLR, strTrimAll, strTrimLR } from '@miop/common-utils';