Skip to content

Commit

Permalink
feat: add complex/float32/base/assert namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jul 18, 2024
1 parent c89d08c commit 69eecad
Show file tree
Hide file tree
Showing 7 changed files with 374 additions and 0 deletions.
97 changes: 97 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/assert/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!--
@license Apache-2.0
Copyright (c) 2024 The Stdlib Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Assert

> Base (i.e., lower-level) single-precision complex floating-point number assertion functions.
<section class="usage">

## Usage

```javascript
var assert = require( '@stdlib/complex/float32/base/assert' );
```

#### assert

Namespace containing base (i.e., lower-level) single-precision complex floating-point number assertion functions.

```javascript
var ns = assert;
// returns {...}
```

The namespace contains the following functions:

<!-- <toc pattern="*"> -->

<!-- </toc> -->

</section>

<!-- /.usage -->

<!-- Package notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

<!-- eslint no-undef: "error" -->

```javascript
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/complex/float32/base/assert' );

console.log( objectKeys( ns ) );
```

</section>

<!-- /.examples -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

<!-- <toc-links> -->

<!-- </toc-links> -->

</section>

<!-- /.links -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// TypeScript Version: 4.1

/* eslint-disable max-lines */

import isEqual = require( '@stdlib/complex/float32/base/assert/is-equal' );

/**
* Interface describing the namespace.
*/
interface Namespace {
/**
* TODO
*/
isEqual: typeof isEqual;
}

/**
* Base (i.e., lower-level) single-precision complex floating-point number assertion functions.
*/
declare var ns: Namespace;


// EXPORTS //

export = ns;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/no-unused-expressions */

import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
ns; // $ExpectType Namespace
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( './../lib' );

console.log( objectKeys( ns ) );
78 changes: 78 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/assert/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

/*
* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );


// MAIN //

/**
* Top-level namespace.
*
* @namespace ns
*/
var ns = {};

/**
* @name isEqual
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/complex/float32/base/assert/is-equal}
*/
setReadOnly( ns, 'isEqual', require( '@stdlib/complex/float32/base/assert/is-equal' ) );

/**
* @name isNotEqual
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/complex/float32/base/assert/is-not-equal}
*/
setReadOnly( ns, 'isNotEqual', require( '@stdlib/complex/float32/base/assert/is-not-equal' ) );

/**
* @name isSameValue
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/complex/float32/base/assert/is-same-value}
*/
setReadOnly( ns, 'isSameValue', require( '@stdlib/complex/float32/base/assert/is-same-value' ) );

/**
* @name isSameValueZero
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/complex/float32/base/assert/is-same-value-zero}
*/
setReadOnly( ns, 'isSameValueZero', require( '@stdlib/complex/float32/base/assert/is-same-value-zero' ) );


// EXPORTS //

module.exports = ns;
63 changes: 63 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/assert/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "@stdlib/complex/float32/base/assert",
"version": "0.0.0",
"description": "Base (i.e., lower-level) single-precision complex number assertion functions.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
},
"contributors": [
{
"name": "The Stdlib Authors",
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
}
],
"main": "lib/index.js",
"directories": {
"doc": "./docs",
"example": "./examples",
"lib": "./lib",
"test": "./test"
},
"types": "./docs/types",
"scripts": {},
"homepage": "https://github.com/stdlib-js/stdlib",
"repository": {
"type": "git",
"url": "git://github.com/stdlib-js/stdlib.git"
},
"bugs": {
"url": "https://github.com/stdlib-js/stdlib/issues"
},
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=0.10.0",
"npm": ">2.7.0"
},
"os": [
"aix",
"darwin",
"freebsd",
"linux",
"macos",
"openbsd",
"sunos",
"win32",
"windows"
],
"keywords": [
"stdlib",
"stdtypes",
"types",
"complex",
"cmplx",
"number",
"namespace",
"ns",
"float32",
"base",
"assert"
]
}
40 changes: 40 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/assert/test/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var tape = require( 'tape' );
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( './../lib' );


// TESTS //

tape( 'main export is an object', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof ns, 'object', 'main export is an object' );
t.end();
});

tape( 'the exported object contains key-value pairs', function test( t ) {
var keys = objectKeys( ns );
t.equal( keys.length > 0, true, 'has keys' );
t.end();
});

0 comments on commit 69eecad

Please sign in to comment.