0.0.0-beta.8 • Published 3 months ago

core-js-pro v0.0.0-beta.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

安装

npm install --save core-js-pro

使用

import $core from "core-js-pro";

目录

TYPE 类型

$core.type 获取类型

$core.isPrimitive 判断是否为基本类型

$core.isNumber 判断是否为数值

$core.isString 判断是否为字符串

$core.isBoolean 判断是否为布尔值

$core.isNull 判断是否为 null

$core.isUndefined 判断是否为 undefined

$core.isBigInt 判断是否为大整数

$core.isSymbol 判断是否为标识符

$core.isPureObject 判断是否为对象结构

$core.isObject 判断是否为对象

$core.isArray 判断是否为数组

$core.isNaN 判断是否为 NaN

$core.isFinite 判断是否为有限数值

$core.isEmpty 判断是否为假值、空数组、空对象、空集合

$core.isFunction 判断是否为函数

$core.instance 判断对象是否为类的实例

$core.instanceof 判断对象是否为类或类原型链上的实例

$core.getClassName 获取类的名称

$core.getClass 获取类

$core.isSet 判断是否为 Set

$core.isMap 判断是否为 Map

$core.isWeakSet 判断是否为 WeakSet

$core.isWeakMap 判断是否为 WeakMap

$core.isInt8Array 判断是否为 Int8Array

$core.isInt16Array 判断是否为 Int16Array

$core.isInt32Array 判断是否为 Int32Array

$core.isUint8Array 判断是否为 Uint8Array

$core.isUint16Array 判断是否为 Uint16Array

$core.isUint32Array 判断是否为 Uint32Array

$core.isFloat32Array 判断是否为 Float32Array

$core.isFloat64Array 判断是否为 Float64Array

$core.isBigInt64Array 判断是否为 BigInt64Array

$core.isBigUint64Array 判断是否为 BigUint64Array

$core.isArrayBuffer 判断是否为 ArrayBuffer

$core.isDataView 判断是否为 DataView

$core.isBlob 判断是否为 Blob

$core.isFormData 判断是否为 FormData

$core.isStream 判断是否为 Stream


OBJECT 对象

$core.cloneDeep 深拷贝

$core.assign 浅扩展

$core.extend 深扩展

$core.equalTarget 判断对象是否一样

$core.reduceTarget 精简化对象

$core.delReduceTarget 精简化对象


FUNCTION 函数

$core.debounce 防抖

$core.throttle 节流

$core.sleep 休眠

$core.delay 延迟

$core.curry 柯里化


STRING 字符串

$core.toParamString 转换成字符串

$core.toSeparator 转换连接符方式,默认中划线

$core.toHump 转换驼峰方式

$core.lowerFirst 字符串首字母转换成小写

$core.upperFirst 字符串首字母转换成大写

$core.delString 删除从索引位置指定长度字符

$core.insertString 插入从索引位置的字符串

$core.spliceString 从索引位置删除指定长度字符,并可从当前索引插入字符串

$core.formatThousand 千分符


MATH 数学

$core.add 加法

$core.sub 减法

$core.mul 乘法

$core.div 除法

$core.min 获取最小数

$core.max 获取最大数

$core.sum 求和

$core.mean 平均数

$core.floor 按指定精度向下获取

$core.ceil 按指定精度向上获取

$core.round 按指定精度四舍五入获取


COLLECTION 集合

$core.size 获取长度或数量

$core.group 分组

$core.sort 排序

$core.sample 随机获取集合元素

$core.shuffle 打乱集合

$core.isSetLike 判断是否满足集合特性

$core.subSet 判断是不是子集

$core.intersection 交集

$core.union 并集

$core.symmetricDifference 差集

$core.complementSet 补集 补集一般指绝对补集

$core.unique 去重

微信号

联系作者:qianduanka

网站

https://www.qianduanka.com

前端咖公众号

公众号

前端咖小程序

公众号