Home Reference Source Repository

Function

Static Public Summary
public

fillString(str: String, length: Number, symbol: String): String

Fill string with symbols

public

findFilesByPattern(dir: String, include: RegExp, exclude: RegExp): Array

Find files by RegExp pattern except dirs

public
public

trimBoth(string: String, symbol: String): String

Remove all prefixes or suffixes from the given string

public

Compare two software version v1 == v2 => 0 v1 < v2 => -1 v1 > v2 => 1

Static Public

public fillString(str: String, length: Number, symbol: String): String source

import {fillString} from 'recink/src/helper/util.js'

Fill string with symbols

Params:

NameTypeAttributeDescription
str String
length Number
symbol String

Return:

String

public findFilesByPattern(dir: String, include: RegExp, exclude: RegExp): Array source

import {findFilesByPattern} from 'recink/src/helper/util.js'

Find files by RegExp pattern except dirs

Params:

NameTypeAttributeDescription
dir String

Directory to search

include RegExp

Pattern to filter

exclude RegExp

Pattern to exclude directories

Return:

Array

public patterntransformer(value: *): Promise source

Params:

NameTypeAttributeDescription
value *

Return:

Promise

public trimBoth(string: String, symbol: String): String source

import {trimBoth} from 'recink/src/helper/util.js'

Remove all prefixes or suffixes from the given string

Params:

NameTypeAttributeDescription
string String
symbol String

Return:

String

public versionCompare(v1: String, v2: String): Number source

import {versionCompare} from 'recink/src/helper/util.js'

Compare two software version v1 == v2 => 0 v1 < v2 => -1 v1 > v2 => 1

Params:

NameTypeAttributeDescription
v1 String
v2 String

Return:

Number