🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

kitify

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kitify

A JavaScript utility library that provides a whole mess of useful helper functions and supports modularity.

0.8.0
latest
Source
npm
Version published
Weekly downloads
24
380%
Maintainers
1
Weekly downloads
 
Created
Source

kitify

version CI status codecov downloads size browsers

kitify (kit + ify) is a JavaScript utility library that provides a whole mess of useful helper functions and supports modularity.

kitify 是一个 JavaScript 工具函数包,它提供了一大堆有用的辅助工具函数, 并支持模块化。

Installation

npm install kitify

Usage

import { isType, clone } from 'kitify'
// or
import isType from 'kitify/isType'
import clone from 'kitify/clone'

isType(123) // 'number'
isType('hello', 'string') // true
clone({ a: 1, b: 2 }) // { a: 1, b: 2 }

API

DOM

DOM Methods

MethodDescription
detectMouseDirectionDetect mouse movement direction in element.
addInputListenerhandle input event with composition events.
loadResourceStatic resource load function.

Type

Provides some methods for interpreting data types.

MethodDescription
isTypeCheck if the value is of the specified type.
isObjectCheck if the value is an object.
isFunctionCheck if the value is a function.
isStringCheck if the value is a string.
isNumberCheck if the value is a number.
isBooleanCheck if the value is a boolean.
isArrayCheck if the value is an array.
isSymbolCheck if the value is a symbol.
isUndefinedCheck if the value is undefined.
isNullCheck if the value is null.
isBigIntCheck if the value is a BigInt.
isNilCheck if the value is null or undefined.
isEmptyCheck if the value is empty.
isInvalidCheck if the value is invalid.

Function

Function Methods

MethodDescription
debounceDebounce a function.
throttleThrottle a function.

Collection

Collection Methods

MethodDescription
cloneDeep copy of the value.
cloneDeepDeep copy of the value. Supports Map,Set,ArrayBuffer...
cloneLoopLoop deep copy of the value.
cloneJSONJSON deep copy of the value.

Object

Object Methods

MethodDescription
assignMerge objects into a new object.

Data

Data Methods

MethodDescription
listToTreeConvert list to tree.
treeToListConvert tree to list.
transformTreeTransform a tree structure by applying a function to each node.
findPathFind the path from the root node to the target node in a tree structure.

Color

Color Methods

MethodDescription
isHexColorCheck if the value is a hex color.
isRgbColorCheck if the value is a rgb color.
isHslColorCheck if the value is a hsl color.
isDarkColorCheck if the color is dark.
isLightColorCheck if the color is light.
hexToRgbConvert hex color to rgb.
rgbToHexConvert rgb color to hex.
colorRGBConvert color to [R,G,B].
setColorOpacitySet the opacity of the color.
setColorBrightnessSet the brightness of the color.
darkenColorDarken the color.
lightenColorLighten the color.
mixColorsMix two colors.
colorComplementaryGet the complementary color.
colorLuminanceGet the luminance of the color.
colorContrastGet the contrast of the color.

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Keywords

kitify

FAQs

Package last updated on 09 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts