Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "string/from-code-point/docs/types/index.d"

Index

Functions

Functions

Export assignment fromCodePoint

  • fromCodePoint(pts: ArrayLike<number>): string
  • fromCodePoint(...pt: Array<number>): string
  • Creates a string from a sequence of Unicode code points.

    throws

    a code point must be a nonnegative integer

    throws

    must provide a valid Unicode code point

    Parameters

    • pts: ArrayLike<number>

      sequence of code points

    Returns string

    created string

    Example

    var str = fromCodePoint( [ 9731 ] );
    // returns '☃'
  • Creates a string from a sequence of Unicode code points.

    Notes

    • In addition to multiple arguments, the function also supports providing an array-like object as a single argument containing a sequence of Unicode code points.
    throws

    must provide either an array-like object of code points or one or more code points as separate arguments

    throws

    a code point must be a nonnegative integer

    throws

    must provide a valid Unicode code point

    Parameters

    • Rest ...pt: Array<number>

      sequence of code points

    Returns string

    created string

    Example

    var str = fromCodePoint( 9731 );
    // returns '☃'