jsutill
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

jsutill api

js工具类

License

请查看 MIT license.

数组

** 根据具体值,从数组中移除元素

import {ArrayUtil} from "jsutills/index"
//字符串
testArray(){
    let arr=["a","b","c"];
    ArrayUtil.remove(arr,"b");
    console.log(arr.join(","));//a,c
}
//对象
testArray(){
    let objArr=[{"id":"1","name":"赵云"},{"id":"2","name":"诸葛亮"}];
    ArrayUtil.remove(objArr,{"id":"2"},"id");
    console.log(JSON.stringify(objArr));//[{"id":"1","name":"赵云"}]
}

加密

** md5

import {JsUtilApi} from "jsutills/index"

JsUtilApi.md5("admin123456")

Base64

TimeUtil

/jsutill/

    Package Sidebar

    Install

    npm i jsutill

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    64 kB

    Total Files

    25

    Last publish

    Collaborators

    • zhaoqingkaitt