### arrayify

Transform the given values into an array.

arrayify(val: any): array
Parameters
val `(any)` value
Returns
`array`: array
Example

    var snu = require('s-node-utils');

    snu.array.arrayify('abc');
    //=> ['abc']

### flatten

Recursively flatten an array or arrays.

flatten(array: array): array
Parameters
array `(array)`
Returns
`array`:
Example

    var snu = require('s-node-utils');

    snu.array.flatten(['a', ['b', ['c']], 'd', ['e'], [[['f'], ['g']], 'h'], 'i']);
    //=> ['abc']

### string

Determines if the string is a string.

string(string: string): boolean
Parameters
string `(string)` string
Returns
`boolean`: boolean
Example

    var snu = require('s-node-utils');

    snu.is.string('text');
    //=> true

### zalgo

Determines if the string consists of zalgo text.

zalgo(string: string, threshold: number): boolean
Parameters
string `(string)` string
threshold `(number = `0.55`)` threshold
Returns
`boolean`: boolean
Example

    var snu = require('s-node-utils');

    snu.is.zalgo('ť͈̓̆h̏̔̐̑ì̭ͯ͞s̈́̄̑͋');
    //=> true

### progressBar

Generate a progress bar

progressBar(percentage: number, totalSteps: number, complete: string, empty: string): string
Parameters
percentage `(number = `0`)` Percentage (out of 100)
totalSteps `(number = `10`)` Number of characters
complete `(string = `"█"`)` Character (completed)
empty `(string = `"▒"`)` Character (empty)
Returns
`string`: bar
Example

    var snu = require('s-node-utils');

    snu.others.progressBar(5, 10);
    //=> █████▒▒▒▒▒

    snu.others.progressBar(44, 50, '!', '|');
    //=> !!!!!!!!!!!!!!!!!!!!!!||||||||||||||||||||||||||||

### compare

Compare a pure password with hashed password

compare(password: string, hashedPassword: string): boolean
Parameters
password `(string)` Pure password
hashedPassword `(string)` Hashed password
Returns
`boolean`: result
Example

    var snu = require('s-node-utils');

    (async () => {
      console.log(
        await snu.password.compare(
          "F@3Ltv{>=q[8T%,",
          "$2a$10$OOJ2FlB56wSEhtwvVQxub.hoiWcEzcFsX2ERdNBo3fSXPSoSPK8zW"
        )
      );
    })();
    //=> true

### generate

Generate a password

generate(length: number, lowercase: boolean, uppercase: boolean, numbers: boolean, symbols: boolean): string
Parameters
length `(number = `5`)` Password length
lowercase `(boolean = `true`)` If password contain lowercases
uppercase `(boolean = `true`)` If password contain uppercases
numbers `(boolean = `true`)` If password contain numbers
symbols `(boolean = `false`)` If password contain symbols
Returns
`string`: Password
Example

    var snu = require('s-node-utils');

    snu.password.generate(50, true, true, false, true);
    //=> Hnn}VnDySrnlJU.US>}vt<]|@)I^CB/.}|ehxFV_w%f;m,AlJA

### hash

Hash a password

hash(string: string, saltRound: number): string
Parameters
string `(string)` Password
saltRound `(number = `10`)` Salt round
Returns
`string`: Password
Example

    var snu = require('s-node-utils');

    snu.password.hash("F@3Ltv{>=q[8T%,", 10);
    //=> $2a$10$OOJ2FlB56wSEhtwvVQxub.hoiWcEzcFsX2ERdNBo3fSXPSoSPK8zW (exemple)

### capitalize

Converts the first string character to uppercase.

capitalize(string: string): string
Parameters
string `(string)` Character string
Returns
`string`: Character string
Example

    var snu = require('s-node-utils');

    snu.string.capitalize('a text');
    //=> A text

### chop

Like trim.

chop(string: string): string
Parameters
string `(string)` string
Returns
`string`: boolean
Example

    var snu = require('s-node-utils');

    snu.string.chop('text');
    //=> text

    snu.string.chop(' text ');
    //=> text

    snu.string.chop('-text-');
    //=> text

### shuffle

Mix characters in a string

shuffle(string: string): string
Parameters
string `(string)` string
Returns
`string`: string
Example

    ar snu = require('s-node-utils');

    snu.string.shuffle("text");
    //=> xtet

### translate

Translation module

translate(string: string, options: object): object
Parameters
string `(string)` string
options `(object = `{to='en'}`)` Option (default: { from = 'auto', to = 'en', raw = false })
Returns
`object`: JSON (async function)
Example

    var snu = require('s-node-utils');

    (async () => {
      console.log(
        await snu.string.translate("Salut, comment sa va ?", { to: "en" })
      );
    })();
    //=> { text: 'Hi, how are you?',
    //=>   from:
    //=>     { language: { didYouMean: false, iso: 'fr' },
    //=>       text:
    //=>         { autoCorrected: false,
    //=>           value: 'Salut, comment [ça] va ?',
    //=>           didYouMean: true } },
    //=>   raw: '' }

### unzalgo

Removes all Zalgo text characters for every word in a string if the word is zalgo text.

unzalgo(string: string, threshold: number): string
Parameters
string `(string)` string
threshold `(number = `0.55`)` threshold
Returns
`string`: string
Example

    var snu = require('s-node-utils');

    snu.string.unzalgo('ť͈̓̆h̏̔̐̑ì̭ͯ͞s̈́̄̑͋');
    //=> this

### zalgolize

Transforms string to zalgo text.

zalgolize(str: any, p: number, maxs: array, string: string): string
Parameters
str `(any)`
p `(number = `0.2`)` p
maxs `(array = `[5,3,5]`)` maxs
string `(string)` string
Returns
`string`: string
Example

    var snu = require('s-node-utils');

    snu.string.zalgolize('this');
    //=> t̋hiͤsͮ