0.3.0 • Published 6 years ago

extendutils v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

npm install extendutils --save

Usage

String

.contains(content, casesensitive)

Tests if the string contains another string or a string of an array.

ParameterTypeOptional (Default)Description
contentstring / string[]nosequence / array which needs to be containing
csasesensitivebooleanyes (false)check content case sensitive or not

Returns: boolean Containing state

.replaceAny(oldstring, newstring)

Replace all entered strings with new strings or remove strings when no new string is defined.

ParameterTypeOptional (Default)Description
oldstringstringnoString that should be replaced
newstringstringyes ("" remove)Replace with

Returns: string String with replaced string sequences

.padStart(length, char)

Append a string at the beginning with a character until it's length is same as set as minimum length.

ParameterTypeOptional (Default)Description
lengthnumberyes (2)Minimum length of the result
charstringyes (' ')Appendet character

Returns: string Result

.padEnd(length, char)

Append a string at the end with a character until it's length is same as set as minimum length.

ParameterTypeOptional (Default)Description
lengthnumberyes (2)Minimum length of the result
charstringyes (' ')Appendet character

Returns: string Result

Array

.contains(content, casesensitive)

Tests if the array contains a string or a string of another array. Atention: It returns true if the input array contains ANY string of the query, and not the specific sequence of it!

ParameterTypeOptional (Default)Description
contentstring / string[]nosequence / array which needs to be containing
csasesensitivebooleanyes (false)check content case sensitive or not

Returns: boolean Containing state

Number

.padStart(length, char)

Append a number at the beginning with a character until it's length is same as set as minimum length.

ParameterTypeOptional (Default)Description
lengthnumberyes (2)Minimum length of the result
charstringyes ('0')Appendet character

Returns: string Result

.padEnd(length, char)

Append a number at the end with a character until it's length is same as set as minimum length.

ParameterTypeOptional (Default)Description
lengthnumberyes (2)Minimum length of the result
charstringyes ('0')Appendet character

Returns: string Result

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago