Skip to content

Latest commit

 

History

History

README.md

Symbol

Symbol namespace.

Usage

var ns = require( '@stdlib/symbol' );

ns

Symbol namespace.

var o = ns;
// returns {...}

The namespace contains the following:

  • AsyncIteratorSymbol: async iterator symbol which specifies the default async iterator for an object.
  • Symbol( [description] ): symbol factory.
  • HasInstanceSymbol: has instance symbol which is used to determine if a constructor object recognizes an object as its instance.
  • IsConcatSpreadableSymbol: concat spreadable symbol which specifies whether an array-like object should be flattened to its array elements during concatenation.
  • IteratorSymbol: iterator symbol which specifies the default iterator for an object.
  • ReplaceSymbol: symbol which provides a method for replacing substrings matched by the current object.
  • ToPrimitiveSymbol: symbol which specifies a method for converting an object to a primitive value.

Examples

var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/symbol' );

console.log( objectKeys( ns ) );