1.0.1 • Published 5 years ago

@psyduck4u/function-utils v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

function-utils

JavaScript 函数工具方法

GitHub PyPI - Status

安装

使用npm安装

npm install @psyduck4u/function-utils

下载function-utils.min.js在你的项目中引入即可。

<script src="cookie-manager.min.js"></script>

使用

import FnUtils from '@psyduck4u/function-utils';

或者在引入function-utils.min.js之后,你就可以使用FnUtils对象了。

方法

debounce

  FnUtils.debounce(func, delay);
  • func (Function) function
  • delay (Number) delay in milliseconds

throttle

  FnUtils.throttle(func, limit);
  • func (Function) function
  • limit (Number) limit in milliseconds

作者与许可

Created and maintained by Yuxiang Yang under MIT License