@stdlib/complex-base 0.0.1 → 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 CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2023 The Stdlib Authors.
1
+ Copyright (c) 2016-2024 The Stdlib Authors.
package/README.md CHANGED
@@ -18,6 +18,17 @@ limitations under the License.
18
18
 
19
19
  -->
20
20
 
21
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+ <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+ <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
21
32
  # Base Complex
22
33
 
23
34
  [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
@@ -57,6 +68,7 @@ The namespace contains the following functions:
57
68
 
58
69
  <div class="namespace-toc">
59
70
 
71
+ - <span class="signature">[`assert`][@stdlib/complex/base/assert]</span><span class="delimiter">: </span><span class="description">base complex number assert functions.</span>
60
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>
61
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>
62
74
 
@@ -129,7 +141,7 @@ See [LICENSE][stdlib-license].
129
141
 
130
142
  ## Copyright
131
143
 
132
- Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
144
+ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
133
145
 
134
146
  </section>
135
147
 
@@ -142,8 +154,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
142
154
  [npm-image]: http://img.shields.io/npm/v/@stdlib/complex-base.svg
143
155
  [npm-url]: https://npmjs.org/package/@stdlib/complex-base
144
156
 
145
- [test-image]: https://github.com/stdlib-js/complex-base/actions/workflows/test.yml/badge.svg?branch=v0.0.1
146
- [test-url]: https://github.com/stdlib-js/complex-base/actions/workflows/test.yml?query=branch:v0.0.1
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
147
159
 
148
160
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/complex-base/main.svg
149
161
  [coverage-url]: https://codecov.io/github/stdlib-js/complex-base?branch=main
@@ -156,7 +168,7 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
156
168
  -->
157
169
 
158
170
  [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
159
- [chat-url]: https://gitter.im/stdlib-js/stdlib/
171
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
160
172
 
161
173
  [stdlib]: https://github.com/stdlib-js/stdlib
162
174
 
@@ -166,14 +178,19 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
166
178
  [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
167
179
 
168
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
169
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
170
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
171
186
  [branches-url]: https://github.com/stdlib-js/complex-base/blob/main/branches.md
172
187
 
173
188
  [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex-base/main/LICENSE
174
189
 
175
190
  <!-- <toc-links> -->
176
191
 
192
+ [@stdlib/complex/base/assert]: https://www.npmjs.com/package/@stdlib/complex-base-assert
193
+
177
194
  [@stdlib/complex/base/cast-return]: https://www.npmjs.com/package/@stdlib/complex-base-cast-return
178
195
 
179
196
  [@stdlib/complex/base/wrap-function]: https://www.npmjs.com/package/@stdlib/complex-base-wrap-function
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ > Policy for reporting security vulnerabilities.
4
+
5
+ See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import ns from '../docs/types/index';
3
+ export = ns;
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
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
+ /** @license Apache-2.0 */
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 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
+ "names": ["setReadOnly", "ns"]
7
+ }
@@ -16,11 +16,11 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- // TypeScript Version: 2.0
19
+ // TypeScript Version: 4.1
20
20
 
21
- /* tslint:disable:max-line-length */
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( `@stdlib/complex/float32` );
47
- * var realf = require( `@stdlib/complex/realf` );
48
- * var imagf = require( `@stdlib/complex/imagf` );
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( `@stdlib/complex/float32` );
85
- * var realf = require( `@stdlib/complex/realf` );
86
- * var imagf = require( `@stdlib/complex/imagf` );
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.0.1",
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-cast-return": "^0.0.x",
40
- "@stdlib/complex-base-wrap-function": "^0.0.x",
41
- "@stdlib/utils-define-read-only-property": "^0.0.x"
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-function": "^0.0.x",
45
- "@stdlib/assert-is-nonnegative-integer": "^0.0.x",
46
- "@stdlib/bench": "^0.0.x",
47
- "@stdlib/complex-float32": "^0.0.x",
48
- "@stdlib/complex-imagf": "^0.0.x",
49
- "@stdlib/complex-realf": "^0.0.x",
50
- "@stdlib/math-base-assert-is-nanf": "^0.0.x",
51
- "@stdlib/math-base-ops-addf": "^0.0.x",
52
- "@stdlib/math-base-ops-caddf": "^0.0.x",
53
- "@stdlib/string-format": "^0.0.x",
54
- "@stdlib/utils-keys": "^0.0.x",
45
+ "@stdlib/assert-is-boolean": "^0.1.1",
46
+ "@stdlib/assert-is-function": "^0.1.1",
47
+ "@stdlib/assert-is-nonnegative-integer": "^0.1.0",
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",
@@ -83,7 +106,7 @@
83
106
  "base"
84
107
  ],
85
108
  "funding": {
86
- "type": "patreon",
87
- "url": "https://www.patreon.com/athan"
109
+ "type": "opencollective",
110
+ "url": "https://opencollective.com/stdlib"
88
111
  }
89
112
  }
@@ -1,29 +0,0 @@
1
- /*
2
- * @license Apache-2.0
3
- *
4
- * Copyright (c) 2022 The Stdlib Authors.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- /* tslint:disable:no-unused-expression */
20
-
21
- import ns = require( './index' );
22
-
23
-
24
- // TESTS //
25
-
26
- // The exported value is the expected interface...
27
- {
28
- ns; // $ExpectType Namespace
29
- }