Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions lib/node_modules/@stdlib/constants/wasm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!--

@license Apache-2.0

Copyright (c) 2025 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.

-->

# Constants

> WebAssembly constants.

<section class="usage">

## Usage

```javascript
var constants = require( '@stdlib/constants/wasm' );
```

#### constants

WebAssembly constants.

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

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

<div class="namespace-toc">

- <span class="signature">[`PAGE_SIZE`][@stdlib/constants/wasm/page-size]</span><span class="delimiter">: </span><span class="description">WebAssembly memory page size (in bytes).</span>

</div>

<!-- </toc> -->

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

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

```javascript
var objectKeys = require( '@stdlib/utils/keys' );
var constants = require( '@stdlib/constants/wasm' );

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

</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> -->

[@stdlib/constants/wasm/page-size]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/wasm/page-size

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

</section>

<!-- /.links -->
47 changes: 47 additions & 0 deletions lib/node_modules/@stdlib/constants/wasm/docs/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2025 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 PAGE_SIZE = require( '@stdlib/constants/wasm/page-size' );

/**
* Interface describing the `wasm` namespace.
*/
interface Namespace {
/**
* WebAssembly memory page size (in bytes).
*
* @example
* var n = ns.PAGE_SIZE;
* // returns 65536
*/
PAGE_SIZE: typeof PAGE_SIZE;
}

/**
* WebAssembly constants.
*/
declare var ns: Namespace;


// EXPORTS //

export = ns;
29 changes: 29 additions & 0 deletions lib/node_modules/@stdlib/constants/wasm/docs/types/tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2025 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
}
24 changes: 24 additions & 0 deletions lib/node_modules/@stdlib/constants/wasm/examples/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 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 ) );
52 changes: 52 additions & 0 deletions lib/node_modules/@stdlib/constants/wasm/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 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 PAGE_SIZE
* @memberof ns
* @readonly
* @constant
* @type {number}
* @see {@link module:@stdlib/constants/wasm/page-size}
*/
setReadOnly( ns, 'PAGE_SIZE', require( '@stdlib/constants/wasm/page-size' ) );


// EXPORTS //

module.exports = ns;
60 changes: 60 additions & 0 deletions lib/node_modules/@stdlib/constants/wasm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "@stdlib/constants/wasm",
"version": "0.0.0",
"description": "WebAssembly constants.",
"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",
"constants",
"const",
"webassembly",
"wasm",
"namespace",
"ns"
]
}
Loading
Loading