8000 Auto-generated commit · stdlib-js/assert-contains@84e6ef1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 84e6ef1

Browse files
committed
Auto-generated commit
1 parent 32ce392 commit 84e6ef1

File tree

5 files changed

+10
-16
lines changed
  • lib
  • 5 files changed

    +10
    -16
    lines changed

    CHANGELOG.md

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

    7-
    ## Unreleased (2025-03-30)
    7+
    ## Unreleased (2025-03-31)
    88

    99
    <section class="features">
    1010

    1111
    ### Features
    1212

    13+
    - [`7ff916d`](https://github.com/stdlib-js/stdlib/commit/7ff916d9ab887aea71d5b3e525d60a0922440ded) - add accessor protocol support
    1314
    - [`fa71a1e`](https://github.com/stdlib-js/stdlib/commit/fa71a1e16b3abbb33e716c96999579fb74a28058) - distinguish between signed zeros
    1415

    1516
    </section>
    @@ -82,6 +83,7 @@
    8283

    8384
    <details>
    8485

    86+
    - [`7ff916d`](https://github.com/stdlib-js/stdlib/commit/7ff916d9ab887aea71d5b3e525d60a0922440ded) - **feat:** add accessor protocol support _(by Athan Reines)_
    8587
    - [`fa71a1e`](https://github.com/stdlib-js/stdlib/commit/fa71a1e16b3abbb33e716c96999579fb74a28058) - **feat:** distinguish between signed zeros _(by Athan Reines)_
    8688

    8789
    </details>

    dist/index.js

    Lines changed: 1 addition & 1 deletion
    Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

    dist/index.js.map

    Lines changed: 3 additions & 3 deletions
    Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

    lib/main.js

    Lines changed: 2 additions & 10 deletions
    Original file line numberDiff line numberDiff line change
    @@ -23,7 +23,7 @@
    2323
    var isCollection = require( '@stdlib/assert-is-collection' );
    2424
    var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;
    2525
    var isString = require( '@stdlib/assert-is-string' ).isPrimitive;
    26-
    var isSameValue = require( '@stdlib/assert-is-same-value' );
    26+
    var indexOfSameValue = require( '@stdlib/array-base-index-of-same-value' );
    2727
    var format = require( '@stdlib/string-format' );
    2828

    2929

    @@ -71,9 +71,7 @@ var format = require( '@stdlib/string-format' );
    7171
    */
    7272
    function contains( value, searchValue, position ) {
    7373
    var isStr;
    74-
    var len;
    7574
    var pos;
    76-
    var i;
    7775

    7876
    isStr = isString( value );
    7977
    if ( !isCollection( value ) && !isStr ) {
    @@ -99,13 +97,7 @@ function contains( value, searchValue, position ) {
    9997
    }
    10098
    return value.indexOf( searchValue, pos ) !== -1;
    10199
    }
    102-
    len = value.length;
    103-
    for ( i = pos; i < len; i++ ) {
    104-
    if ( isSameValue( value[ i ], searchValue ) ) {
    105-
    return true;
    106-
    }
    107-
    }
    108-
    return false;
    100+
    return indexOfSameValue( value, searchValue, pos ) !== -1;
    109101
    }
    110102

    111103

    package.json

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -37,9 +37,9 @@
    3737
    "url": "https://github.com/stdlib-js/stdlib/issues"
    3838
    },
    3939
    "dependencies": {
    40+
    "@stdlib/array-base-index-of-same-value": "github:stdlib-js/array-base-index-of-same-value#main",
    4041
    "@stdlib/assert-is-collection": "^0.2.2",
    4142
    "@stdlib/assert-is-integer": "^0.2.2",
    42-
    "@stdlib/assert-is-same-value": "^0.2.2",
    4343
    "@stdlib/assert-is-string": "^0.2.2",
    4444
    "@stdlib/string-format": "^0.2.2",
    4545
    "@stdlib/types": "^0.4.3",

    0 commit comments

    Comments
     (0)
    0