Skip to content

ethanyang163/function-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

hasProperty

  FnUtils.hasProperty(obj, path);
  • obj (Object) object
  • path (String) eg. "x.y.z"

作者与许可

Created and maintained by Yuxiang Yang under MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published