https://github.com/adenekan41/helpers
🛠A collection of utility functions for Javascript development.
https://github.com/adenekan41/helpers
helper-functions helpers javascript-development
Last synced: about 1 year ago
JSON representation
🛠A collection of utility functions for Javascript development.
- Host: GitHub
- URL: https://github.com/adenekan41/helpers
- Owner: adenekan41
- License: mit
- Created: 2020-02-02T17:58:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T04:56:11.000Z (over 3 years ago)
- Last Synced: 2025-03-25T22:51:29.899Z (about 1 year ago)
- Topics: helper-functions, helpers, javascript-development
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/codewonders-helpers
- Size: 355 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

# Codewonders Helpers [](https://www.npmjs.com/package/codewonders-helpers)
[](https://nodei.co/npm/codewonders-helpers/)
This is a small helpers utility functions for javascript development. In here
are the regular functions i use in my development feel free to contribute.
## Helper Functions
### _Array Helpers_
- arrayRandomItem - This allows you pick a random item in an array see more
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/array-helpers.js)
- arrayPickOne - This allows you pick a random item with its index in an array
see more
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/array-helpers.js)
- arrayShuffleItems - This allows you to switch array index on document loaded
in an array see more
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/array-helpers.js)
- arrayRemove - This allows you to remove item from with a `cb` an array see
more
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/array-helpers.js)
- join - This allows you to join items in an array with different seperators
`start` and `end` in an array see more
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/array-helpers.js)
### _Bind Helper_
- bind - This allows you to bind functions / curried functions see more
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/bind.js).
takes in `fn` , `context` , `boundArgs`
### _Collect Into Helper_
- collectInto - This collects functions into with an argument
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/collect-into.js).
takes in `args`
### _Cookie To Object Helper_
- cookieToObject - Converts cookie to object
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/cookies-to-object.js).
takes in `cookie`
### _Countries Helpers_
- countries-by-calling-code - Gets country and their call codes
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/countries-by-calling-code.js).
- countries-by-curreny-code - Gets country and their currency codes
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/countries-by-curreny-code.js).
- countries-by-states - Gets country and their states
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/countries-by-states.js).
### _Encode and Decode_
- encode - encodes string to base 64
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/encode-decode.js).
takes in `string`
- decode - decodes encoded string from base 64
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/encode-decode.js).
takes in `string`
- utf8encode - encodes string to utf8
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/encode-decode.js).
takes in `string`
* utf8decode - decodes encoded string from utf8
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/encode-decode.js).
takes in `string`
### _Cookie To Object Helper_
- getRandomColor - returns random color
[here](https://github.com/adenekan41/helpers/blob/master/src/helpers/get-random-colors.js).
returns color in `HEX`
> Still documenting :)
## Install
```sh
$ npm install codewonders-helpers --save
```
## Usage
Getting familiar with the package and you want to use some helper functions like
`isEmpty`, `isJsonString` ,`pxToRem` helpers and e.t.c you can easily just
export them the following ways.
```js
import { isEmpty } from 'codewonders-helpers';
```
All methods are exported as a flat namesapce so you can also call them like this
```js
import isEmpty from 'codewonders-helpers/bundle-es/is-empty';
```
or
```js
var isEmpty = require('codewonders-helpers');
```
and then we have the exported helpers and can already do this
```js
isEmpty({});
// => true
```
> MIT © [codewonders.dev](https://codewonders.dev)  · GitHub
> [@adenekan41 / codewonders](https://github.com/adenekan41) >
>  ·Â