diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/README.md b/lib/node_modules/@stdlib/utils/json-pointer/has/README.md
new file mode 100644
index 000000000000..667266a7e42c
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/README.md
@@ -0,0 +1,150 @@
+
+
+# has
+
+> Test if a [JSON Pointer][json-pointer] ([RFC 6901][rfc-6901]) resolves to a value in a document.
+
+
+
+## Usage
+
+```javascript
+var has = require( '@stdlib/utils/json-pointer/has' );
+```
+
+#### has( document, pointer )
+
+Tests if a [JSON Pointer][json-pointer] resolves to a value in a document.
+
+```javascript
+var obj = {
+ 'foo': [ 'bar', 'baz' ]
+};
+var bool = has( obj, '/foo/0' );
+// returns true
+
+obj = {
+ 'foo': 'bar'
+};
+bool = has( obj, '/foo' );
+// returns true
+
+bool = has( obj, '/missing' );
+// returns false
+
+bool = has( obj, '' );
+// returns true
+```
+
+
+
+
+
+
+
+## Notes
+
+- Per [RFC 6901][rfc-6901], an empty string refers to the root of the document and returns `true` for any valid object or array.
+- The `-` token on an array references the position after the last element (nonexistent element), so it returns `false`.
+
+
+
+
+
+
+
+
+
+## Examples
+
+```javascript
+var has = require( '@stdlib/utils/json-pointer/has' );
+
+var doc = {
+ 'foo': [ 'bar', 'baz' ],
+ '': 0,
+ 'a/b': 1,
+ 'm~n': 8
+};
+
+var bool = has( doc, '/foo' );
+// returns true
+
+bool = has( doc, '/foo/0' );
+// returns true
+
+bool = has( doc, '/foo/99' );
+// returns false
+
+bool = has( doc, '/foo/-' );
+// returns false
+
+bool = has( doc, '/' );
+// returns true
+
+bool = has( doc, '/a~1b' );
+// returns true
+
+bool = has( doc, '/m~0n' );
+// returns true
+
+bool = has( doc, '/nonexistent' );
+// returns false
+
+bool = has( doc, '' );
+// returns true
+```
+
+
+
+
+
+
+
+
+
+## References
+
+- [RFC 6901 - JavaScript Object Notation (JSON) Pointer][rfc-6901]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[json-pointer]: https://datatracker.ietf.org/doc/html/rfc6901
+
+[rfc-6901]: https://datatracker.ietf.org/doc/html/rfc6901
+
+
+
+
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/benchmark/benchmark.js b/lib/node_modules/@stdlib/utils/json-pointer/has/benchmark/benchmark.js
new file mode 100644
index 000000000000..4c1f60957ba5
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/benchmark/benchmark.js
@@ -0,0 +1,163 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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 bench = require( '@stdlib/bench' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var has = require( './../lib' );
+
+
+// MAIN //
+
+bench( format( '%s:shallow', pkg ), function benchmark( b ) {
+ var doc;
+ var out;
+ var i;
+
+ doc = {
+ 'foo': 'bar',
+ 'baz': 'qux'
+ };
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = has( doc, '/foo' );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( out !== true ) {
+ b.fail( 'should return expected value' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( format( '%s:deep', pkg ), function benchmark( b ) {
+ var doc;
+ var out;
+ var i;
+
+ doc = {
+ 'a': {
+ 'b': {
+ 'c': {
+ 'd': {
+ 'e': {
+ 'f': 42
+ }
+ }
+ }
+ }
+ }
+ };
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = has( doc, '/a/b/c/d/e/f' );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( out !== true ) {
+ b.fail( 'should return expected value' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( format( '%s:array', pkg ), function benchmark( b ) {
+ var doc;
+ var out;
+ var i;
+
+ doc = {
+ 'arr': [
+ [ 10, 20 ],
+ [ 30, 40 ]
+ ]
+ };
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = has( doc, '/arr/0/1' );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( out !== true ) {
+ b.fail( 'should return expected value' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( format( '%s:missing', pkg ), function benchmark( b ) {
+ var doc;
+ var out;
+ var i;
+
+ doc = {
+ 'foo': 'bar'
+ };
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = has( doc, '/missing' );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( out !== false ) {
+ b.fail( 'should return expected value' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( format( '%s:root', pkg ), function benchmark( b ) {
+ var doc;
+ var out;
+ var i;
+
+ doc = {
+ 'foo': 'bar'
+ };
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = has( doc, '' );
+ if ( typeof out !== 'boolean' ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( out !== true ) {
+ b.fail( 'should return expected value' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/docs/repl.txt b/lib/node_modules/@stdlib/utils/json-pointer/has/docs/repl.txt
new file mode 100644
index 000000000000..8a7136648763
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/docs/repl.txt
@@ -0,0 +1,37 @@
+
+{{alias}}( document, pointer )
+ Tests if a JSON Pointer resolves to a value in a document.
+
+ Per RFC 6901, an empty string refers to the root of the document and
+ returns `true` for any valid object or array.
+
+ The `-` token on an array references the position after the last element
+ (nonexistent element), so it returns `false`.
+
+ Parameters
+ ----------
+ document: Object|Array
+ JSON document.
+
+ pointer: string
+ JSON Pointer string.
+
+ Returns
+ -------
+ bool: boolean
+ Boolean indicating if pointer resolves.
+
+ Examples
+ --------
+ > var bool = {{alias}}( { 'foo': [ 'bar', 'baz' ] }, '/foo/0' )
+ true
+ > bool = {{alias}}( { 'foo': 'bar' }, '/foo' )
+ true
+ > bool = {{alias}}( { 'foo': 'bar' }, '/missing' )
+ false
+ > bool = {{alias}}( { 'foo': 'bar' }, '' )
+ true
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/json-pointer/has/docs/types/index.d.ts
new file mode 100644
index 000000000000..3857621631d9
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/docs/types/index.d.ts
@@ -0,0 +1,56 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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
+
+/**
+* Tests if a JSON Pointer resolves to a value in a document.
+*
+* ## Notes
+*
+* - Implements pointer resolution check per RFC 6901.
+* - Returns `true` if the pointer resolves to an existing property or array element; otherwise `false`.
+* - An empty string pointer refers to the root of the document and returns `true` for any valid object or array.
+* - The `-` token on an array references the position after the last element (nonexistent element), so it returns `false`.
+*
+* @param document - JSON document
+* @param pointer - JSON Pointer string
+* @returns boolean indicating if pointer resolves
+*
+* @example
+* var bool = has( { 'foo': [ 'bar', 'baz' ] }, '/foo/0' );
+* // returns true
+*
+* @example
+* var bool = has( { 'foo': 'bar' }, '/foo' );
+* // returns true
+*
+* @example
+* var bool = has( { 'foo': 'bar' }, '/missing' );
+* // returns false
+*
+* @example
+* var bool = has( { 'foo': 'bar' }, '' );
+* // returns true
+*/
+declare function has( document: Record | Array, pointer: string ): boolean;
+
+
+// EXPORTS //
+
+export = has;
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/docs/types/test.ts b/lib/node_modules/@stdlib/utils/json-pointer/has/docs/types/test.ts
new file mode 100644
index 000000000000..0bbf949222df
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/docs/types/test.ts
@@ -0,0 +1,56 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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.
+*/
+
+import has = require( './index' );
+
+
+// TESTS //
+
+// The function returns a boolean...
+{
+ has( { 'foo': 'bar' }, '/foo' ); // $ExpectType boolean
+ has( [ 1, 2, 3 ], '/0' ); // $ExpectType boolean
+ has( { 'foo': 'bar' }, '' ); // $ExpectType boolean
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an object or array...
+{
+ has( 'abc', '/foo' ); // $ExpectError
+ has( 123, '/foo' ); // $ExpectError
+ has( true, '/foo' ); // $ExpectError
+ has( null, '/foo' ); // $ExpectError
+ has( undefined, '/foo' ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a string...
+{
+ has( { 'foo': 'bar' }, 123 ); // $ExpectError
+ has( { 'foo': 'bar' }, true ); // $ExpectError
+ has( { 'foo': 'bar' }, false ); // $ExpectError
+ has( { 'foo': 'bar' }, null ); // $ExpectError
+ has( { 'foo': 'bar' }, undefined ); // $ExpectError
+ has( { 'foo': 'bar' }, [] ); // $ExpectError
+ has( { 'foo': 'bar' }, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an invalid number of arguments...
+{
+ has(); // $ExpectError
+ has( { 'foo': 'bar' } ); // $ExpectError
+ has( { 'foo': 'bar' }, '/foo', 'extra' ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/examples/index.js b/lib/node_modules/@stdlib/utils/json-pointer/has/examples/index.js
new file mode 100644
index 000000000000..a675bfe35893
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/examples/index.js
@@ -0,0 +1,64 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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';
+
+var has = require( './../lib' );
+
+var doc = {
+ 'foo': [ 'bar', 'baz' ],
+ '': 0,
+ 'a/b': 1,
+ 'm~n': 8
+};
+
+var bool = has( doc, '/foo' );
+console.log( bool );
+// => true
+
+bool = has( doc, '/foo/0' );
+console.log( bool );
+// => true
+
+bool = has( doc, '/foo/99' );
+console.log( bool );
+// => false
+
+bool = has( doc, '/foo/-' );
+console.log( bool );
+// => false
+
+bool = has( doc, '/' );
+console.log( bool );
+// => true
+
+bool = has( doc, '/a~1b' );
+console.log( bool );
+// => true
+
+bool = has( doc, '/m~0n' );
+console.log( bool );
+// => true
+
+bool = has( doc, '/nonexistent' );
+console.log( bool );
+// => false
+
+bool = has( doc, '' );
+console.log( bool );
+// => true
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/lib/index.js b/lib/node_modules/@stdlib/utils/json-pointer/has/lib/index.js
new file mode 100644
index 000000000000..6016b77bd2b1
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/lib/index.js
@@ -0,0 +1,49 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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';
+
+/**
+* Test if a JSON Pointer resolves to a value in a document.
+*
+* @module @stdlib/utils/json-pointer/has
+*
+* @example
+* var has = require( '@stdlib/utils/json-pointer/has' );
+*
+* var bool = has( { 'foo': [ 'bar', 'baz' ] }, '/foo/0' );
+* // returns true
+*
+* bool = has( { 'foo': 'bar' }, '/foo' );
+* // returns true
+*
+* bool = has( { 'foo': 'bar' }, '/missing' );
+* // returns false
+*
+* bool = has( { 'foo': 'bar' }, '' );
+* // returns true
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/lib/main.js b/lib/node_modules/@stdlib/utils/json-pointer/has/lib/main.js
new file mode 100644
index 000000000000..d368cff52cf8
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/lib/main.js
@@ -0,0 +1,76 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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 hasOwnProp = require( '@stdlib/assert/has-own-property' );
+var resolve = require( '@stdlib/utils/json-pointer/resolve' );
+
+
+// MAIN //
+
+/**
+* Tests if a JSON Pointer resolves to a value in a document.
+*
+* ## Notes
+*
+* - Implements pointer resolution check per RFC 6901.
+* - Returns `true` if the pointer resolves to an existing property or array element; otherwise `false`.
+* - An empty string pointer refers to the root of the document and returns `true` for any valid object or array.
+* - The `-` token on an array references the position after the last element (nonexistent element), so it returns `false`.
+*
+* @param {(Object|Array)} document - JSON document
+* @param {string} pointer - JSON Pointer string
+* @returns {boolean} boolean indicating if pointer resolves
+*
+* @example
+* var bool = has( { 'foo': [ 'bar', 'baz' ] }, '/foo/0' );
+* // returns true
+*
+* @example
+* var bool = has( { 'foo': 'bar' }, '/foo' );
+* // returns true
+*
+* @example
+* var bool = has( { 'foo': 'bar' }, '/missing' );
+* // returns false
+*
+* @example
+* var bool = has( { 'foo': 'bar' }, '' );
+* // returns true
+*/
+function has( document, pointer ) {
+ var res;
+
+ try {
+ res = resolve( document, pointer );
+ } catch ( err ) { // eslint-disable-line no-unused-vars
+ return false;
+ }
+ if ( res.key === null ) {
+ return true;
+ }
+ return hasOwnProp( res.target, res.key );
+}
+
+
+// EXPORTS //
+
+module.exports = has;
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/package.json b/lib/node_modules/@stdlib/utils/json-pointer/has/package.json
new file mode 100644
index 000000000000..dc994c43255d
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "@stdlib/utils/json-pointer/has",
+ "version": "0.0.0",
+ "description": "Test if a JSON Pointer resolves to a value in a document.",
+ "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": {
+ "benchmark": "./benchmark",
+ "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",
+ "stdutils",
+ "stdutil",
+ "utilities",
+ "utility",
+ "utils",
+ "util",
+ "json",
+ "pointer",
+ "json-pointer",
+ "rfc6901",
+ "rfc",
+ "6901",
+ "has",
+ "exists",
+ "test",
+ "check",
+ "resolve"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/utils/json-pointer/has/test/test.js b/lib/node_modules/@stdlib/utils/json-pointer/has/test/test.js
new file mode 100644
index 000000000000..67141e461cd3
--- /dev/null
+++ b/lib/node_modules/@stdlib/utils/json-pointer/has/test/test.js
@@ -0,0 +1,212 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 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 no-useless-escape */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var has = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof has, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function returns false if the first argument is not an object or array', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ 'abc',
+ 5,
+ NaN,
+ true,
+ null,
+ void 0,
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.strictEqual( has( values[ i ], '/foo' ), false, 'returns expected value' );
+ }
+ t.end();
+});
+
+tape( 'the function returns false if the second argument is not a string', function test( t ) {
+ var values;
+ var doc;
+ var i;
+
+ doc = {
+ 'foo': 'bar'
+ };
+ values = [
+ 5,
+ NaN,
+ true,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.strictEqual( has( doc, values[ i ] ), false, 'returns expected value' );
+ }
+ t.end();
+});
+
+tape( 'the function returns false for invalid pointer syntax', function test( t ) {
+ var values;
+ var doc;
+ var i;
+
+ doc = {
+ 'foo': 'bar'
+ };
+ values = [
+ 'foo',
+ 'foo/bar',
+ 'bar'
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.strictEqual( has( doc, values[ i ] ), false, 'returns expected value' );
+ }
+ t.end();
+});
+
+tape( 'the function returns true for an empty pointer referencing valid objects or arrays', function test( t ) {
+ var doc;
+
+ doc = {
+ 'foo': 'bar'
+ };
+ t.strictEqual( has( doc, '' ), true, 'returns expected value' );
+
+ doc = [ 1, 2, 3 ];
+ t.strictEqual( has( doc, '' ), true, 'returns expected value' );
+
+ doc = {};
+ t.strictEqual( has( doc, '' ), true, 'returns expected value' );
+
+ doc = [];
+ t.strictEqual( has( doc, '' ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function tests pointers on objects', function test( t ) {
+ var values;
+ var doc;
+ var i;
+
+ doc = {
+ 'foo': [ 'bar', 'baz' ],
+ '': 0,
+ 'a/b': 1,
+ 'c%d': 2,
+ 'e^f': 3,
+ 'g|h': 4,
+ 'i\\j': 5,
+ 'k\"l': 6,
+ ' ': 7,
+ 'm~n': 8
+ };
+
+ values = [
+ '/foo',
+ '/',
+ '/a~1b',
+ '/c%d',
+ '/e^f',
+ '/g|h',
+ '/i\\j',
+ '/k\"l',
+ '/ ',
+ '/m~0n'
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.strictEqual( has( doc, values[ i ] ), true, 'returns expected value' );
+ }
+ t.end();
+});
+
+tape( 'the function tests pointers on arrays', function test( t ) {
+ var doc;
+
+ doc = {
+ 'foo': [ 'bar', 'baz', 'qux' ]
+ };
+
+ t.strictEqual( has( doc, '/foo/0' ), true, 'returns expected value' );
+ t.strictEqual( has( doc, '/foo/1' ), true, 'returns expected value' );
+ t.strictEqual( has( doc, '/foo/2' ), true, 'returns expected value' );
+ t.strictEqual( has( doc, '/foo/3' ), false, 'returns expected value' );
+ t.strictEqual( has( doc, '/foo/99' ), false, 'returns expected value' );
+ t.strictEqual( has( doc, '/foo/-1' ), false, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns false for the `-` token on an array', function test( t ) {
+ var doc;
+
+ doc = {
+ 'foo': [ 'a', 'b', 'c' ]
+ };
+
+ t.strictEqual( has( doc, '/foo/-' ), false, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function tests nested pointers', function test( t ) {
+ var doc;
+
+ doc = {
+ 'a': {
+ 'b': {
+ 'c': 42
+ }
+ }
+ };
+
+ t.strictEqual( has( doc, '/a/b/c' ), true, 'returns expected value' );
+ t.strictEqual( has( doc, '/a/x/c' ), false, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns false when traversing into a primitive', function test( t ) {
+ var doc;
+
+ doc = {
+ 'foo': 'bar'
+ };
+ t.strictEqual( has( doc, '/foo/baz' ), false, 'returns expected value' );
+
+ doc = {
+ 'foo': 42
+ };
+ t.strictEqual( has( doc, '/foo/bar' ), false, 'returns expected value' );
+ t.end();
+});