@fang-kang/js-utils
v1.0.4
Published
This is a tool composed of pure js tool functions
Downloads
4
Readme
@fang-kang/js-utils
🚀 What is js-utils?
@fang-kang/js-utils,Is an out of the box tool library implemented in pure javascript, mainly used to simplify the development process and improve development efficiency
🦄 Usage
import { uniqeArrayByKey } from '@fang-kang/js-utils';
const arr = [
{ id: 1, parentid: 0 },
{ id: 2, parentid: 1 },
{ id: 3, parentid: 1 },
{ id: 3, parentid: 1 },
];
uniqeArrayByKey(arr, 'id');
/**
* [
{ id: 1, parentid: 0 },
{ id: 2, parentid: 1 },
{ id: 3, parentid: 1 },
];
*
*/
Refer to documentations for more details.
📦 Install
npm i @fang-kang/js-utils
CDN
<script src="https://unpkg.com/@fang-kang/js-utils"></script>
It will be exposed to global as window.JsUtils
📄 License
MIT License © 2023-PRESENT fang-kang