diff --git a/.editorconfig b/.editorconfig index 0fd4d6c..13e9c39 100644 --- a/.editorconfig +++ b/.editorconfig @@ -179,3 +179,8 @@ indent_size = 2 [*.gypi] indent_style = space indent_size = 2 + +# Set properties for citation files: +[*.{cff,cff.txt}] +indent_style = space +indent_size = 2 diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index ea6d117..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T05:22:12.143Z diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 334eb59..91f2b93 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - name: 'Update dependencies in package.json' run: | diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..2ec6fff --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,30 @@ +cff-version: 1.2.0 +title: stdlib +message: >- + If you use this software, please cite it using the + metadata from this file. + +type: software + +authors: + - name: The Stdlib Authors + url: https://github.com/stdlib-js/stdlib/graphs/contributors + +repository-code: https://github.com/stdlib-js/stdlib +url: https://stdlib.io + +abstract: | + Standard library for JavaScript and Node.js. + +keywords: + - JavaScript + - Node.js + - TypeScript + - standard library + - scientific computing + - numerical computing + - statistical computing + +license: Apache-2.0 AND BSL-1.0 + +date-released: 2016 diff --git a/README.md b/README.md index ae754a4..a87efbc 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,17 @@ limitations under the License. --> + +
+ + About stdlib... + +

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.

+

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.

+

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.

+

To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

