This package is a collection of generic functions for converting, mutating, formatting, and validating data.
import {Mutate} from "@scheels-softdev/frontend-utility-functions"
Mutate.ConcatenateKeys({firstName: "John", lastName: "Doe", result:"" }, ["lastName","firstName"], "result", " - ")
// returns the following object: {firstName: "John", lastName: "Doe", result:"Doe - John"}
`
---
Format
Functions to change the given input, returning a predetermined type in a predetermined format
$3
#### Params
- Takes in a string or number, assuming that this has already been validated to ensure it's in a valid format
`
import {Format} from "@scheels-softdev/frontend-utility-functions"
Format.PhoneNumber(1234567890)
Format.PhoneNumber("1234567890")
Format.PhoneNumber("123.456.7890")
Format.PhoneNumber("123,456,7890")
Format.PhoneNumber("(123)4567890")
Format.PhoneNumber("123-456-7890")
Format.PhoneNumber("(123)456-7890")
// all return the following string: "(123)456-7890"
`
---
$3
Coming soon to a codebase near you
Guard
$3
#### InRange
Coming soon to a codebase near you
#### ValidNumber
Coming soon to a codebase near you
$3
#### inRange
Coming soon to a codebase near you
#### NullEmptyOrWhitespace
- Takes in any single parameter, and returns true if the passed parameter is null, empty, whitespace, or falsey in another way
`
import {Guard} from "@scheels-softdev/frontend-utility-functions"
let ex1 = Guard.Catch.NullEmptyOrWhitespace({}) //true because it caught
``