diff --git a/.github/workflows/first_time_greeting.yml b/.github/workflows/first_time_greeting.yml index de6fb04f2a5..fb8256ff27f 100644 --- a/.github/workflows/first_time_greeting.yml +++ b/.github/workflows/first_time_greeting.yml @@ -43,10 +43,10 @@ jobs: with: repo-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }} issue-message: | - :tada: Welcome! :tada: + :wave: Hi there! :wave: And thank you for opening your first issue! We will get back to you shortly. :runner: :dash: pr-message: | - :tada: Welcome! :tada: + :wave: Hi there! :wave: And thank you for opening your first pull request! We will review it shortly. :runner: :dash: diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4da968a631f..93c4bdefc7c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -8,6 +8,7 @@ Athan Reines Brendan Graetz Bruno Fenzl Christopher Dambamuromo +Dan Rose Dominik Moritz Dorrin Sotoudeh Frank Kovacs diff --git a/lib/node_modules/@stdlib/ndarray/dispatch-by/test/fixtures/fill.js b/lib/node_modules/@stdlib/ndarray/dispatch-by/test/fixtures/fill.js new file mode 100644 index 00000000000..ad2603c14e0 --- /dev/null +++ b/lib/node_modules/@stdlib/ndarray/dispatch-by/test/fixtures/fill.js @@ -0,0 +1,76 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2023 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 ind2sub = require( '@stdlib/ndarray/ind2sub' ); +var numel = require( '@stdlib/ndarray/base/numel' ); + + +// MAIN // + +/** +* Return an ndarray function which fills one or more ndarrays. +* +* @private +* @param {*} value - fill value +* @returns {Function} ndarray function +*/ +function fill( value ) { + return ndarrayFcn; + + /** + * ndarray function. + * + * @private + * @param {Array} arrays - ndarrays + */ + function ndarrayFcn( arrays ) { + var opts; + var sub; + var arr; + var sh; + var M; + var N; + var i; + var j; + + sh = arrays[ 0 ].shape; + N = numel( sh ); + M = arrays.length; + opts = { + 'order': '' + }; + for ( j = 0; j < M; j++ ) { + arr = arrays[ j ]; + opts.order = arrays[ j ].order; + for ( i = 0; i < N; i++ ) { + sub = ind2sub( sh, i, opts ); + sub.push( value ); + arr.set.apply( arr, sub ); + } + } + } +} + + +// EXPORTS // + +module.exports = fill; diff --git a/lib/node_modules/@stdlib/string/README.md b/lib/node_modules/@stdlib/string/README.md index 1738d48fd4e..4da90ffa6cc 100644 --- a/lib/node_modules/@stdlib/string/README.md +++ b/lib/node_modules/@stdlib/string/README.md @@ -53,8 +53,8 @@ The namespace exposes the following string manipulation functions: - [`constantcase( str )`][@stdlib/string/constantcase]: convert a string to constant case. - [`dotcase( str )`][@stdlib/string/dotcase]: convert a string to dot case. - [`endsWith( str, search[, len] )`][@stdlib/string/ends-with]: test if a string ends with the characters of another string. -- [`first( str[, n] )`][@stdlib/string/first]: return the first visual character(s) of a string. -- [`forEach( str, clbk[, thisArg ] )`][@stdlib/string/for-each]: invokes a callback once for each (visual) character of a string. +- [`first( str[, n][, options] )`][@stdlib/string/first]: return the first character(s) of a string. +- [`forEach( str, [options,] clbk[, thisArg ] )`][@stdlib/string/for-each]: invokes a function for each character in a string. - [`format( str, ...args )`][@stdlib/string/format]: insert supplied variable values into a format string. - [`fromCodePoint( pt1[, pt2[, pt3[, ...]]] )`][@stdlib/string/from-code-point]: create a string from a sequence of Unicode code points. - [`kebabcase( str )`][@stdlib/string/kebabcase]: convert a string to kebab case. diff --git a/lib/node_modules/@stdlib/string/base/README.md b/lib/node_modules/@stdlib/string/base/README.md index 14f8f091a45..7e90473c24b 100644 --- a/lib/node_modules/@stdlib/string/base/README.md +++ b/lib/node_modules/@stdlib/string/base/README.md @@ -49,8 +49,15 @@ The namespace contains the following functions: - [`capitalize( str )`][@stdlib/string/base/capitalize]: capitalize the first character in a string. - [`codePointAt( string, position, backward )`][@stdlib/string/base/code-point-at]: return a Unicode code point from a string at a specified position. - [`constantcase( str )`][@stdlib/string/base/constantcase]: convert a string to constant case. +- [`distances`][@stdlib/string/base/distances]: implementations of various string similarity metrics. - [`dotcase( str )`][@stdlib/string/base/dotcase]: convert a string to dot case. - [`endsWith( str, search, len )`][@stdlib/string/base/ends-with]: test if a string ends with the characters of another string. +- [`firstCodePoint( str, n )`][@stdlib/string/base/first-code-point]: return the first `n` Unicode code points of a string. +- [`firstGraphemeCluster( str, n )`][@stdlib/string/base/first-grapheme-cluster]: return the first `n` grapheme clusters (i.e., user-perceived characters) of a string. +- [`first( str, n )`][@stdlib/string/base/first]: return the first `n` UTF-16 code units of a string. +- [`forEachCodePoint( str, clbk[, thisArg ] )`][@stdlib/string/base/for-each-code-point]: invokes a function for each Unicode code point in a string. +- [`forEachGraphemeCluster( str, clbk[, thisArg ] )`][@stdlib/string/base/for-each-grapheme-cluster]: invokes a function for each grapheme cluster (i.e., user-perceived character) in a string. +- [`forEach( str, clbk[, thisArg ] )`][@stdlib/string/base/for-each]: invokes a function for each UTF-16 code unit in a string. - [`formatInterpolate( tokens, ...args )`][@stdlib/string/base/format-interpolate]: generate string from a token array by interpolating values. - [`formatTokenize( str )`][@stdlib/string/base/format-tokenize]: tokenize a string into an array of string parts and format identifier objects. - [`headercase( str )`][@stdlib/string/base/headercase]: convert a string to Header case. @@ -154,10 +161,24 @@ str = ns.trim( str ); [@stdlib/string/base/constantcase]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/constantcase +[@stdlib/string/base/distances]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/distances + [@stdlib/string/base/dotcase]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/dotcase [@stdlib/string/base/ends-with]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/ends-with +[@stdlib/string/base/first-code-point]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/first-code-point + +[@stdlib/string/base/first-grapheme-cluster]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/first-grapheme-cluster + +[@stdlib/string/base/first]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/first + +[@stdlib/string/base/for-each-code-point]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each-code-point + +[@stdlib/string/base/for-each-grapheme-cluster]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each-grapheme-cluster + +[@stdlib/string/base/for-each]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each + [@stdlib/string/base/format-interpolate]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/format-interpolate [@stdlib/string/base/format-tokenize]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/format-tokenize diff --git a/lib/node_modules/@stdlib/utils/omit/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/omit/docs/types/index.d.ts index 458edeec18e..ff28a00e6e9 100644 --- a/lib/node_modules/@stdlib/utils/omit/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/omit/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /** * Returns a partial object copy excluding specified keys. @@ -40,7 +40,8 @@ * var obj2 = omit( obj1, 'b' ); * // returns { 'a': 1 } */ -declare function omit( obj: any, keys: string | Array ): Object; +declare function omit( obj: T, keys: Array | K ): Omit; // tslint-disable-line max-line-length +declare function omit( obj: T, keys: Array | string ): Partial; // tslint-disable-line max-line-length // EXPORTS // diff --git a/lib/node_modules/@stdlib/utils/omit/docs/types/test.ts b/lib/node_modules/@stdlib/utils/omit/docs/types/test.ts index 9aa766001c9..ac4fc47c38c 100644 --- a/lib/node_modules/@stdlib/utils/omit/docs/types/test.ts +++ b/lib/node_modules/@stdlib/utils/omit/docs/types/test.ts @@ -23,8 +23,8 @@ import omit = require( './index' ); // The function returns an object... { - omit( { 'a': 1, 'b': 2 }, 'a' ); // $ExpectType Object - omit( { 'a': 1, 'b': 2 }, [ 'a', 'b' ] ); // $ExpectType Object + omit( { 'a': 1, 'b': 2 }, 'a' ); // $ExpectType Omit<{ a: number; b: number; }, "a"> + omit( { 'a': 1, 'b': 2 }, [ 'a', 'b' ] ); // $ExpectType Omit<{ a: number; b: number; }, "a" | "b"> } // The compiler throws an error if the function is provided a second argument which is not a string or string array... diff --git a/lib/node_modules/@stdlib/utils/try-then/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/try-then/docs/types/index.d.ts index 0d9e3a5d8ac..fc52b789d1d 100644 --- a/lib/node_modules/@stdlib/utils/try-then/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/try-then/docs/types/index.d.ts @@ -72,7 +72,7 @@ type ErrorHandler = Nullary | Unary; * var z = trythen( x, y ); * // returns */ -declare function trythen( x: () => T, y: ErrorHandler ): T; +declare function trythen( x: () => T, y: ErrorHandler ): T | U; // EXPORTS // diff --git a/lib/node_modules/@stdlib/utils/values/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/values/docs/types/index.d.ts index 6c795a01bc1..c1d269d2078 100644 --- a/lib/node_modules/@stdlib/utils/values/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/values/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /** * Returns an array of an object's own enumerable property values. @@ -37,7 +37,7 @@ * var vals = objectValues( obj ); * // e.g., returns [ 'boop', 'bar' ] */ -declare function objectValues( obj: any ): Array; +declare function objectValues( obj: T ): Array; // EXPORTS // diff --git a/lib/node_modules/@stdlib/utils/values/docs/types/test.ts b/lib/node_modules/@stdlib/utils/values/docs/types/test.ts index 7b9df446a66..d7b9b80d6cf 100644 --- a/lib/node_modules/@stdlib/utils/values/docs/types/test.ts +++ b/lib/node_modules/@stdlib/utils/values/docs/types/test.ts @@ -23,7 +23,9 @@ import objectValues = require( './index' ); // The function returns an array of values... { - objectValues( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType Array + objectValues( { 'beep': 'boop', 'foo': 'bar' } ); // $ExpectType string[] + objectValues( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType (string | number)[] + objectValues( { 'beep': 'boop', 'foo': true } ); // $ExpectType (string | boolean)[] } // The compiler throws an error if the function is provided an incorrect number of arguments...