@stdlib/assert-contains 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -215,8 +215,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
215
215
  [npm-image]: http://img.shields.io/npm/v/@stdlib/assert-contains.svg
216
216
  [npm-url]: https://npmjs.org/package/@stdlib/assert-contains
217
217
 
218
- [test-image]: https://github.com/stdlib-js/assert-contains/actions/workflows/test.yml/badge.svg?branch=v0.2.1
219
- [test-url]: https://github.com/stdlib-js/assert-contains/actions/workflows/test.yml?query=branch:v0.2.1
218
+ [test-image]: https://github.com/stdlib-js/assert-contains/actions/workflows/test.yml/badge.svg?branch=v0.2.2
219
+ [test-url]: https://github.com/stdlib-js/assert-contains/actions/workflows/test.yml?query=branch:v0.2.2
220
220
 
221
221
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert-contains/main.svg
222
222
  [coverage-url]: https://codecov.io/github/stdlib-js/assert-contains?branch=main
package/dist/index.js CHANGED
@@ -1,5 +1,19 @@
1
- "use strict";var o=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var g=o(function(h,m){
2
- var v=require('@stdlib/assert-is-collection/dist'),w=require('@stdlib/assert-is-integer/dist').isPrimitive,s=require('@stdlib/assert-is-string/dist').isPrimitive,f=require('@stdlib/assert-is-nan/dist').isPrimitive,a=require('@stdlib/error-tools-fmtprodmsg/dist');function d(r,e,n){var u,t,i;if(!v(r)&&!s(r))throw new TypeError(a('02b38',r));if(arguments.length<2)throw new Error(a('02b0A'));if(arguments.length>2){if(!w(n))throw new TypeError(a('02b2z',n));t=n,t<0&&(t=0)}else t=0;if(s(r)){if(!s(e))throw new TypeError(a('02b39',e));return r.indexOf(e,t)!==-1}if(u=r.length,f(e)){for(i=t;i<u;i++)if(f(r[i]))return!0;return!1}for(i=t;i<u;i++)if(r[i]===e)return!0;return!1}m.exports=d
3
- });var l=g();module.exports=l;
4
- /** @license Apache-2.0 */
1
+ "use strict";var o=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var g=o(function(h,m){"use strict";var v=require("@stdlib/assert-is-collection"),w=require("@stdlib/assert-is-integer").isPrimitive,s=require("@stdlib/assert-is-string").isPrimitive,f=require("@stdlib/assert-is-nan").isPrimitive,a=require("@stdlib/string-format");function d(r,e,n){var u,t,i;if(!v(r)&&!s(r))throw new TypeError(a("invalid argument. First argument must be array-like. Value: `%s`.",r));if(arguments.length<2)throw new Error("insufficient arguments. Must provide a search value.");if(arguments.length>2){if(!w(n))throw new TypeError(a("invalid argument. Third argument must be an integer. Value: `%s`.",n));t=n,t<0&&(t=0)}else t=0;if(s(r)){if(!s(e))throw new TypeError(a("invalid argument. Second argument must be a string. Value: `%s`.",e));return r.indexOf(e,t)!==-1}if(u=r.length,f(e)){for(i=t;i<u;i++)if(f(r[i]))return!0;return!1}for(i=t;i<u;i++)if(r[i]===e)return!0;return!1}m.exports=d});var l=g();module.exports=l;
2
+ /**
3
+ * @license Apache-2.0
4
+ *
5
+ * Copyright (c) 2018 The Stdlib Authors.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
5
19
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/assert-contains",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Test if an array-like value contains a search value.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -31,10 +31,11 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@stdlib/assert-is-collection": "^0.2.1",
34
- "@stdlib/assert-is-integer": "^0.2.1",
35
- "@stdlib/assert-is-nan": "^0.2.1",
36
- "@stdlib/assert-is-string": "^0.2.1",
37
- "@stdlib/string-format": "^0.2.1"
34
+ "@stdlib/assert-is-integer": "^0.2.2",
35
+ "@stdlib/assert-is-nan": "^0.2.2",
36
+ "@stdlib/assert-is-string": "^0.2.2",
37
+ "@stdlib/string-format": "^0.2.2",
38
+ "@stdlib/error-tools-fmtprodmsg": "^0.2.2"
38
39
  },
39
40
  "devDependencies": {},
40
41
  "engines": {