This package has been deprecated

Author message:

This package is no longer maintained.Please use simi instead of eigen-func

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

1.3.2 • Public • Published

EIGEN-FUNC

Common JavaScript Functions For EigenTech

Build Status codecov npm

Already Have Methods

  • getAvatar() get user avatar url (eigen use only)
  • getCookie(name) get cookie
  • getRealname() get current user realname (eigen use only)
  • getUsername() get current user username (eigen use only)
  • isAlpha() judge current env is alpha or production (same to isDevMode())(eigen use only)
  • md5(str, bit) md5 string
  • hash(str) hash a string to number
  • uuid(len, radix) generate uuid
  • debounce(func, wait, immediate) function debounce
  • throttle(func, wait, options) function throttle
  • deepClone(object) object deepclone
  • type(variable) judge variable type

How To Use

npm / cnpm install eigen-func --save 
yarn add eigen-func
import eigen from "eigen-func"
 
eigen.md5("eigen")
eigen.isAlpha()

or

import { md5, isAlpha } from "eigen-func"
md5("eigen")
isAlpha()

If you only use the few methods in eigen-func, it is recommended to use the following writing method, which will make the packaged JS file smaller

import md5 from "eigen-func/lib/md5"
md5("eigen")

Readme

Keywords

Package Sidebar

Install

npm i eigen-func

Weekly Downloads

22

Version

1.3.2

License

ISC

Unpacked Size

71.2 kB

Total Files

39

Last publish

Collaborators

  • kaijunhe