@stdlib/assert-is-complex-like 0.2.1 → 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 CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -58,8 +58,8 @@ var isComplexLike = require( '@stdlib/assert-is-complex-like' );
58
58
  Tests if a value is a complex number-like `object`.
59
59
 
60
60
  ```javascript
61
- var Complex128 = require( '@stdlib/complex-float64' );
62
- var Complex64 = require( '@stdlib/complex-float32' );
61
+ var Complex128 = require( '@stdlib/complex-float64-ctor' );
62
+ var Complex64 = require( '@stdlib/complex-float32-ctor' );
63
63
 
64
64
  var x = new Complex128( 1.0, 3.0 );
65
65
  var bool = isComplexLike( x );
@@ -82,7 +82,7 @@ bool = isComplexLike( x );
82
82
  <!-- /.usage -->
83
83
 
84
84
  <section class="notes">
85
-
85
+
86
86
  ## Notes
87
87
 
88
88
  - A complex number-like `object` is defined as an `object` having the following properties assigned to numeric values:
@@ -103,8 +103,8 @@ bool = isComplexLike( x );
103
103
  <!-- eslint-disable object-curly-newline, object-property-newline -->
104
104
 
105
105
  ```javascript
106
- var Complex64 = require( '@stdlib/complex-float32' );
107
- var Complex128 = require( '@stdlib/complex-float64' );
106
+ var Complex64 = require( '@stdlib/complex-float32-ctor' );
107
+ var Complex128 = require( '@stdlib/complex-float64-ctor' );
108
108
  var isComplexLike = require( '@stdlib/assert-is-complex-like' );
109
109
 
110
110
  var out = isComplexLike( new Complex64( 2.0, 2.0 ) );
@@ -169,7 +169,7 @@ See [LICENSE][stdlib-license].
169
169
 
170
170
  ## Copyright
171
171
 
172
- Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
172
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
173
173
 
174
174
  </section>
175
175
 
@@ -182,11 +182,11 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
182
182
  [npm-image]: http://img.shields.io/npm/v/@stdlib/assert-is-complex-like.svg
183
183
  [npm-url]: https://npmjs.org/package/@stdlib/assert-is-complex-like
184
184
 
185
- [test-image]: https://github.com/stdlib-js/assert-is-complex-like/actions/workflows/test.yml/badge.svg?branch=v0.2.1
186
- [test-url]: https://github.com/stdlib-js/assert-is-complex-like/actions/workflows/test.yml?query=branch:v0.2.1
185
+ [test-image]: https://github.com/stdlib-js/assert-is-complex-like/actions/workflows/test.yml/badge.svg?branch=v0.2.3
186
+ [test-url]: https://github.com/stdlib-js/assert-is-complex-like/actions/workflows/test.yml?query=branch:v0.2.3
187
187
 
188
188
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert-is-complex-like/main.svg
189
- [coverage-url]: https://codecov.io/github/stdlib-js/assert-is-complex-like?branch=main
189
+ [coverage-url]: https://codecov.io/github/stdlib-js/assert-is-complex-like?branch=v0.2.3
190
190
 
191
191
  <!--
192
192
 
@@ -195,8 +195,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
195
195
 
196
196
  -->
197
197
 
198
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
199
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
198
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
199
+ [chat-url]: https://stdlib.zulipchat.com
200
200
 
201
201
  [stdlib]: https://github.com/stdlib-js/stdlib
