@stdlib/assert-is-same-array 0.2.2 → 0.2.3
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/NOTICE +1 -1
- package/README.md +11 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/lib/main.js +1 -4
- package/package.json +3 -3
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -119,6 +119,8 @@ out = isSameArray( x, y );
|
|
|
119
119
|
## See Also
|
|
120
120
|
|
|
121
121
|
- <span class="package-name">[`@stdlib/assert-is-array`][@stdlib/assert/is-array]</span><span class="delimiter">: </span><span class="description">test if a value is an array.</span>
|
|
122
|
+
- <span class="package-name">[`@stdlib/assert-is-equal-array`][@stdlib/assert/is-equal-array]</span><span class="delimiter">: </span><span class="description">test if two arguments are both generic arrays and have equal values.</span>
|
|
123
|
+
- <span class="package-name">[`@stdlib/assert-is-same-array-like`][@stdlib/assert/is-same-array-like]</span><span class="delimiter">: </span><span class="description">test if two arguments are both array-like and have the same values.</span>
|
|
122
124
|
- <span class="package-name">[`@stdlib/assert-is-same-value`][@stdlib/assert/is-same-value]</span><span class="delimiter">: </span><span class="description">test if two arguments are the same value.</span>
|
|
123
125
|
|
|
124
126
|
</section>
|
|
@@ -151,7 +153,7 @@ See [LICENSE][stdlib-license].
|
|
|
151
153
|
|
|
152
154
|
## Copyright
|
|
153
155
|
|
|
154
|
-
Copyright © 2016-
|
|
156
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
155
157
|
|
|
156
158
|
</section>
|
|
157
159
|
|
|
@@ -164,8 +166,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
164
166
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/assert-is-same-array.svg
|
|
165
167
|
[npm-url]: https://npmjs.org/package/@stdlib/assert-is-same-array
|
|
166
168
|
|
|
167
|
-
[test-image]: https://github.com/stdlib-js/assert-is-same-array/actions/workflows/test.yml/badge.svg?branch=v0.2.
|
|
168
|
-
[test-url]: https://github.com/stdlib-js/assert-is-same-array/actions/workflows/test.yml?query=branch:v0.2.
|
|
169
|
+
[test-image]: https://github.com/stdlib-js/assert-is-same-array/actions/workflows/test.yml/badge.svg?branch=v0.2.3
|
|
170
|
+
[test-url]: https://github.com/stdlib-js/assert-is-same-array/actions/workflows/test.yml?query=branch:v0.2.3
|
|
169
171
|
|
|
170
172
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert-is-same-array/main.svg
|
|
171
173
|
[coverage-url]: https://codecov.io/github/stdlib-js/assert-is-same-array?branch=main
|
|
@@ -177,8 +179,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
177
179
|
|
|
178
180
|
-->
|
|
179
181
|
|
|
180
|
-
[chat-image]: https://img.shields.io/
|
|
181
|
-
[chat-url]: https://
|
|
182
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
183
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
182
184
|
|
|
183
185
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
184
186
|
|
|
@@ -203,6 +205,10 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
203
205
|
|
|
204
206
|
[@stdlib/assert/is-array]: https://www.npmjs.com/package/@stdlib/assert-is-array
|
|
205
207
|
|
|
208
|
+
[@stdlib/assert/is-equal-array]: https://www.npmjs.com/package/@stdlib/assert-is-equal-array
|
|
209
|
+
|
|
210
|
+
[@stdlib/assert/is-same-array-like]: https://www.npmjs.com/package/@stdlib/assert-is-same-array-like
|
|
211
|
+
|
|
206
212
|
<!-- </related-links> -->
|
|
207
213
|
|
|
208
214
|
</section>
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var t=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var i=t(function(
|
|
2
|
-
var a=require('@stdlib/assert-is-array/dist'),u=require('@stdlib/array-base-assert-has-same-values/dist');function n(e,r){return a(e)&&a(r)
|
|
1
|
+
"use strict";var t=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var i=t(function(o,s){
|
|
2
|
+
var a=require('@stdlib/assert-is-array/dist'),u=require('@stdlib/array-base-assert-has-same-values/dist');function n(e,r){return a(e)&&a(r)&&u(e,r)}s.exports=n
|
|
3
3
|
});var c=i();module.exports=c;
|
|
4
4
|
/** @license Apache-2.0 */
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/main.js", "../lib/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArray = require( '@stdlib/assert-is-array' );\nvar hasSameValues = require( '@stdlib/array-base-assert-has-same-values' );\n\n\n// MAIN //\n\n/**\n* Tests if two arguments are both generic arrays and have the same values.\n*\n* @param {*} v1 - first value\n* @param {*} v2 - second value\n* @returns {boolean} boolean result\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0 ];\n* var y = [ 1.0, 2.0, 3.0 ];\n*\n* var out = isSameArray( x, y );\n* // returns true\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0 ];\n* var y = [ 1.0, 2.0, 4.0 ];\n*\n* var out = isSameArray( x, y );\n* // returns false\n*/\nfunction isSameArray( v1, v2 ) {\n\
|
|
5
|
-
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,yBAA0B,EAC7CC,EAAgB,QAAS,2CAA4C,EA0BzE,SAASC,EAAaC,EAAIC,EAAK,CAC9B,
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArray = require( '@stdlib/assert-is-array' );\nvar hasSameValues = require( '@stdlib/array-base-assert-has-same-values' );\n\n\n// MAIN //\n\n/**\n* Tests if two arguments are both generic arrays and have the same values.\n*\n* @param {*} v1 - first value\n* @param {*} v2 - second value\n* @returns {boolean} boolean result\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0 ];\n* var y = [ 1.0, 2.0, 3.0 ];\n*\n* var out = isSameArray( x, y );\n* // returns true\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0 ];\n* var y = [ 1.0, 2.0, 4.0 ];\n*\n* var out = isSameArray( x, y );\n* // returns false\n*/\nfunction isSameArray( v1, v2 ) {\n\treturn ( isArray( v1 ) && isArray( v2 ) && hasSameValues( v1, v2 ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSameArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if two arguments are both generic arrays and have the same values.\n*\n* @module @stdlib/assert-is-same-array\n*\n* @example\n* var isSameArray = require( '@stdlib/assert-is-same-array' );\n*\n* var x = [ 1.0, 2.0, 3.0 ];\n* var y = [ 1.0, 2.0, 3.0 ];\n*\n* var out = isSameArray( x, y );\n* // returns true\n*\n* @example\n* var isSameArray = require( '@stdlib/assert-is-same-array' );\n*\n* var x = [ 1.0, 2.0, 3.0 ];\n* var y = [ 1.0, 2.0, 4.0 ];\n*\n* var out = isSameArray( x, y );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,yBAA0B,EAC7CC,EAAgB,QAAS,2CAA4C,EA0BzE,SAASC,EAAaC,EAAIC,EAAK,CAC9B,OAASJ,EAASG,CAAG,GAAKH,EAASI,CAAG,GAAKH,EAAeE,EAAIC,CAAG,CAClE,CAKAL,EAAO,QAAUG,ICVjB,IAAIG,EAAO,IAKX,OAAO,QAAUA",
|
|
6
6
|
"names": ["require_main", "__commonJSMin", "exports", "module", "isArray", "hasSameValues", "isSameArray", "v1", "v2", "main"]
|
|
7
7
|
}
|
package/lib/main.js
CHANGED
|
@@ -48,10 +48,7 @@ var hasSameValues = require( '@stdlib/array-base-assert-has-same-values' );
|
|
|
48
48
|
* // returns false
|
|
49
49
|
*/
|
|
50
50
|
function isSameArray( v1, v2 ) {
|
|
51
|
-
|
|
52
|
-
return hasSameValues( v1, v2 );
|
|
53
|
-
}
|
|
54
|
-
return false;
|
|
51
|
+
return ( isArray( v1 ) && isArray( v2 ) && hasSameValues( v1, v2 ) );
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/assert-is-same-array",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Test if two arguments are both generic arrays and have the same values.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@stdlib/array-base-assert-has-same-values": "^0.
|
|
34
|
-
"@stdlib/assert-is-array": "^0.2.
|
|
33
|
+
"@stdlib/array-base-assert-has-same-values": "^0.3.0",
|
|
34
|
+
"@stdlib/assert-is-array": "^0.2.3"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|
|
37
37
|
"engines": {
|