From d0277c699467779f4e3ff792b2772642318623fd Mon Sep 17 00:00:00 2001 From: DiyanshuVortex Date: Tue, 11 Nov 2025 14:49:09 +0530 Subject: [PATCH 1/5] feat: add symbol/search --- .../@stdlib/symbol/search/README.md | 116 ++++++++++++++++++ .../@stdlib/symbol/search/docs/repl.txt | 18 +++ .../symbol/search/docs/types/index.d.ts | 31 +++++ .../@stdlib/symbol/search/docs/types/test.ts | 29 +++++ .../@stdlib/symbol/search/examples/index.js | 35 ++++++ .../@stdlib/symbol/search/lib/index.js | 48 ++++++++ .../@stdlib/symbol/search/lib/main.js | 53 ++++++++ .../@stdlib/symbol/search/package.json | 61 +++++++++ .../@stdlib/symbol/search/test/test.js | 52 ++++++++ 9 files changed, 443 insertions(+) create mode 100644 lib/node_modules/@stdlib/symbol/search/README.md create mode 100644 lib/node_modules/@stdlib/symbol/search/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/symbol/search/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/symbol/search/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/symbol/search/examples/index.js create mode 100644 lib/node_modules/@stdlib/symbol/search/lib/index.js create mode 100644 lib/node_modules/@stdlib/symbol/search/lib/main.js create mode 100644 lib/node_modules/@stdlib/symbol/search/package.json create mode 100644 lib/node_modules/@stdlib/symbol/search/test/test.js diff --git a/lib/node_modules/@stdlib/symbol/search/README.md b/lib/node_modules/@stdlib/symbol/search/README.md new file mode 100644 index 000000000000..fabe713413bd --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/README.md @@ -0,0 +1,116 @@ + + +# SearchSymbol + +> [`Symbol.search`][mdn-symbol-search] which specifies the method used by `String.prototype.search()` to match a regular expression or a custom object. + +
+ +The `Symbol.search` symbol allows objects to define custom search behavior when used with the built-in `String.prototype.search()` method. + +
+ +
+ +## Usage + +```javascript +var SearchSymbol = require( '@stdlib/symbol/search' ); +``` + +#### SearchSymbol + +[`symbol`][mdn-symbol] which specifies the method used by `String.prototype.search()` to determine how a string is searched. +Objects that define a `[Symbol.search]` method can customize their own search behavior. + +```javascript +var s = typeof SearchSymbol; +// e.g., returns 'symbol' +``` + +
+ + + + + +
+ +## Notes + +- The [symbol][mdn-symbol] is only supported in environments which support [symbols][mdn-symbol]. In non-supporting environments, the value is `null`. + +
+ + + + + +
+ +## Examples + + + +```javascript +var SearchSymbol = require( '@stdlib/symbol/search' ); + +class Search1 { + constructor( value ) { + this.value = value; + } + [ SearchSymbol ]( string ) { + return string.indexOf( this.value ); + } +} + +console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/symbol/search/docs/repl.txt b/lib/node_modules/@stdlib/symbol/search/docs/repl.txt new file mode 100644 index 000000000000..a10e29181cf3 --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/docs/repl.txt @@ -0,0 +1,18 @@ + +{{alias}} + Search symbol. + + This symbol specifies whether an array-like object should be flattened to + its elements during concatenation. + + The symbol is only supported in ES6/ES2015+ environments. For non-supporting + environments, the value is `null`. + + Examples + -------- + > var s = {{alias}} + e.g., + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/symbol/search/docs/types/index.d.ts b/lib/node_modules/@stdlib/symbol/search/docs/types/index.d.ts new file mode 100644 index 000000000000..760f793614bc --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/docs/types/index.d.ts @@ -0,0 +1,31 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +// EXPORTS // + +/** +* Search symbol. +* +* ## Notes +* +* - This symbol specifies the method used by `String.prototype.search()`. +* - Objects defining a `[Symbol.search]` method can customize how they are searched within a string. +*/ +export = Symbol.search; diff --git a/lib/node_modules/@stdlib/symbol/search/docs/types/test.ts b/lib/node_modules/@stdlib/symbol/search/docs/types/test.ts new file mode 100644 index 000000000000..3369a979996d --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/docs/types/test.ts @@ -0,0 +1,29 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable @typescript-eslint/no-unused-expressions */ + +import search = require( './index' ); + + +// TESTS // + +// The exported value is the `search` symbol... +{ + search;; +} diff --git a/lib/node_modules/@stdlib/symbol/search/examples/index.js b/lib/node_modules/@stdlib/symbol/search/examples/index.js new file mode 100644 index 000000000000..3817f2e33c95 --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/examples/index.js @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-env node, es6 */ + +'use strict'; + +var SearchSymbol = require( './../lib' ); + +// Example demonstrating the use of Symbol.search: +function Search1( value ) { + this.value = value; +} + +Search1.prototype[ SearchSymbol ] = function search( str ) { + return str.indexOf( this.value ); +}; + +console.log( 'foobar'.search( new Search1( 'bar' ) ) ); + diff --git a/lib/node_modules/@stdlib/symbol/search/lib/index.js b/lib/node_modules/@stdlib/symbol/search/lib/index.js new file mode 100644 index 000000000000..578905f09fab --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/lib/index.js @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Search symbol. +* +* @module @stdlib/symbol/search +* +* @example +* var SearchSymbol = require( '@stdlib/symbol/search' ); +* +* class Search1 { +* constructor( value ) { +* this.value = value; +* } +* [ SearchSymbol ]( string ) { +* return string.indexOf( this.value ); +* } +* } +* +* console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +* // => 3 +*/ + +// MAIN // + +var main = require( './main.js' ); + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/symbol/search/lib/main.js b/lib/node_modules/@stdlib/symbol/search/lib/main.js new file mode 100644 index 000000000000..833da6a1ccf8 --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/lib/main.js @@ -0,0 +1,53 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' ); // eslint-disable-line id-length + + +// MAIN // + +/** +* Search symbol. +* +* @name SearchSymbol +* @constant +* @type {(symbol|null)} +* +* @example +* class Search1 { +* constructor( value ) { +* this.value = value; +* } +* [ SearchSymbol ]( string ) { +* return string.indexOf( this.value ); +* } +* } +* +* console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +* // => 3 +*/ +var SearchSymbol = hasSearchSymbolSupport() ? Symbol.search : null; // eslint-disable-line max-len + + +// EXPORTS // + +module.exports = SearchSymbol; diff --git a/lib/node_modules/@stdlib/symbol/search/package.json b/lib/node_modules/@stdlib/symbol/search/package.json new file mode 100644 index 000000000000..714cca20b09a --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/package.json @@ -0,0 +1,61 @@ +{ + "name": "@stdlib/symbol/search", + "version": "0.0.0", + "description": "Search symbol.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "symbol", + "sym", + "search", + "string", + "regexp", + "match", + "custom", + "behavior" + ] +} diff --git a/lib/node_modules/@stdlib/symbol/search/test/test.js b/lib/node_modules/@stdlib/symbol/search/test/test.js new file mode 100644 index 000000000000..ec8972e5a634 --- /dev/null +++ b/lib/node_modules/@stdlib/symbol/search/test/test.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' ); // eslint-disable-line id-length +var isSymbol = require( '@stdlib/assert/is-symbol' ); +var Sym = require( './../lib' ); + + +// VARIABLES // + +var opts = { + 'skip': !hasSearchSymbolSupport() +}; + + +// TESTS // + +tape( 'main export is a symbol in supporting environments (ES6/2015+) or otherwise null', function test( t ) { + t.ok( true, __filename ); + if ( opts.skip ) { + t.strictEqual( Sym, null, 'main export is null' ); + } else { + t.strictEqual( typeof Sym, 'symbol', 'main export is a symbol' ); + t.strictEqual( isSymbol( Sym ), true, 'main export is a symbol' ); + } + t.end(); +}); + +tape( 'the main export is an alias for `Symbol.search`', opts, function test( t ) { + t.strictEqual( Sym, Symbol.search, 'returns expected value' ); + t.end(); +}); From 1c73d3d905839957c15c0efa1ee9efe7c7292564 Mon Sep 17 00:00:00 2001 From: DiyanshuVortex Date: Wed, 12 Nov 2025 00:22:51 +0530 Subject: [PATCH 2/5] resume commit --- .../@stdlib/symbol/search/README.md | 35 ++++++++++++++----- .../@stdlib/symbol/search/examples/index.js | 20 +++++++---- .../@stdlib/symbol/search/lib/index.js | 8 +++-- .../@stdlib/symbol/search/lib/main.js | 6 ++-- 4 files changed, 51 insertions(+), 18 deletions(-) diff --git a/lib/node_modules/@stdlib/symbol/search/README.md b/lib/node_modules/@stdlib/symbol/search/README.md index fabe713413bd..45a457c507a0 100644 --- a/lib/node_modules/@stdlib/symbol/search/README.md +++ b/lib/node_modules/@stdlib/symbol/search/README.md @@ -20,7 +20,7 @@ limitations under the License. # SearchSymbol -> [`Symbol.search`][mdn-symbol-search] which specifies the method used by `String.prototype.search()` to match a regular expression or a custom object. +> [`Symbol.search`][mdn-symbol-search], which specifies the method used by [`String.prototype.search()`][mdn-string-search] to match a regular expression or a custom object.
@@ -73,16 +73,33 @@ var s = typeof SearchSymbol; ```javascript var SearchSymbol = require( '@stdlib/symbol/search' ); -class Search1 { - constructor( value ) { - this.value = value; - } - [ SearchSymbol ]( string ) { - return string.indexOf( this.value ); +/** +* Constructor for creating search objects. +* +* @param {string} value - search value +* @returns {Search} search instance +*/ +function Search( value ) { + if ( !(this instanceof Search) ) { + return new Search( value ); } + this.value = value; +} + +/** +* Implement `Symbol.search`. +* +* @param {string} str - input string +* @returns {integer} match index +*/ +function searchMethod( str ) { + return str.indexOf( this.value ); } -console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +Search.prototype[ SearchSymbol ] = searchMethod; + +console.log( 'foobar'.search( new Search( 'bar' ) ) ); +// => 3 ```
@@ -110,6 +127,8 @@ console.log( 'foobar'.search( new Search1( 'bar' ) ) ); diff --git a/lib/node_modules/@stdlib/symbol/search/examples/index.js b/lib/node_modules/@stdlib/symbol/search/examples/index.js index 3817f2e33c95..cb00f899fe78 100644 --- a/lib/node_modules/@stdlib/symbol/search/examples/index.js +++ b/lib/node_modules/@stdlib/symbol/search/examples/index.js @@ -16,20 +16,28 @@ * limitations under the License. */ -/* eslint-env node, es6 */ - 'use strict'; +// MODULES // + var SearchSymbol = require( './../lib' ); -// Example demonstrating the use of Symbol.search: -function Search1( value ) { +// MAIN // + +/** +* Example demonstrating the use of Symbol.search. +*/ +function Search( value ) { + if ( !(this instanceof Search) ) { + return new Search( value ); + } this.value = value; } -Search1.prototype[ SearchSymbol ] = function search( str ) { +Search.prototype[ SearchSymbol ] = function search( str ) { return str.indexOf( this.value ); }; -console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +// EXPORTS // +console.log( 'foobar'.search( new Search( 'bar' ) ) ); diff --git a/lib/node_modules/@stdlib/symbol/search/lib/index.js b/lib/node_modules/@stdlib/symbol/search/lib/index.js index 578905f09fab..6c1b95b21b2a 100644 --- a/lib/node_modules/@stdlib/symbol/search/lib/index.js +++ b/lib/node_modules/@stdlib/symbol/search/lib/index.js @@ -24,9 +24,10 @@ * @module @stdlib/symbol/search * * @example +* // eslint-disable stdlib/jsdoc-doctest * var SearchSymbol = require( '@stdlib/symbol/search' ); * -* class Search1 { +* class Search { * constructor( value ) { * this.value = value; * } @@ -35,14 +36,17 @@ * } * } * -* console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +* console.log( 'foobar'.search( new Search( 'bar' ) ) ); * // => 3 +* // eslint-enable stdlib/jsdoc-doctest */ + // MAIN // var main = require( './main.js' ); + // EXPORTS // module.exports = main; diff --git a/lib/node_modules/@stdlib/symbol/search/lib/main.js b/lib/node_modules/@stdlib/symbol/search/lib/main.js index 833da6a1ccf8..fc072518a3eb 100644 --- a/lib/node_modules/@stdlib/symbol/search/lib/main.js +++ b/lib/node_modules/@stdlib/symbol/search/lib/main.js @@ -33,7 +33,8 @@ var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' * @type {(symbol|null)} * * @example -* class Search1 { +* // eslint-disable stdlib/jsdoc-doctest +* class Search { * constructor( value ) { * this.value = value; * } @@ -42,8 +43,9 @@ var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' * } * } * -* console.log( 'foobar'.search( new Search1( 'bar' ) ) ); +* console.log( 'foobar'.search( new Search( 'bar' ) ) ); * // => 3 +* // eslint-enable stdlib/jsdoc-doctest */ var SearchSymbol = hasSearchSymbolSupport() ? Symbol.search : null; // eslint-disable-line max-len From 4bff70c23f77fc65bdb9b254ca6e983d0f8cd756 Mon Sep 17 00:00:00 2001 From: DiyanshuVortex Date: Wed, 12 Nov 2025 02:33:10 +0530 Subject: [PATCH 3/5] fix lint --- lib/node_modules/@stdlib/symbol/search/lib/main.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/symbol/search/lib/main.js b/lib/node_modules/@stdlib/symbol/search/lib/main.js index fc072518a3eb..b0691be40ab0 100644 --- a/lib/node_modules/@stdlib/symbol/search/lib/main.js +++ b/lib/node_modules/@stdlib/symbol/search/lib/main.js @@ -20,8 +20,7 @@ // MODULES // -var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' ); // eslint-disable-line id-length - +var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' ); // MAIN // @@ -34,7 +33,7 @@ var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' * * @example * // eslint-disable stdlib/jsdoc-doctest -* class Search { +* class MySearch { * constructor( value ) { * this.value = value; * } @@ -43,12 +42,11 @@ var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' * } * } * -* console.log( 'foobar'.search( new Search( 'bar' ) ) ); +* console.log( 'foobar'.search( new MySearch( 'bar' ) ) ); * // => 3 * // eslint-enable stdlib/jsdoc-doctest */ -var SearchSymbol = hasSearchSymbolSupport() ? Symbol.search : null; // eslint-disable-line max-len - +var SearchSymbol = ( hasSearchSymbolSupport() ) ? Symbol.search : null; // EXPORTS // From 728fe160b459d13384b8eda58ecf2a3ac4e6b1dd Mon Sep 17 00:00:00 2001 From: DiyanshuVortex Date: Wed, 12 Nov 2025 02:55:46 +0530 Subject: [PATCH 4/5] fix lint --- lib/node_modules/@stdlib/symbol/search/lib/main.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/symbol/search/lib/main.js b/lib/node_modules/@stdlib/symbol/search/lib/main.js index b0691be40ab0..29aa8b2c32a3 100644 --- a/lib/node_modules/@stdlib/symbol/search/lib/main.js +++ b/lib/node_modules/@stdlib/symbol/search/lib/main.js @@ -21,33 +21,35 @@ // MODULES // var hasSearchSymbolSupport = require( '@stdlib/assert/has-search-symbol-support' ); +var Symbol = require( '@stdlib/symbol/ctor' ); + // MAIN // /** -* Search symbol. +* Symbol which specifies the method to match against a string. * -* @name SearchSymbol * @constant * @type {(symbol|null)} * * @example * // eslint-disable stdlib/jsdoc-doctest -* class MySearch { +* class ExampleSearch { * constructor( value ) { * this.value = value; * } -* [ SearchSymbol ]( string ) { -* return string.indexOf( this.value ); +* [ SearchSymbol ]( str ) { +* return str.indexOf( this.value ); * } * } * -* console.log( 'foobar'.search( new MySearch( 'bar' ) ) ); +* console.log( 'foobar'.search( new ExampleSearch( 'bar' ) ) ); * // => 3 * // eslint-enable stdlib/jsdoc-doctest */ var SearchSymbol = ( hasSearchSymbolSupport() ) ? Symbol.search : null; + // EXPORTS // module.exports = SearchSymbol; From d398982b089fc7d324813ab1169cd6611a05b9e7 Mon Sep 17 00:00:00 2001 From: Divyanshu Date: Thu, 13 Nov 2025 11:25:34 +0530 Subject: [PATCH 5/5] Update main.js Signed-off-by: Divyanshu --- lib/node_modules/@stdlib/symbol/search/lib/main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/symbol/search/lib/main.js b/lib/node_modules/@stdlib/symbol/search/lib/main.js index 29aa8b2c32a3..de789a47f9cf 100644 --- a/lib/node_modules/@stdlib/symbol/search/lib/main.js +++ b/lib/node_modules/@stdlib/symbol/search/lib/main.js @@ -33,8 +33,7 @@ var Symbol = require( '@stdlib/symbol/ctor' ); * @type {(symbol|null)} * * @example -* // eslint-disable stdlib/jsdoc-doctest -* class ExampleSearch { +* class SearchSymbolExample { * constructor( value ) { * this.value = value; * } @@ -43,10 +42,10 @@ var Symbol = require( '@stdlib/symbol/ctor' ); * } * } * -* console.log( 'foobar'.search( new ExampleSearch( 'bar' ) ) ); +* console.log( 'foobar'.search( new SearchSymbolExample( 'bar' ) ) ); * // => 3 -* // eslint-enable stdlib/jsdoc-doctest */ + var SearchSymbol = ( hasSearchSymbolSupport() ) ? Symbol.search : null;