Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils

Index

Type aliases

Merge

Merge<M, N>: Omit<M, Extract<keyof M, keyof N>> & N

Type parameters

  • M

  • N

NestedPartial

NestedPartial<T>: {[ K in keyof T]: T[K] extends infer R[] ? NestedPartial<R>[] : NestedPartial<T[K]> }

Type parameters

  • T

PromiseOrValue

PromiseOrValue<T>: T | Promise<T>

Type parameters

  • T

Functions

Const addHttp

  • addHttp(url: any): any
  • Parameters

    • url: any

    Returns any

Const camelCaseify

  • camelCaseify(str: any): any
  • summary

    Convert a string to camelCase and remove spaces.

    Parameters

    • str: any

    Returns any

Const camelToDash

  • camelToDash(str: any): any
  • summary

    Convert a camelCase string to dash-separated string

    Parameters

    • str: any

    Returns any

Const camelToSpaces

  • camelToSpaces(str: any): any

Const capitalize

  • capitalize(str: string): string
  • summary

    Capitalize a string.

    Parameters

    • str: string

    Returns string

Const checkNested

  • checkNested(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const cleanUp

  • cleanUp(s: any): any
  • Parameters

    • s: any

    Returns any

Const dashToCamel

  • dashToCamel(str: any): any
  • summary

    Convert a dash separated string to camelCase.

    Parameters

    • str: any

    Returns any

Const debugVulcan

  • debugVulcan(suffix: string): Debugger
  • example

    const debugForm = debugVulcan("form"); debugForm("Got some values in form")

    Parameters

    • suffix: string

    Returns Debugger

Const decodeIntlError

  • decodeIntlError(error: any, options?: { stripped: boolean }): any
  • Parameters

    • error: any
    • options: { stripped: boolean } = ...
      • stripped: boolean

    Returns any

Const defineName

  • defineName(o: any, name: any): any
  • Parameters

    • o: any
    • name: any

    Returns any

Const deprecate

  • deprecate(currentVulcanVersion: any, message: any): void
  • Parameters

    • currentVulcanVersion: any
    • message: any

    Returns void

Const encodeIntlError

  • encodeIntlError(error: any): any
  • Parameters

    • error: any

    Returns any

Const findIndex

  • findIndex(array: any, predicate: any): number
  • Parameters

    • array: any
    • predicate: any

    Returns number

Const findWhere

  • findWhere(array: any, criteria: any): any
  • Parameters

    • array: any
    • criteria: any

    Returns any

Const getComponentDisplayName

  • getComponentDisplayName(WrappedComponent: any): any
  • Get the display name of a React component

    Parameters

    • WrappedComponent: any

    Returns any

Const getDomain

  • getDomain(url: any): null | string
  • Parameters

    • url: any

    Returns null | string

Const getFieldLabel

  • getFieldLabel(fieldName: string, model: VulcanModel<VulcanSchema<AnyObject>>): string
  • Parameters

    • fieldName: string
    • model: VulcanModel<VulcanSchema<AnyObject>>

    Returns string

Const getSchemaFieldAllowedValues

  • getSchemaFieldAllowedValues(schemaFieldOptionsArray: any): any[]
  • Convert an array of field options into an allowedValues array

    Parameters

    • schemaFieldOptionsArray: any

    Returns any[]

Const getShortUrl

  • getShortUrl(post: any): any
  • Parameters

    • post: any

    Returns any

Const isEmptyOrUndefined

  • isEmptyOrUndefined(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isPromise

  • isPromise(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const nl2br

  • nl2br(str: any): string
  • Parameters

    • str: any

    Returns string

Const removeProperty

  • removeProperty(obj: any, propertyName: any): void
  • Pluralize helper with clash name prevention (adds an S)

    deprecated

    Automated pluralization is room for troubles => to be avoided at any cost except for pure display usage

    Parameters

    • obj: any
    • propertyName: any

    Returns void

Const sanitize

  • sanitize(s: any): any
  • Parameters

    • s: any

    Returns any

Const slugify

  • slugify(s: any): any
  • summary

    The global namespace for Vulcan utils.

    Parameters

    • s: any

    Returns any

Const stripHTML

  • stripHTML(s: any): any
  • Parameters

    • s: any

    Returns any

Const stripTelescopeNamespace

  • stripTelescopeNamespace(schema: any): {}
  • Parameters

    • schema: any

    Returns {}

Const toTitleCase

  • toTitleCase(str: any): any

Const trimHTML

  • trimHTML(html: any, numWords: any): any
  • summary

    Trim a block of HTML code to get a clean text excerpt

    Parameters

    • html: any

      HTML to trim.

    • numWords: any

    Returns any

Const trimWords

  • trimWords(s: any, numWords: any): any
  • summary

    Trim a sentence to a specified amount of words and append an ellipsis.

    Parameters

    • s: any

      Sentence to trim.

    • numWords: any

      Number of words to trim sentence to.

    Returns any

Const underscoreToDash

  • underscoreToDash(str: any): any
  • summary

    Convert an underscore-separated string to dash-separated string

    Parameters

    • str: any

    Returns any

Generated using TypeDoc