From b5656b16d31ebab8894227ee4a972958cf5a386e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 18:06:55 +0000 Subject: [PATCH] Auto-generated commit --- .github/.keepalive | 1 - .github/workflows/productionize.yml | 15 --------------- dist/index.d.ts | 3 +++ dist/index.js | 5 +++++ dist/index.js.map | 7 +++++++ docs/types/index.d.ts | 2 +- 6 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 .github/.keepalive create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index eec1716..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T02:32:30.257Z 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..7263781 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import itercumeanabs2 from '../docs/types/index'; +export = itercumeanabs2; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..6915b61 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5 @@ +"use strict";var d=function(n,e){return function(){return e||n((e={exports:{}}).exports,e),e.exports}};var s=d(function(g,v){ +var i=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),m=require('@stdlib/assert-is-iterator-like/dist'),q=require('@stdlib/assert-is-function/dist'),u=require('@stdlib/symbol-iterator/dist'),p=require('@stdlib/stats-incr-meanabs2/dist'),x=require('@stdlib/error-tools-fmtprodmsg/dist');function o(n){var e,t,a;if(!m(n))throw new TypeError(x('1KL3w',n));return a=p(),e={},i(e,"next",f),i(e,"return",c),u&&q(n[u])&&i(e,u,l),e;function f(){var r;return t?{done:!0}:(r=n.next(),r.done?(t=!0,r):(typeof r.value=="number"?r=a(r.value):r=a(NaN),{value:r,done:!1}))}function c(r){return t=!0,arguments.length?{value:r,done:!0}:{done:!0}}function l(){return o(n[u]())}}v.exports=o +});var y=s();module.exports=y; +/** @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..344600a --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/main.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 isIteratorLike = require( '@stdlib/assert-is-iterator-like' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar iteratorSymbol = require( '@stdlib/symbol-iterator' );\nvar incrmeanabs2 = require( '@stdlib/stats-incr-meanabs2' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which iteratively computes a cumulative arithmetic mean of squared absolute values.\n*\n* @param {Iterator} iterator - input iterator\n* @throws {TypeError} must provide an iterator\n* @returns {Iterator} iterator\n*\n* @example\n* var runif = require( '@stdlib/random-iter-uniform' );\n*\n* var rand = runif( -10.0, 10.0, {\n* 'iter': 100\n* });\n*\n* var it = itercumeanabs2( rand );\n*\n* var v = it.next().value;\n* // returns \n*\n* v = it.next().value;\n* // returns \n*\n* v = it.next().value;\n* // returns \n*\n* // ...\n*/\nfunction itercumeanabs2( iterator ) {\n\tvar iter;\n\tvar FLG;\n\tvar acc;\n\tif ( !isIteratorLike( iterator ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an iterator. Value: `%s`.', iterator ) );\n\t}\n\tacc = incrmeanabs2();\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol && isFunction( iterator[ iteratorSymbol ] ) ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar v;\n\t\tif ( FLG ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tv = iterator.next();\n\t\tif ( v.done ) {\n\t\t\tFLG = true;\n\t\t\treturn v;\n\t\t}\n\t\tif ( typeof v.value === 'number' ) {\n\t\t\tv = acc( v.value );\n\t\t} else {\n\t\t\tv = acc( NaN );\n\t\t}\n\t\treturn {\n\t\t\t'value': v,\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn itercumeanabs2( iterator[ iteratorSymbol ]() );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = itercumeanabs2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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* Create an iterator which iteratively computes a cumulative arithmetic mean of squared absolute values.\n*\n* @module @stdlib/stats-iter-cumeanabs2\n*\n* @example\n* var runif = require( '@stdlib/random-iter-uniform' );\n* var itercumeanabs2 = require( '@stdlib/stats-iter-cumeanabs2' );\n*\n* var rand = runif( -10.0, 10.0, {\n* 'iter': 100\n* });\n*\n* var it = itercumeanabs2( rand );\n*\n* var v = it.next().value;\n* // returns \n*\n* v = it.next().value;\n* // returns \n*\n* v = it.next().value;\n* // returns \n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAiB,QAAS,iCAAkC,EAC5DC,EAAa,QAAS,4BAA6B,EACnDC,EAAiB,QAAS,yBAA0B,EACpDC,EAAe,QAAS,6BAA8B,EACtDC,EAAS,QAAS,uBAAwB,EAgC9C,SAASC,EAAgBC,EAAW,CACnC,IAAIC,EACAC,EACAC,EACJ,GAAK,CAACT,EAAgBM,CAAS,EAC9B,MAAM,IAAI,UAAWF,EAAQ,2DAA4DE,CAAS,CAAE,EAErG,OAAAG,EAAMN,EAAa,EAGnBI,EAAO,CAAC,EACRR,EAAaQ,EAAM,OAAQG,CAAK,EAChCX,EAAaQ,EAAM,SAAUI,CAAI,EAG5BT,GAAkBD,EAAYK,EAAUJ,CAAe,CAAE,GAC7DH,EAAaQ,EAAML,EAAgBU,CAAQ,EAErCL,EAQP,SAASG,GAAO,CACf,IAAIG,EACJ,OAAKL,EACG,CACN,KAAQ,EACT,GAEDK,EAAIP,EAAS,KAAK,EACbO,EAAE,MACNL,EAAM,GACCK,IAEH,OAAOA,EAAE,OAAU,SACvBA,EAAIJ,EAAKI,EAAE,KAAM,EAEjBA,EAAIJ,EAAK,GAAI,EAEP,CACN,MAASI,EACT,KAAQ,EACT,GACD,CASA,SAASF,EAAKG,EAAQ,CAErB,OADAN,EAAM,GACD,UAAU,OACP,CACN,MAASM,EACT,KAAQ,EACT,EAEM,CACN,KAAQ,EACT,CACD,CAQA,SAASF,GAAU,CAClB,OAAOP,EAAgBC,EAAUJ,CAAe,EAAE,CAAE,CACrD,CACD,CAKAJ,EAAO,QAAUO,IC7FjB,IAAIU,EAAO,IAKX,OAAO,QAAUA", + "names": ["require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isIteratorLike", "isFunction", "iteratorSymbol", "incrmeanabs2", "format", "itercumeanabs2", "iterator", "iter", "FLG", "acc", "next", "end", "factory", "v", "value", "main"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index b874489..5cf6beb 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 ///