Symbol which specifies a method that splits a string at the indices that match a regular expression.
var SplitSymbol = require( '@stdlib/symbol/split' );symbol which specifies a method that splits a string at the indices that match a regular expression.
var s = typeof SplitSymbol;
// e.g., returns 'symbol'var defineProperty = require( '@stdlib/utils/define-property' );
var SplitSymbol = require( '@stdlib/symbol/split' );
var obj = {};
function split( str ) {
return str.split( '' );
}
defineProperty( obj, SplitSymbol, {
'configurable': true,
'value': split
});
console.log( 'hello'.split( obj ) );