Skip to content

Commit 3de9942

Browse files
committed
Auto-generated commit
1 parent 3755ea2 commit 3de9942

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/contains.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var format = require( '@stdlib/string-format' );
3737
* @param {integer} [position=0] - position at which to start searching for `searchValue`
3838
* @throws {TypeError} first argument must be array-like
3939
* @throws {Error} must provide a search value
40-
* @throws {TypeError} second argument must be a primitive string primitive when the first argument is a string
40+
* @throws {TypeError} second argument must be a string when the first argument is a string
4141
* @throws {TypeError} third argument must be an integer
4242
* @returns {boolean} boolean indicating whether one value contains another
4343
*
@@ -92,7 +92,7 @@ function contains( val, searchValue, position ) {
9292
}
9393
if ( isString( val ) ) {
9494
if ( !isString( searchValue ) ) {
95-
throw new TypeError( format( 'invalid argument. Second argument must be a string primitive. Value: `%s`.', searchValue ) );
95+
throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', searchValue ) );
9696
}
9797
return val.indexOf( searchValue, pos ) !== -1;
9898
}

0 commit comments

Comments
 (0)