0.0.13 • Published 1 year ago

@yangss/utils v0.0.13

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

@yangss/utils

A collection of common JavaScript / TypeScript utils

  • Tree-shakable ESM
  • Fully typed
  • Type utilities
  • Zero dependencies

Install

# npm
npm i @yangss/utils
# yarn
yarn add @yangss/utils

Utils

assertion

  • isString
  • isNumber
  • isBoolean
  • isArray
  • isObject
  • isFunction
  • isSymbol
  • isUndef
  • isNull
  • isPrimitive
  • isSameType
  • isPromise
  • isRegExp
  • isSet
  • isMap
  • isFalsy
  • isEqual
  • isBrowser
  • isMobile
  • isPhoneNumber
  • isEmail

array

  • toArray
  • at
  • unique

string

  • ensurePrefix
  • splitStrByLen
  • splitStrByLenReverse
  • reverseStr
  • upperFirst
  • lowerFirst
  • capitalize
  • camelCase
  • kebabCase
  • snakeCase

number

  • toNumber
  • add
  • subtract
  • multiply
  • divide
  • toThousandSeparated
  • random
  • toFixedNum

function

  • throttle
  • debounce
  • deepClone
  • deepMerge
  • uniqueId

browser

  • fileToBase64
  • downloadFile
  • triggerWindowResize
  • onWindowResize
  • getTextWidth
  • getTextWidthByCanvas
0.0.13

1 year ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago