APIs

Show:

Methods

colorIsDark

(
  • color
)
Boolean

Parameters:

  • color String

    An rgb string in #000000 format

Returns:

Boolean:

Whether or not the color is a dark color

get_gender_icon

(
  • gender
  • classes
)
String

Returns gender icon based on first character of string provided

Parameters:

  • gender String

    MALE, FEMALE

  • classes String

    Additional CSS classes to apply to icon element

Returns:

String:

Gender icon as html string

get_icon

(
  • name
  • size
  • title
  • classes
)
String

Returns icon to display as html

Parameters:

  • name String

    Icon name

  • size String

    Icon size, defaults to 16

  • title String

    Title attribute

  • classes String

    Additional CSS classes to apply to icon element

Returns:

String:

Icon as html string

invertColor

(
  • color
)
String

Parameters:

  • color String

    An rgb string in #000000 format

Returns:

String:

The inverted color or ''

mysql_datetime_format_short

(
  • dt
)
String

Returns a formatted, client-localised date from a given mysql timestamp. all mysql timestamps are based on EST and must be localised Formats based on date: (today): outputs time, period, and timezone, (current year): outputs abbreviated month and numeric day (default): MM/dd/yyyy

Parameters:

  • dt String | Date

    string representing a date, or the date

Returns:

String:

date in MM/dd/yy

number_format

(
  • number
  • decimals
  • dec_point
  • thousands_sep
)
String

Parameters:

  • number Number | String

    a number to format

  • decimals Number | String

    number of decimals to be shown

  • dec_point Number | String

    decimal marker

  • thousands_sep Number | String

    thouusands marker

Returns:

String:

formatted number string

number_to_sequence

(
  • val
)
String

Changes a number to it's readable sequence equivalent. i.e. 1 => primary or 3 => tertiary NOTE: supports only up to 3 because I'm lazy

Parameters:

  • val Number | String

    a number

Returns:

String:

a string for the sequence

ordinal_format

(
  • val
)
String

Converts the provided number value to its ordinal format. (i.e. 1 => 1st, 2 => 2nd)

Parameters:

  • val Number | String

    a number

Returns:

String:

number in ordinal format

phone_format

(
  • num
)
String

Parameters:

  • num String

    Phone #

Returns:

String:

Formatted phone number. do not use for processing/logic

validateEmail

(
  • email
)
Boolean

Parameters:

  • email String

    Email address to validate

Returns:

Boolean:

return true if valid email