Skip to content

Commit 7e73a58

Browse files
committed
Auto-generated commit
1 parent eeacc04 commit 7e73a58

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-10-12)
7+
## Unreleased (2026-10-23)
88

99
<section class="bug-fixes">
1010

@@ -34,6 +34,7 @@ A total of 10 issues were closed in this release:
3434

3535
<details>
3636

37+
- [`a9c5844`](https://github.com/stdlib-js/stdlib/commit/a9c5844dafa15737aaf319baed5cc2a894d6c261) - **docs:** add missing JSDoc examples in `utils/type-of` [(#16295)](https://github.com/stdlib-js/stdlib/pull/16295) _(by Philipp Burckhardt)_
3738
- [`ed03196`](https://github.com/stdlib-js/stdlib/commit/ed031969ed59525f9ce7418f9375a26fb70a4a89) - **fix:** ensure valid indexing of arguments array [(#15922)](https://github.com/stdlib-js/stdlib/pull/15922) _(by Manit Roy)_
3839
- [`08e741b`](https://github.com/stdlib-js/stdlib/commit/08e741bd1ce2c024ae86309676d1c0c3cd895c26) - **chore:** fix JavaScript lint errors [(#15439)](https://github.com/stdlib-js/stdlib/pull/15439) _(by MeowdyAGENT, Athan Reines)_
3940
- [`72b23ea`](https://github.com/stdlib-js/stdlib/commit/72b23ea594cad1265cd358ade0e366d682f5858d) - **chore:** clean-up [(#14383)](https://github.com/stdlib-js/stdlib/pull/14383) _(by Philipp Burckhardt)_

‎type-of/lib/main.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var ctorName = require( './../../constructor-name' );
24+
var lowercase = require( '@stdlib/string/base/lowercase' );
2425

2526

2627
// NOTES //
@@ -53,6 +54,14 @@ var ctorName = require( './../../constructor-name' );
5354
*
5455
* @param {*} v - input value
5556
* @returns {string} string indicating the value's type
57+
*
58+
* @example
59+
* var str = typeOf( 'a' );
60+
* // returns 'string'
61+
*
62+
* @example
63+
* var str = typeOf( 5 );
64+
* // returns 'number'
5665
*/
5766
function typeOf( v ) {
5867
var type;
@@ -65,7 +74,7 @@ function typeOf( v ) {
6574

6675
// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.
6776
if ( type === 'object' ) {
68-
return ctorName( v ).toLowerCase();
77+
return lowercase( ctorName( v ) );
6978
}
7079
return type;
7180
}

‎type-of/lib/polyfill.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var ctorName = require( './../../constructor-name' );
24+
var lowercase = require( '@stdlib/string/base/lowercase' );
2425

2526

2627
// MAIN //
@@ -30,9 +31,17 @@ var ctorName = require( './../../constructor-name' );
3031
*
3132
* @param {*} v - input value
3233
* @returns {string} string indicating the value's type
34+
*
35+
* @example
36+
* var str = typeOf( 'a' );
37+
* // returns 'string'
38+
*
39+
* @example
40+
* var str = typeOf( 5 );
41+
* // returns 'number'
3342
*/
3443
function typeOf( v ) {
35-
return ctorName( v ).toLowerCase();
44+
return lowercase( ctorName( v ) );
3645
}
3746

3847

0 commit comments

Comments
 (0)