0.8.10 • Published 3 years ago

@pluginjs/utils v0.8.10

Weekly downloads
31
License
GPL-3.0
Repository
github
Last release
3 years ago

Utils

npm package

utils is a utility JavaScript library.

Introduction

Installation

Yarn

yarn add @pluginjs/utils

NPM

npm i @pluginjs/utils

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/utils/dist/utils.js"></script>

Production:

<script src="https://unpkg.com/@pluginjs/utils/dist/utils.min.js"></script>

API

deepClone

Parameters

| Name | Type | Description | |||-| | obj | Object | |

Returns

| Name | Type | Description | |||-| | obj | Object | |

nub

Parameters

| Name | Type | Description | |||-| | arr | Array | |

Returns

| Name | Type | Description | |||-| | arr | Array | |

isPlainObject

Parameters

| Name | Type | Description | |||-| | data | Object | |

Returns

| Name | Type | Description | |||-| | isPlainObject | Boolean | |

deepMerge

Parameters

| Name | Type | Description | |||-| | x | Object | | | y | Object | |

Returns

| Name | Type | Description | |||-| | result | Object | |

curry

Parameters

| Name | Type | Description | |||-| | fn | Function | |

Returns

| Name | Type | Description | |||-| | fn | Function | |

compose

Parameters

| Name | Type | Description | |||-| | fn | Function[] | |

Returns

| Name | Type | Description | |||-| | callback | Function | |

getUID

Parameters

| Name | Type | Description | |||-| | prefix | String | |

Returns

| Name | Type | Description | |||-| | uid | String | |

range

Parameters

| Name | Type | Description | |||-| | v | Number | length |

Returns

| Name | Type | Description | |||-| | result | Array | |

reflow

Parameters

| Name | Type | Description | |||-| | element | HTMLElement | |

Returns

| Name | Type | Description | |||-| | offsetHeight | Number | |

arrayEqual

Parameters

| Name | Type | Description | |||-| | a | Array | | | b | Array | |

Returns

| Name | Type | Description | |||-| | isEqual | Boolean | |

arrayDiff

Parameters

| Name | Type | Description | |||-| | a | Array | | | b | Array | |

Returns

| Name | Type | Description | |||-| | diff | Array | |

arrayIntersect

Parameters

| Name | Type | Description | |||-| | a | Array | | | b | Array | |

Returns

| Name | Type | Description | |||-| | intersect | Array | |

convertPercentageToFloat

Parameters

| Name | Type | Description | |||-| | percentage | String | |

Returns

| Name | Type | Description | |||-| | float | Float | |

convertFloatToPercentage

Parameters

| Name | Type | Description | |||-| | float | Float | |

Returns

| Name | Type | Description | |||-| | percentage | String | |

convertMatrixToArray

Parameters

| Name | Type | Description | |||-| | matrix | String | |

Returns

| Name | Type | Description | |||-| | array | Array | |

getTime

Returns

| Name | Type | Description | |||-| | dateNow | Number | |

camelize

Parameters

| Name | Type | Description | |||-| | word | String | | | first | Boolean | |

Returns

| Name | Type | Description | |||-| | word | String | |

getValueByPath

Parameters

| Name | Type | Description | |||-| | obj | Object | | | path | String | |

Returns

| Name | Type | Description | |||-| | obj | Object | |

throttle

Parameters

| Name | Type | Description | |||-| | func | Function | | | delay | Number | |

Returns

| Name | Type | Description | |||-| | handler | Function | |

debounce

Parameters

| Name | Type | Description | |||-| | func | Function | | | delay | Number | |

Returns

| Name | Type | Description | |||-| | handler | Function | |

fromPairs

Parameters

| Name | Type | Description | |||-| | arr | Array | |

Returns

| Name | Type | Description | |||-| | obj | Object | |

Browser support

Tested on all major browsers.

IE / EdgeFirefoxChromeSafariOpera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

License

@pluginjs/utils is Licensed under the GPL-v3 license.

If you want to use @pluginjs/utils project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright

Copyright (C) 2022 Creation Studio Limited.

@infinitebrahmanuniverse/nolb-_plu@everything-registry/sub-chunk-727@pluginjs/animate-text@pluginjs/arrows@pluginjs/audio-picker@pluginjs/auto-complete@pluginjs/before-after@pluginjs/bg-picker@pluginjs/bg-video@pluginjs/breadcrumb@pluginjs/breakpoints@pluginjs/cascader@pluginjs/choice@pluginjs/classes@pluginjs/collapse@pluginjs/color@pluginjs/color-picker@pluginjs/color-selector@pluginjs/countdown@pluginjs/gradient@pluginjs/gradient-picker@pluginjs/gradient-selector@pluginjs/grids@pluginjs/hotspots@pluginjs/i18n@pluginjs/icon-picker@pluginjs/image-picker@pluginjs/image-selector@pluginjs/initializer@pluginjs/input-mask@pluginjs/item-list@pluginjs/date-picker@pluginjs/decorator@pluginjs/dom@pluginjs/dots@pluginjs/dynamic-number@pluginjs/events@pluginjs/factory@pluginjs/font-editor@pluginjs/font-picker@pluginjs/gallery@pluginjs/gallery-picker@pluginjs/accordion@pluginjs/adapt-text@pluginjs/table-sort@pluginjs/tabs@pluginjs/tag-list@pluginjs/template@pluginjs/thumbnails@pluginjs/time-picker@pluginjs/toast@pluginjs/toggle@pluginjs/toggle-list@pluginjs/tooltip@pluginjs/tween@pluginjs/units@pluginjs/units-range@pluginjs/video@pluginjs/video-picker@pluginjs/wizard@pluginjs/multi-select@pluginjs/notice@pluginjs/paginator@pluginjs/parallax@pluginjs/pattern-picker@pluginjs/place-complete@pluginjs/pluginjs@pluginjs/polyfills@pluginjs/pop-dialog@pluginjs/popover@pluginjs/range@pluginjs/scroll-end@pluginjs/scroll-top@pluginjs/scrollable@pluginjs/scrollbar@pluginjs/select@pluginjs/shares@pluginjs/shorten@pluginjs/slider@pluginjs/spinner@pluginjs/styled@pluginjs/svg-picker@pluginjs/svg-progress@pluginjs/swipe@pluginjs/keyboard@pluginjs/lightbox@pluginjs/link-picker@pluginjs/list@pluginjs/loader@pluginjs/map-picker@pluginjs/match@pluginjs/modal@pluginjs/zoom@zalastax/nolb-_plu
0.8.10

3 years ago

0.8.9

3 years ago

0.8.8

4 years ago

0.8.7

4 years ago

0.8.6

4 years ago

0.8.5

4 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.7.19

5 years ago

0.7.18

5 years ago

0.7.17

6 years ago

0.7.16

6 years ago

0.7.15

6 years ago

0.7.14

6 years ago

0.7.13

6 years ago

0.7.12

6 years ago

0.7.11

6 years ago

0.7.10

6 years ago

0.7.9

6 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.5

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.5.0

7 years ago

0.2.20

7 years ago

0.2.19

7 years ago

0.2.18

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.2.15

7 years ago

0.2.14

7 years ago

0.2.13

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago