diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index ef79f6a..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T04:58:19.808Z 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/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..c407cc2 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import svariance from '../docs/types/index'; +export = svariance; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..0099752 --- /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 u=n(function(h,t){ +var x=require('@stdlib/stats-base-svariancepn/dist');function f(e,r,a,i){return x(e,r,a,i)}t.exports=f +});var c=n(function(k,v){ +var j=require('@stdlib/stats-base-svariancepn/dist').ndarray;function m(e,r,a,i,y){return j(e,r,a,i,y)}v.exports=m +});var p=n(function(w,o){ +var l=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),q=u(),R=c();l(q,"ndarray",R);o.exports=q +});var _=require("path").join,E=require('@stdlib/utils-try-require/dist'),O=require('@stdlib/assert-is-error/dist'),b=p(),s,d=E(_(__dirname,"./native.js"));O(d)?s=b:s=d;module.exports=s; +/** @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..3489ae1 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/svariance.js", "../lib/ndarray.js", "../lib/main.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 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 svariancepn = require( '@stdlib/stats-base-svariancepn' );\n\n\n// MAIN //\n\n/**\n* Computes the variance of a single-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} correction - degrees of freedom adjustment\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} variance\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = svariance( N, 1, x, 1 );\n* // returns ~4.3333\n*/\nfunction svariance( N, correction, x, stride ) {\n\treturn svariancepn( N, correction, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = svariance;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 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 svariancepn = require( '@stdlib/stats-base-svariancepn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the variance of a single-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} correction - degrees of freedom adjustment\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} variance\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var floor = require( '@stdlib/math-base-special-floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = svariance( N, 1, x, 2, 1 );\n* // returns 6.25\n*/\nfunction svariance( N, correction, x, stride, offset ) {\n\treturn svariancepn( N, correction, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = svariance;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 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 svariance = require( './svariance.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( svariance, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = svariance;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 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 variance of a single-precision floating-point strided array.\n*\n* @module @stdlib/stats-base-svariance\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var svariance = require( '@stdlib/stats-base-svariance' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = svariance( N, 1, x, 1 );\n* // returns ~4.3333\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var floor = require( '@stdlib/math-base-special-floor' );\n* var svariance = require( '@stdlib/stats-base-svariance' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = svariance.ndarray( N, 1, x, 2, 1 );\n* // returns 6.25\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils-try-require' );\nvar isError = require( '@stdlib/assert-is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar svariance;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsvariance = main;\n} else {\n\tsvariance = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = svariance;\n\n// exports: { \"ndarray\": \"svariance.ndarray\" }\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,gCAAiC,EAuB5D,SAASC,EAAWC,EAAGC,EAAYC,EAAGC,EAAS,CAC9C,OAAOL,EAAaE,EAAGC,EAAYC,EAAGC,CAAO,CAC9C,CAKAN,EAAO,QAAUE,ICpDjB,IAAAK,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,gCAAiC,EAAE,QAyB9D,SAASC,EAAWC,EAAGC,EAAYC,EAAGC,EAAQC,EAAS,CACtD,OAAON,EAAaE,EAAGC,EAAYC,EAAGC,EAAQC,CAAO,CACtD,CAKAP,EAAO,QAAUE,ICtDjB,IAAAM,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAY,IACZC,EAAU,IAKdF,EAAaC,EAAW,UAAWC,CAAQ,EAK3CH,EAAO,QAAUE,ICejB,IAAIE,EAAO,QAAS,MAAO,EAAE,KACzBC,EAAa,QAAS,2BAA4B,EAClDC,EAAU,QAAS,yBAA0B,EAC7CC,EAAO,IAKPC,EACAC,EAAMJ,EAAYD,EAAM,UAAW,aAAc,CAAE,EAClDE,EAASG,CAAI,EACjBD,EAAYD,EAEZC,EAAYC,EAMb,OAAO,QAAUD", + "names": ["require_svariance", "__commonJSMin", "exports", "module", "svariancepn", "svariance", "N", "correction", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "svariancepn", "svariance", "N", "correction", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "svariance", "ndarray", "join", "tryRequire", "isError", "main", "svariance", "tmp"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index fe819ce..6a40842 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 `svariance`.