Skip to content

Commit d1a712d

Browse files
committed
docs: demonstrate prototype property
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 2ab5cd8 commit d1a712d

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

lib/node_modules/@stdlib/array/base/assert/any-has-property/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ var bool = anyHasProp( [ o1, o2, o3 ], 'b' );
6060

6161
bool = anyHasProp( [ o1, o2, o3 ], 'd' );
6262
// returns false
63+
64+
bool = anyHasProp( [ o1, o2, o3 ], 'toString' );
65+
// returns true
6366
```
6467

6568
</section>

lib/node_modules/@stdlib/array/base/assert/any-has-property/docs/repl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
true
2727
> out = {{alias}}( x, 'd' )
2828
false
29+
> out = {{alias}}( x, 'toString' )
30+
true
2931

3032
See Also
3133
--------

lib/node_modules/@stdlib/array/base/assert/any-has-property/docs/types/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ import { PropertyName } from '@stdlib/types/object';
4646
*
4747
* bool = anyHasProp( [ o1, o2, o3 ], 'd' );
4848
* // returns false
49+
*
50+
* bool = anyHasProp( [ o1, o2, o3 ], 'toString' );
51+
* // returns true
4952
*/
5053
declare function anyHasProp( arr: Collection<unknown> | AccessorArrayLike<unknown>, prop: PropertyName | number ): boolean;
5154

lib/node_modules/@stdlib/array/base/assert/any-has-property/test/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ tape( 'the function tests whether an input array contains at least one object ha
4848
t.strictEqual( anyHasProp( arr, 'a' ), true, 'returns expected value' );
4949
t.strictEqual( anyHasProp( arr, 'b' ), true, 'returns expected value' );
5050
t.strictEqual( anyHasProp( arr, 'c' ), true, 'returns expected value' );
51+
t.strictEqual( anyHasProp( arr, 'toString' ), true, 'returns expected value' );
5152
t.strictEqual( anyHasProp( arr, 'd' ), false, 'returns expected value' );
5253

5354
t.end();
@@ -68,6 +69,7 @@ tape( 'the function tests whether an input array contains at least one object ha
6869
t.strictEqual( anyHasProp( arr, 'a' ), true, 'returns expected value' );
6970
t.strictEqual( anyHasProp( arr, 'b' ), true, 'returns expected value' );
7071
t.strictEqual( anyHasProp( arr, 'c' ), true, 'returns expected value' );
72+
t.strictEqual( anyHasProp( arr, 'toString' ), true, 'returns expected value' );
7173
t.strictEqual( anyHasProp( arr, 'd' ), false, 'returns expected value' );
7274

7375
t.end();

0 commit comments

Comments
 (0)