1.2.2 • Published 3 years ago

sims-tool v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

sims-tool

sims-tool is a basic tool library, provide common methods used in development. Simple and Clear.

安装

npm install --save sims-tool
or
yarn add sims-tool

Use

Node const $tool = require("sims-tool")

Vue or React
import $tool from 'sims-tool'

Methods

escapeStr(string)

provide a the escaped string, escaped it and return it. case: >,return >

escapeDate(date)

provide a Date or String, format it to yyyy-mm-dd hh:mm:ss and return it

createUid()

return a the unique id

subDate(startDate,endDate)

subtract the two date return time difference

isPhone(str)

check phone format return boolean

trimEnd(str)

removes the character specified at the end of the string

isEmpty(arg)

judge a variable whether is empty

vue global registration

import $tool from 'sims-tool'
vue.prototype.$tool = $tool
1.2.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago