@stdlib/assert-contains 0.2.0 → 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 +2 -2
- package/dist/index.js +18 -4
- package/package.json +10 -28
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.
|
|
219
|
-
[test-url]: https://github.com/stdlib-js/assert-contains/actions/workflows/test.yml?query=branch:v0.2.
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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.
|
|
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": {
|
|
@@ -15,19 +15,12 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "./lib",
|
|
17
17
|
"directories": {
|
|
18
|
-
"benchmark": "./benchmark",
|
|
19
18
|
"doc": "./docs",
|
|
20
|
-
"example": "./examples",
|
|
21
19
|
"lib": "./lib",
|
|
22
|
-
"
|
|
20
|
+
"dist": "./dist"
|
|
23
21
|
},
|
|
24
22
|
"types": "./docs/types",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"test": "make test",
|
|
27
|
-
"test-cov": "make test-cov",
|
|
28
|
-
"examples": "make examples",
|
|
29
|
-
"benchmark": "make benchmark"
|
|
30
|
-
},
|
|
23
|
+
"scripts": {},
|
|
31
24
|
"homepage": "https://stdlib.io",
|
|
32
25
|
"repository": {
|
|
33
26
|
"type": "git",
|
|
@@ -37,25 +30,14 @@
|
|
|
37
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
38
31
|
},
|
|
39
32
|
"dependencies": {
|
|
40
|
-
"@stdlib/assert-is-collection": "^0.2.
|
|
41
|
-
"@stdlib/assert-is-integer": "^0.2.
|
|
42
|
-
"@stdlib/assert-is-nan": "^0.2.
|
|
43
|
-
"@stdlib/assert-is-string": "^0.2.
|
|
44
|
-
"@stdlib/string-format": "^0.2.
|
|
45
|
-
"@stdlib/
|
|
46
|
-
"@stdlib/error-tools-fmtprodmsg": "^0.1.1"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@stdlib/assert-is-boolean": "^0.1.1",
|
|
50
|
-
"@stdlib/math-base-special-pow": "^0.1.0",
|
|
51
|
-
"@stdlib/random-base-randu": "^0.1.0",
|
|
52
|
-
"@stdlib/string-from-code-point": "^0.1.0",
|
|
53
|
-
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
54
|
-
"istanbul": "^0.4.1",
|
|
55
|
-
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
|
|
56
|
-
"@stdlib/bench-harness": "^0.1.2",
|
|
57
|
-
"@stdlib/bench": "^0.3.1"
|
|
33
|
+
"@stdlib/assert-is-collection": "^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"
|
|
58
39
|
},
|
|
40
|
+
"devDependencies": {},
|
|
59
41
|
"engines": {
|
|
60
42
|
"node": ">=0.10.0",
|
|
61
43
|
"npm": ">2.7.0"
|