@stdlib/complex-base 0.1.0 → 0.2.0
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 +9 -3
- package/SECURITY.md +5 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/docs/types/index.d.ts +14 -9
- package/lib/index.js +9 -0
- package/package.json +39 -16
- package/CITATION.cff +0 -30
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ The namespace contains the following functions:
|
|
|
68
68
|
|
|
69
69
|
<div class="namespace-toc">
|
|
70
70
|
|
|
71
|
+
- <span class="signature">[`assert`][@stdlib/complex/base/assert]</span><span class="delimiter">: </span><span class="description">base complex number assert functions.</span>
|
|
71
72
|
- <span class="signature">[`cast( fcn, nargs, ctor )`][@stdlib/complex/base/cast-return]</span><span class="delimiter">: </span><span class="description">wrap a function and cast a function's return value to a complex number.</span>
|
|
72
73
|
- <span class="signature">[`wrap( fcn, nargs, ctor )`][@stdlib/complex/base/wrap-function]</span><span class="delimiter">: </span><span class="description">wrap a function accepting complex number arguments to support providing both real and complex numbers.</span>
|
|
73
74
|
|
|
@@ -140,7 +141,7 @@ See [LICENSE][stdlib-license].
|
|
|
140
141
|
|
|
141
142
|
## Copyright
|
|
142
143
|
|
|
143
|
-
Copyright © 2016-
|
|
144
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
144
145
|
|
|
145
146
|
</section>
|
|
146
147
|
|
|
@@ -153,8 +154,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
153
154
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/complex-base.svg
|
|
154
155
|
[npm-url]: https://npmjs.org/package/@stdlib/complex-base
|
|
155
156
|
|
|
156
|
-
[test-image]: https://github.com/stdlib-js/complex-base/actions/workflows/test.yml/badge.svg?branch=v0.
|
|
157
|
-
[test-url]: https://github.com/stdlib-js/complex-base/actions/workflows/test.yml?query=branch:v0.
|
|
157
|
+
[test-image]: https://github.com/stdlib-js/complex-base/actions/workflows/test.yml/badge.svg?branch=v0.2.0
|
|
158
|
+
[test-url]: https://github.com/stdlib-js/complex-base/actions/workflows/test.yml?query=branch:v0.2.0
|
|
158
159
|
|
|
159
160
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/complex-base/main.svg
|
|
160
161
|
[coverage-url]: https://codecov.io/github/stdlib-js/complex-base?branch=main
|
|
@@ -177,14 +178,19 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
177
178
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
178
179
|
|
|
179
180
|
[deno-url]: https://github.com/stdlib-js/complex-base/tree/deno
|
|
181
|
+
[deno-readme]: https://github.com/stdlib-js/complex-base/blob/deno/README.md
|
|
180
182
|
[umd-url]: https://github.com/stdlib-js/complex-base/tree/umd
|
|
183
|
+
[umd-readme]: https://github.com/stdlib-js/complex-base/blob/umd/README.md
|
|
181
184
|
[esm-url]: https://github.com/stdlib-js/complex-base/tree/esm
|
|
185
|
+
[esm-readme]: https://github.com/stdlib-js/complex-base/blob/esm/README.md
|
|
182
186
|
[branches-url]: https://github.com/stdlib-js/complex-base/blob/main/branches.md
|
|
183
187
|
|
|
184
188
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex-base/main/LICENSE
|
|
185
189
|
|
|
186
190
|
<!-- <toc-links> -->
|
|
187
191
|
|
|
192
|
+
[@stdlib/complex/base/assert]: https://www.npmjs.com/package/@stdlib/complex-base-assert
|
|
193
|
+
|
|
188
194
|
[@stdlib/complex/base/cast-return]: https://www.npmjs.com/package/@stdlib/complex-base-cast-return
|
|
189
195
|
|
|
190
196
|
[@stdlib/complex/base/wrap-function]: https://www.npmjs.com/package/@stdlib/complex-base-wrap-function
|
package/SECURITY.md
ADDED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"cast",require('@stdlib/complex-base-cast-return/dist'));e(r,"wrap",require('@stdlib/complex-base-wrap-function/dist'));module.exports=r;
|
|
1
|
+
"use strict";var e=require('@stdlib/utils-define-read-only-property/dist'),r={};e(r,"assert",require('@stdlib/complex-base-assert/dist'));e(r,"cast",require('@stdlib/complex-base-cast-return/dist'));e(r,"wrap",require('@stdlib/complex-base-wrap-function/dist'));module.exports=r;
|
|
2
2
|
/** @license Apache-2.0 */
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name cast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/complex/base/cast-return}\n*/\nsetReadOnly( ns, 'cast', require( '@stdlib/complex-base-cast-return' ) );\n\n/**\n* @name wrap\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/complex/base/wrap-function}\n*/\nsetReadOnly( ns, 'wrap', require( '@stdlib/complex-base-wrap-function' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],
|
|
5
|
-
"mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,OAAQ,QAAS,kCAAmC,CAAE,EASvED,EAAaC,EAAI,OAAQ,QAAS,oCAAqC,CAAE,EAKzE,OAAO,QAAUA",
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name assert\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/complex/base/assert}\n*/\nsetReadOnly( ns, 'assert', require( '@stdlib/complex-base-assert' ) );\n\n/**\n* @name cast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/complex/base/cast-return}\n*/\nsetReadOnly( ns, 'cast', require( '@stdlib/complex-base-cast-return' ) );\n\n/**\n* @name wrap\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/complex/base/wrap-function}\n*/\nsetReadOnly( ns, 'wrap', require( '@stdlib/complex-base-wrap-function' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],
|
|
5
|
+
"mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,SAAU,QAAS,6BAA8B,CAAE,EASpED,EAAaC,EAAI,OAAQ,QAAS,kCAAmC,CAAE,EASvED,EAAaC,EAAI,OAAQ,QAAS,oCAAqC,CAAE,EAKzE,OAAO,QAAUA",
|
|
6
6
|
"names": ["setReadOnly", "ns"]
|
|
7
7
|
}
|
package/docs/types/index.d.ts
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
// TypeScript Version: 4.1
|
|
20
20
|
|
|
21
|
-
/*
|
|
22
|
-
/* tslint:disable:max-file-line-count */
|
|
21
|
+
/* eslint-disable max-lines */
|
|
23
22
|
|
|
23
|
+
import assert = require( '@stdlib/complex-base-assert' );
|
|
24
24
|
import cast = require( '@stdlib/complex-base-cast-return' );
|
|
25
25
|
import wrap = require( '@stdlib/complex-base-wrap-function' );
|
|
26
26
|
|
|
@@ -28,6 +28,11 @@ import wrap = require( '@stdlib/complex-base-wrap-function' );
|
|
|
28
28
|
* Interface describing the `base` namespace.
|
|
29
29
|
*/
|
|
30
30
|
interface Namespace {
|
|
31
|
+
/**
|
|
32
|
+
* Base complex number assert functions.
|
|
33
|
+
*/
|
|
34
|
+
assert: typeof assert;
|
|
35
|
+
|
|
31
36
|
/**
|
|
32
37
|
* Wraps an n-ary function and casts a function's return value to a complex number.
|
|
33
38
|
*
|
|
@@ -43,9 +48,9 @@ interface Namespace {
|
|
|
43
48
|
* @returns wrapped function
|
|
44
49
|
*
|
|
45
50
|
* @example
|
|
46
|
-
* var Complex64 = require(
|
|
47
|
-
* var realf = require(
|
|
48
|
-
* var imagf = require(
|
|
51
|
+
* var Complex64 = require( '@stdlib/complex-float32' );
|
|
52
|
+
* var realf = require( '@stdlib/complex-realf' );
|
|
53
|
+
* var imagf = require( '@stdlib/complex-imagf' );
|
|
49
54
|
*
|
|
50
55
|
* function add( x, y, z, w, v, t ) {
|
|
51
56
|
* return x + y + z + w + v + t;
|
|
@@ -81,9 +86,9 @@ interface Namespace {
|
|
|
81
86
|
* @returns wrapped function
|
|
82
87
|
*
|
|
83
88
|
* @example
|
|
84
|
-
* var Complex64 = require(
|
|
85
|
-
* var realf = require(
|
|
86
|
-
* var imagf = require(
|
|
89
|
+
* var Complex64 = require( '@stdlib/complex-float32' );
|
|
90
|
+
* var realf = require( '@stdlib/complex-realf' );
|
|
91
|
+
* var imagf = require( '@stdlib/complex-imagf' );
|
|
87
92
|
*
|
|
88
93
|
* function add( x, y, z, w, v, t ) {
|
|
89
94
|
* var re = realf( x ) + realf( y ) + realf( z ) + realf( w ) + realf( v ) + realf( t );
|
|
@@ -108,7 +113,7 @@ interface Namespace {
|
|
|
108
113
|
}
|
|
109
114
|
|
|
110
115
|
/**
|
|
111
|
-
* Base (i.e., lower-level) complex number functions
|
|
116
|
+
* Base (i.e., lower-level) complex number functions.
|
|
112
117
|
*/
|
|
113
118
|
declare var ns: Namespace;
|
|
114
119
|
|
package/lib/index.js
CHANGED
|
@@ -36,6 +36,15 @@ var setReadOnly = require( '@stdlib/utils-define-read-only-property' );
|
|
|
36
36
|
*/
|
|
37
37
|
var ns = {};
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* @name assert
|
|
41
|
+
* @memberof ns
|
|
42
|
+
* @readonly
|
|
43
|
+
* @type {Namespace}
|
|
44
|
+
* @see {@link module:@stdlib/complex/base/assert}
|
|
45
|
+
*/
|
|
46
|
+
setReadOnly( ns, 'assert', require( '@stdlib/complex-base-assert' ) );
|
|
47
|
+
|
|
39
48
|
/**
|
|
40
49
|
* @name cast
|
|
41
50
|
* @memberof ns
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/complex-base",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Base (i.e., lower-level) complex number functions",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Base (i.e., lower-level) complex number functions.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "The Stdlib Authors",
|
|
@@ -36,25 +36,48 @@
|
|
|
36
36
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@stdlib/complex-base-
|
|
40
|
-
"@stdlib/complex-base-
|
|
41
|
-
"@stdlib/
|
|
39
|
+
"@stdlib/complex-base-assert": "^0.2.0",
|
|
40
|
+
"@stdlib/complex-base-cast-return": "^0.2.0",
|
|
41
|
+
"@stdlib/complex-base-wrap-function": "^0.2.0",
|
|
42
|
+
"@stdlib/utils-define-read-only-property": "^0.2.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@stdlib/assert-is-
|
|
45
|
+
"@stdlib/assert-is-boolean": "^0.1.1",
|
|
46
|
+
"@stdlib/assert-is-function": "^0.1.1",
|
|
45
47
|
"@stdlib/assert-is-nonnegative-integer": "^0.1.0",
|
|
46
|
-
"@stdlib/
|
|
47
|
-
"@stdlib/complex-
|
|
48
|
-
"@stdlib/complex-
|
|
49
|
-
"@stdlib/complex-
|
|
50
|
-
"@stdlib/
|
|
51
|
-
"@stdlib/
|
|
52
|
-
"@stdlib/
|
|
53
|
-
"@stdlib/
|
|
54
|
-
"@stdlib/
|
|
48
|
+
"@stdlib/complex-base-assert-is-equal": "^0.2.0",
|
|
49
|
+
"@stdlib/complex-base-assert-is-equalf": "^0.2.0",
|
|
50
|
+
"@stdlib/complex-base-assert-is-not-equal": "^0.2.0",
|
|
51
|
+
"@stdlib/complex-base-assert-is-not-equalf": "^0.2.0",
|
|
52
|
+
"@stdlib/complex-base-assert-is-same-value": "^0.2.0",
|
|
53
|
+
"@stdlib/complex-base-assert-is-same-value-zero": "^0.3.0",
|
|
54
|
+
"@stdlib/complex-base-assert-is-same-value-zerof": "^0.2.0",
|
|
55
|
+
"@stdlib/complex-base-assert-is-same-valuef": "^0.1.0",
|
|
56
|
+
"@stdlib/complex-float32": "^0.1.1",
|
|
57
|
+
"@stdlib/complex-float64": "^0.1.1",
|
|
58
|
+
"@stdlib/complex-imagf": "^0.1.1",
|
|
59
|
+
"@stdlib/complex-realf": "^0.1.1",
|
|
60
|
+
"@stdlib/complex-reim": "^0.2.0",
|
|
61
|
+
"@stdlib/complex-reimf": "^0.2.0",
|
|
62
|
+
"@stdlib/constants-float32-ninf": "^0.1.1",
|
|
63
|
+
"@stdlib/constants-float32-pinf": "^0.1.1",
|
|
64
|
+
"@stdlib/constants-float64-ninf": "^0.1.1",
|
|
65
|
+
"@stdlib/constants-float64-pinf": "^0.1.1",
|
|
66
|
+
"@stdlib/math-base-assert-is-nanf": "^0.1.1",
|
|
67
|
+
"@stdlib/math-base-ops-addf": "^0.1.0",
|
|
68
|
+
"@stdlib/math-base-ops-caddf": "^0.1.0",
|
|
69
|
+
"@stdlib/number-float32-base-assert-is-same-value": "^0.2.0",
|
|
70
|
+
"@stdlib/number-float32-base-assert-is-same-value-zero": "^0.2.0",
|
|
71
|
+
"@stdlib/number-float64-base-assert-is-same-value": "^0.2.0",
|
|
72
|
+
"@stdlib/number-float64-base-assert-is-same-value-zero": "^0.2.0",
|
|
73
|
+
"@stdlib/random-base-randu": "^0.1.0",
|
|
74
|
+
"@stdlib/string-format": "^0.2.0",
|
|
75
|
+
"@stdlib/utils-keys": "^0.1.0",
|
|
55
76
|
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
56
77
|
"istanbul": "^0.4.1",
|
|
57
|
-
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
78
|
+
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
|
|
79
|
+
"@stdlib/bench-harness": "^0.2.0",
|
|
80
|
+
"@stdlib/bench": "^0.3.1"
|
|
58
81
|
},
|
|
59
82
|
"engines": {
|
|
60
83
|
"node": ">=0.10.0",
|
package/CITATION.cff
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
cff-version: 1.2.0
|
|
2
|
-
title: stdlib
|
|
3
|
-
message: >-
|
|
4
|
-
If you use this software, please cite it using the
|
|
5
|
-
metadata from this file.
|
|
6
|
-
|
|
7
|
-
type: software
|
|
8
|
-
|
|
9
|
-
authors:
|
|
10
|
-
- name: The Stdlib Authors
|
|
11
|
-
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
-
|
|
13
|
-
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
-
url: https://stdlib.io
|
|
15
|
-
|
|
16
|
-
abstract: |
|
|
17
|
-
Standard library for JavaScript and Node.js.
|
|
18
|
-
|
|
19
|
-
keywords:
|
|
20
|
-
- JavaScript
|
|
21
|
-
- Node.js
|
|
22
|
-
- TypeScript
|
|
23
|
-
- standard library
|
|
24
|
-
- scientific computing
|
|
25
|
-
- numerical computing
|
|
26
|
-
- statistical computing
|
|
27
|
-
|
|
28
|
-
license: Apache-2.0 AND BSL-1.0
|
|
29
|
-
|
|
30
|
-
date-released: 2016
|