Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-alphagram/docs/types/index.d"

Index

Functions

Functions

Export assignment isAlphagram

  • isAlphagram(value: any): boolean
  • Tests if a value is an alphagram (i.e., a sequence of characters arranged in alphabetical order).

    Notes

    • The function first checks that an input value is a string before validating that the value is an alphagram. For non-string values, the function returns false.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating if a value is an alphagram

    Example

    var out = isAlphagram( 'beep' );
    // returns true

    Example

    var out = isAlphagram( new String( 'beep' ) );
    // returns true

    Example

    var out = isAlphagram( 'zba' );
    // returns false

    Example

    var out = isAlphagram( '' );
    // returns false

    Example

    var out = isAlphagram( 123 );
    // returns false