Skip to content

harnessflex/helpers

Repository files navigation

Harness Helpers

Helper functions for Harness.

Status Statements Functions Lines

Install

This package is automatically installed with the Harness Flex Framework.

npm i @harnessflex/helpers

Basic Usage

import { dotNotation, slug } from '@harnessflex/helpers'

slug 'hello world', '-' // hello-world

const test = {
    app: {
        name: 'Harness'
    }
}

dotNotation test, 'app.name' // Harness

API

Helper Params Description
config notation: string, default: string/null Get config value.
dotNotation object: object, notation: string Get config value.
env key: string, default: string/null Get env value.
isArray value: mixed Check if value is an array.
isBoolean value: mixed Check if value is a boolean.
isFunction value: mixed Check if value is a function.
isNumber value: mixed Check if value is a number.
isObject value: mixed Check if value is an object.
isString value: mixed Check if value is a string.
slug value: string, separator: string Turn string into a slug.
toBoolean value: mixed Convert value into boolean.

This is a wip

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

Helper functions for Harness.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published