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
| Name | Type | Description |
|---|---|---|
| f | any | A 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
| Name | Type | Description |
|---|---|---|
| host | string | A string with trailing slash. |
constructPublicHost
This method create a new public host configuration.
import { CommonHelper } from '@archibald/helpers';
const publicHost = CommonHelper.constructPublicHost(PARAMETERS);
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| prefix | string | undefined | A prefix configuration. | |
| path | string | undefined | A path configuration. |