0.1.22 • Published 6 years ago

toolscript v0.1.22

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

toolscript

A mini tools of JavaScript

NPM version build status Test coverage npm download

Install

NPM

yarn add toolscript --dev

or npm

npm install toolscript --save-dev

Usage

import * as tool from 'toolscript'

tool.echo.red('echo red')
// echo red string
tool.detectIE(9)
//if current browser is IE 9 return true else  return false
tool.copyText('content')
//copy the `content` to clipboard
tool.throttle(Func, 50, 100)
//The call that is triggered continuously within a 50ms interval, the latter call will handle the pending processing of the previous call, but at least once every 100ms
tool.timeDifference('2017-01-01 12:00:00', '2018-01-01 13:00:00')
//Calculate the difference between two times, return '365天1小时0分钟0秒'
tool.arrayRemoveEle(['1', '2', '3'], '1')
//Remove the element that belong to the array
tool.isPlainObject(obj)
//Judge the value is a Object.
tool.rgbToHex(255, 255, 255)
//rgb switch to the Hexadecimal.
too.countMaxRepetition('abskgoxugnska14432q1124')
//Count the characters that repeat the most times in a string.
too.unitNormalization(1.259, 2) //1.26
//Format the number that reserve the decimal for the specified number of digits.


OR

import { echo, detectIE, ...other } from 'toolscript'

echo.red('echo red')
// echo red string
detectIE(9)
//if current browser is IE 9 return true else  return false
copyText('content')
//copy the `content` to clipboard
...

Tool List

Tools

Release

npm publish

License

The MIT License (MIT). Please see License File for more information.

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago