Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment isBoxedPrimitive

  • isBoxedPrimitive(value: any): boolean
  • Tests if a value is a JavaScript boxed primitive.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating if a value is a JavaScript boxed primitive

    Example

    var bool = isBoxedPrimitive( new String( 'beep' ) );
    // returns true

    Example

    var bool = isBoxedPrimitive( new Number( 3.21 ) );
    // returns true

    Example

    var Symbol = require( `@stdlib/symbol/ctor` );
    var bool = isBoxedPrimitive( Object( Symbol( 'beep' ) ) );
    // returns true

    Example

    var bool = isBoxedPrimitive( true );
    // returns false

    Example

    var bool = isBoxedPrimitive( {} );
    // returns false

    Example

    var Symbol = require( `@stdlib/symbol/ctor` );
    var bool = isBoxedPrimitive( Symbol( 'beep' ) );
    // returns false