@stdlib/assert-is-complex-like 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
@@ -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 );
@@ -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 ) );
@@ -182,8 +182,8 @@ 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.2
186
+ [test-url]: https://github.com/stdlib-js/assert-is-complex-like/actions/workflows/test.yml?query=branch:v0.2.2
187
187
 
188
188
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert-is-complex-like/main.svg
189
189
  [coverage-url]: https://codecov.io/github/stdlib-js/assert-is-complex-like?branch=main
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.2",
4
4
  "description": "Test if a value is a complex number-like object.",
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/complex-float32": "^0.2.1",
34
- "@stdlib/complex-float64": "^0.2.1"
33
+ "@stdlib/complex-float32-ctor": "^0.0.2",
34
+ "@stdlib/complex-float64-ctor": "^0.0.2"
35
35
  },
36
36
  "devDependencies": {},
37
37
  "engines": {