ag-utils

0.0.8 • Public • Published

agile-utils

介绍

js 工具函数库

自定义实现包括函数相关、数组相关、对象相关,字符串相关的工具函数, 类似流行的工具函数库 lodash;

手写 DOM 事件监听、ajax 请求、事件总线、消息订阅-发布、Promise;

安装教程

npm install ag-utils -S

使用说明

网页中使用

<script src="../dist/index.min.js"></script>
<script>
  AG.map([1, 2, 3], function (item) {
    return item * 10;
  }); // => [10, 20, 30]
  AG.version; // =>0.0.1
</script>

es6 模块中使用

import { map } from "ag-utils";

console.log(map([1, 2, 3], (item) => item * 10)); // => [10,20,30]

Dependents (0)

Package Sidebar

Install

npm i ag-utils

Weekly Downloads

0

Version

0.0.8

License

MIT

Unpacked Size

128 kB

Total Files

45

Last publish

Collaborators

  • w530385371