+
+ # smskcbrt [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -367,8 +378,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/math-strided-special-smskcbrt.svg [npm-url]: https://npmjs.org/package/@stdlib/math-strided-special-smskcbrt -[test-image]: https://github.com/stdlib-js/math-strided-special-smskcbrt/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/math-strided-special-smskcbrt/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/math-strided-special-smskcbrt/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/math-strided-special-smskcbrt/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-strided-special-smskcbrt/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/math-strided-special-smskcbrt?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..62f9374 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import smskcbrt from '../docs/types/index'; +export = smskcbrt; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..59d7217 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,9 @@ +"use strict";var n=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var q=n(function(C,c){ +var x=require('@stdlib/strided-base-smskmap/dist'),l=require('@stdlib/math-base-special-cbrtf/dist');function R(e,r,a,s,t,i,u){return x(e,r,a,s,t,i,u,l)}c.exports=R +});var o=n(function(D,m){ +var _=require('@stdlib/strided-base-smskmap/dist').ndarray,E=require('@stdlib/math-base-special-cbrtf/dist');function O(e,r,a,s,t,i,u,k,y,j){return _(e,r,a,s,t,i,u,k,y,j,E)}m.exports=O +});var b=n(function(F,f){ +var g=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),p=q(),h=o();g(p,"ndarray",h);f.exports=p +});var w=require("path").join,z=require('@stdlib/utils-try-require/dist'),A=b(),v,d=z(w(__dirname,"./native.js"));d instanceof Error?v=A:v=d;module.exports=v; +/** @license Apache-2.0 */ +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..b5afd59 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/smskcbrt.js", "../lib/ndarray.js", "../lib/main.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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 smskmap = require( '@stdlib/strided-base-smskmap' );\nvar cbrtf = require( '@stdlib/math-base-special-cbrtf' );\n\n\n// MAIN //\n\n/**\n* Computes the cube root for each element in a single-precision floating-point strided array `x` according to a strided mask array and assigns the results to elements in a single-precision floating-point strided array `y`.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} sx - `x` stride length\n* @param {Uint8Array} m - mask array\n* @param {integer} sm - `m` stride length\n* @param {Float32Array} y - destination array\n* @param {integer} sy - `y` stride length\n* @returns {Float32Array} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* var x = new Float32Array( [ 0.0, 1.0, 8.0, 27.0, 64.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 1 ] );\n* var y = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* smskcbrt( x.length, x, 1, m, 1, y, 1 );\n* // y => [ 0.0, 1.0, 0.0, 3.0, 0.0 ]\n*/\nfunction smskcbrt( N, x, sx, m, sm, y, sy ) {\n\treturn smskmap( N, x, sx, m, sm, y, sy, cbrtf );\n}\n\n\n// EXPORTS //\n\nmodule.exports = smskcbrt;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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 smskmap = require( '@stdlib/strided-base-smskmap' ).ndarray;\nvar cbrtf = require( '@stdlib/math-base-special-cbrtf' );\n\n\n// MAIN //\n\n/**\n* Computes the cube root for each element in a single-precision floating-point strided array `x` according to a strided mask array and assigns the results to elements in a single-precision floating-point strided array `y`.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} sx - `x` stride length\n* @param {NonNegativeInteger} ox - starting `x` index\n* @param {Uint8Array} m - mask array\n* @param {integer} sm - `m` stride length\n* @param {NonNegativeInteger} om - starting `m` index\n* @param {Float32Array} y - destination array\n* @param {integer} sy - `y` stride length\n* @param {NonNegativeInteger} oy - starting `y` index\n* @returns {Float32Array} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* var x = new Float32Array( [ 0.0, 1.0, 8.0, 27.0, 64.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 1 ] );\n* var y = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* smskcbrt( x.length, x, 1, 0, m, 1, 0, y, 1, 0 );\n* // y => [ 0.0, 1.0, 0.0, 3.0, 0.0 ]\n*/\nfunction smskcbrt( N, x, sx, ox, m, sm, om, y, sy, oy ) {\n\treturn smskmap( N, x, sx, ox, m, sm, om, y, sy, oy, cbrtf );\n}\n\n\n// EXPORTS //\n\nmodule.exports = smskcbrt;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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 setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar smskcbrt = require( './smskcbrt.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( smskcbrt, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = smskcbrt;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Compute the cube root for each element in a single-precision floating-point strided array `x` according to a strided mask array and assign the results to elements in a single-precision floating-point strided array `y`.\n*\n* @module @stdlib/math-strided-special-smskcbrt\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var smskcbrt = require( '@stdlib/math-strided-special-smskcbrt' );\n*\n* var x = new Float32Array( [ 0.0, 1.0, 8.0, 27.0, 64.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 1 ] );\n* var y = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* smskcbrt( x.length, x, 1, m, 1, y, 1 );\n* // y => [ 0.0, 1.0, 0.0, 3.0, 0.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var smskcbrt = require( '@stdlib/math-strided-special-smskcbrt' );\n*\n* var x = new Float32Array( [ 0.0, 1.0, 8.0, 27.0, 64.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 1 ] );\n* var y = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* smskcbrt.ndarray( x.length, x, 1, 0, m, 1, 0, y, 1, 0 );\n* // y => [ 0.0, 1.0, 0.0, 3.0, 0.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils-try-require' );\nvar javascript = require( './main.js' );\n\n\n// MAIN //\n\nvar main;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( tmp instanceof Error ) {\n\tmain = javascript;\n} else {\n\tmain = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = main;\n\n// exports: { \"ndarray\": \"main.ndarray\" }\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,8BAA+B,EAClDC,EAAQ,QAAS,iCAAkC,EA4BvD,SAASC,EAAUC,EAAGC,EAAGC,EAAIC,EAAGC,EAAIC,EAAGC,EAAK,CAC3C,OAAOT,EAASG,EAAGC,EAAGC,EAAIC,EAAGC,EAAIC,EAAGC,EAAIR,CAAM,CAC/C,CAKAF,EAAO,QAAUG,IC1DjB,IAAAQ,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,8BAA+B,EAAE,QACpDC,EAAQ,QAAS,iCAAkC,EA+BvD,SAASC,EAAUC,EAAGC,EAAGC,EAAIC,EAAIC,EAAGC,EAAIC,EAAIC,EAAGC,EAAIC,EAAK,CACvD,OAAOZ,EAASG,EAAGC,EAAGC,EAAIC,EAAIC,EAAGC,EAAIC,EAAIC,EAAGC,EAAIC,EAAIX,CAAM,CAC3D,CAKAF,EAAO,QAAUG,IC7DjB,IAAAW,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAW,IACXC,EAAU,IAKdF,EAAaC,EAAU,UAAWC,CAAQ,EAK1CH,EAAO,QAAUE,ICkBjB,IAAIE,EAAO,QAAS,MAAO,EAAE,KACzBC,EAAa,QAAS,2BAA4B,EAClDC,EAAa,IAKbC,EACAC,EAAMH,EAAYD,EAAM,UAAW,aAAc,CAAE,EAClDI,aAAe,MACnBD,EAAOD,EAEPC,EAAOC,EAMR,OAAO,QAAUD", + "names": ["require_smskcbrt", "__commonJSMin", "exports", "module", "smskmap", "cbrtf", "smskcbrt", "N", "x", "sx", "m", "sm", "y", "sy", "require_ndarray", "__commonJSMin", "exports", "module", "smskmap", "cbrtf", "smskcbrt", "N", "x", "sx", "ox", "m", "sm", "om", "y", "sy", "oy", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "smskcbrt", "ndarray", "join", "tryRequire", "javascript", "main", "tmp"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index e5716f0..e544b79 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /** * Interface describing `smskcbrt`. diff --git a/package.json b/package.json index f0d8c39..6b30ad3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/math-strided-special-smskcbrt", - "version": "0.0.7", + "version": "0.1.0", "description": "Compute the cube root for each element in a single-precision floating-point strided array according to a strided mask array.", "license": "Apache-2.0", "author": { @@ -41,19 +41,19 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/math-base-special-cbrtf": "^0.0.6", - "@stdlib/strided-base-smskmap": "^0.0.8", - "@stdlib/strided-napi-smskmap": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-library-manifest": "^0.0.8", - "@stdlib/utils-try-require": "^0.0.7" + "@stdlib/math-base-special-cbrtf": "^0.1.0", + "@stdlib/strided-base-smskmap": "^0.1.0", + "@stdlib/strided-napi-smskmap": "^0.1.0", + "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", + "@stdlib/utils-library-manifest": "^0.1.0", + "@stdlib/utils-try-require": "^0.1.0" }, "devDependencies": { - "@stdlib/array-float32": "^0.0.6", - "@stdlib/array-uint8": "^0.0.7", - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-assert-is-nanf": "^0.0.8", + "@stdlib/array-float32": "^0.1.0", + "@stdlib/array-uint8": "^0.1.0", + "@stdlib/assert-is-browser": "^0.1.0", + "@stdlib/bench": "^0.1.0", + "@stdlib/math-base-assert-is-nanf": "^0.1.0", "@stdlib/math-base-special-pow": "^0.0.7", "@stdlib/random-base-uniform": "^0.0.6", "proxyquire": "^2.0.0",