Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment isASCII

  • isASCII(value: any): boolean
  • Tests whether a character belongs to the ASCII character set and whether this is true for all characters in a provided string.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating if a string has all ASCII characters

    Example

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

    Example

    var out = isASCII( 'È' );
    // returns false

    Example

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

    Example

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