Skip to main content

CommonHelper

The CommonHelper offers a set of common functionality.

import { CommonHelper } from '@archibald/helpers';

isConstructable

This method checks if a given value can be initialized.

import { CommonHelper } from '@archibald/helpers';

const isConstructable = CommonHelper.isConstructable(PARAMETERS);

Parameters

NameTypeDescription
fanyA value to be checked if it is constructable.

removeTrailingSlash

This method removes trailing slash from a given string.

import { CommonHelper } from '@archibald/helpers';

const value = CommonHelper.removeTrailingSlash(PARAMETERS);

Parameters

NameTypeDescription
hoststringA string with trailing slash.

constructPublicHost

This method create a new public host configuration.

import { CommonHelper } from '@archibald/helpers';

const publicHost = CommonHelper.constructPublicHost(PARAMETERS);

Parameters

NameTypeDescriptionDefault
prefixstring | undefinedA prefix configuration.
pathstring | undefinedA path configuration.