202
202
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";var n=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var i=n(function(u,t){
2
- var o=require('@stdlib/complex-float64/dist'),s=require('@stdlib/complex-float32/dist');function p(e){return e instanceof o||e instanceof s?!0:typeof e=="object"&&e!==null&&typeof e.re=="number"&&typeof e.im=="number"}t.exports=p
2
+ var o=require('@stdlib/complex-float64-ctor/dist'),s=require('@stdlib/complex-float32-ctor/dist');function p(e){return e instanceof o||e instanceof s?!0:typeof e=="object"&&e!==null&&typeof e.re=="number"&&typeof e.im=="number"}t.exports=p
3
3
  });var f=i();module.exports=f;
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) 2018 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 Complex128 = require( '@stdlib/complex-float64' );\nvar Complex64 = require( '@stdlib/complex-float32' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isComplexLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 a value is a complex number-like object.\n*\n* @module @stdlib/assert-is-complex-like\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var isComplexLike = require( '@stdlib/assert-is-complex-like' );\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\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,EAAa,QAAS,yBAA0B,EAChDC,EAAY,QAAS,yBAA0B,EAuBnD,SAASC,EAAeC,EAAQ,CAC/B,OAAKA,aAAiBH,GAAcG,aAAiBF,EAC7C,GAGP,OAAOE,GAAU,UACjBA,IAAU,MACV,OAAOA,EAAM,IAAO,UACpB,OAAOA,EAAM,IAAO,QAEtB,CAKAJ,EAAO,QAAUG,ICpBjB,IAAIE,EAAO,IAKX,OAAO,QAAUA",
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 Complex128 = require( '@stdlib/complex-float64-ctor' );\nvar Complex64 = require( '@stdlib/complex-float32-ctor' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64-ctor' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isComplexLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 a value is a complex number-like object.\n*\n* @module @stdlib/assert-is-complex-like\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64-ctor' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var isComplexLike = require( '@stdlib/assert-is-complex-like' );\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\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,EAAa,QAAS,8BAA+B,EACrDC,EAAY,QAAS,8BAA+B,EAuBxD,SAASC,EAAeC,EAAQ,CAC/B,OAAKA,aAAiBH,GAAcG,aAAiBF,EAC7C,GAGP,OAAOE,GAAU,UACjBA,IAAU,MACV,OAAOA,EAAM,IAAO,UACpB,OAAOA,EAAM,IAAO,QAEtB,CAKAJ,EAAO,QAAUG,ICpBjB,IAAIE,EAAO,IAKX,OAAO,QAAUA",
6
6
  "names": ["require_main", "__commonJSMin", "exports", "module", "Complex128", "Complex64", "isComplexLike", "value", "main"]
7
7
  }
@@ -29,8 +29,8 @@ import { ComplexLike } from '@stdlib/types/complex';
29
29
  * @returns boolean indicating if a value is a complex number-like object.
30
30
  *
31
31
  * @example
32
- * var Complex128 = require( '@stdlib/complex-float64' );
33
- * var Complex64 = require( '@stdlib/complex-float32' );
32
+ * var Complex128 = require( '@stdlib/complex-float64-ctor' );
33
+ * var Complex64 = require( '@stdlib/complex-float32-ctor' );
34
34
  *
35
35
  * var x = new Complex128( 4.0, 2.0 );
36
36
  * var bool = isComplexLike( x );
package/lib/index.js CHANGED
@@ -24,8 +24,8 @@
24
24
  * @module @stdlib/assert-is-complex-like
25
25
  *
26
26
  * @example
27
- * var Complex128 = require( '@stdlib/complex-float64' );
28
- * var Complex64 = require( '@stdlib/complex-float32' );
27
+ * var Complex128 = require( '@stdlib/complex-float64-ctor' );
28
+ * var Complex64 = require( '@stdlib/complex-float32-ctor' );
29
29
  * var isComplexLike = require( '@stdlib/assert-is-complex-like' );
30
30
  *
31
31
  * var x = new Complex128( 4.0, 2.0 );
package/lib/main.js CHANGED
@@ -20,8 +20,8 @@
20
20
 
21
21
  // MODULES //
22
22
 
23
- var Complex128 = require( '@stdlib/complex-float64' );
24
- var Complex64 = require( '@stdlib/complex-float32' );
23
+ var Complex128 = require( '@stdlib/complex-float64-ctor' );
24
+ var Complex64 = require( '@stdlib/complex-float32-ctor' );
25
25
 
26
26
 
27
27
  // MAIN //
@@ -33,8 +33,8 @@ var Complex64 = require( '@stdlib/complex-float32' );
33
33
  * @returns {boolean} boolean indicating if a value is a complex number-like object.
34
34
  *
35
35
  * @example
36
- * var Complex128 = require( '@stdlib/complex-float64' );
37
- * var Complex64 = require( '@stdlib/complex-float32' );
36
+ * var Complex128 = require( '@stdlib/complex-float64-ctor' );
37
+ * var Complex64 = require( '@stdlib/complex-float32-ctor' );
38
38
  *
39
39
  * var x = new Complex128( 4.0, 2.0 );
40
40
  * var bool = isComplexLike( x );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/assert-is-complex-like",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Test if a value is a complex number-like object.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -15,12 +15,19 @@
15
15
  ],
16
16
  "main": "./lib",
17
17
  "directories": {
18
+ "benchmark": "./benchmark",
18
19
  "doc": "./docs",
20
+ "example": "./examples",
19
21
  "lib": "./lib",
20
- "dist": "./dist"
22
+ "test": "./test"
21
23
  },
22
24
  "types": "./docs/types",
23
- "scripts": {},
25
+ "scripts": {
26
+ "test": "make test",
27
+ "test-cov": "make test-cov",
28
+ "examples": "make examples",
29
+ "benchmark": "make benchmark"
30
+ },
24
31
  "homepage": "https://stdlib.io",
25
32
  "repository": {
26
33
  "type": "git",
@@ -30,10 +37,17 @@
30
37
  "url": "https://github.com/stdlib-js/stdlib/issues"
31
38
  },
32
39
  "dependencies": {
33
- "@stdlib/complex-float32": "^0.2.1",
34
- "@stdlib/complex-float64": "^0.2.1"
40
+ "@stdlib/complex-float32-ctor": "^0.1.0",
41
+ "@stdlib/complex-float64-ctor": "^0.1.1",
42
+ "@stdlib/types": "^0.4.3"
43
+ },
44
+ "devDependencies": {
45
+ "@stdlib/assert-is-boolean": "^0.2.2",
46
+ "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
47
+ "istanbul": "^0.4.1",
48
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git",
49
+ "@stdlib/bench-harness": "^0.2.2"
35
50
  },
36
- "devDependencies": {},
37
51
  "engines": {
38
52
  "node": ">=0.10.0",
39
53
  "npm": ">2.7.0"