Skip to content

Commit 36058e8

Browse files
committed
feat: update utils TypeScript declarations
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 6b4c40d commit 36058e8

File tree

1 file changed

+148
-15
lines changed
  • lib/node_modules/@stdlib/utils/docs/types

1 file changed

+148
-15
lines changed

lib/node_modules/@stdlib/utils/docs/types/index.d.ts

Lines changed: 148 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import any = require( '@stdlib/utils/any' );
2424
import anyBy = require( '@stdlib/utils/any-by' );
2525
import anyByRight = require( '@stdlib/utils/any-by-right' );
26+
import anyInBy = require( '@stdlib/utils/any-in-by' );
27+
import anyOwnBy = require( '@stdlib/utils/any-own-by' );
2628
import append = require( '@stdlib/utils/append' );
2729
import argumentFunction = require( '@stdlib/utils/argument-function' );
2830
import async = require( '@stdlib/utils/async' );
@@ -150,6 +152,7 @@ import nextTick = require( '@stdlib/utils/next-tick' );
150152
import none = require( '@stdlib/utils/none' );
151153
import noneBy = require( '@stdlib/utils/none-by' );
152154
import noneByRight = require( '@stdlib/utils/none-by-right' );
155+
import noneOwnBy = require( '@stdlib/utils/none-own-by' );
153156
import nonEnumerableProperties = require( '@stdlib/utils/nonenumerable-properties' );
154157
import nonEnumerablePropertiesIn = require( '@stdlib/utils/nonenumerable-properties-in' );
155158
import nonEnumerablePropertyNames = require( '@stdlib/utils/nonenumerable-property-names' );
@@ -167,6 +170,7 @@ import papply = require( '@stdlib/utils/papply' );
167170
import papplyRight = require( '@stdlib/utils/papply-right' );
168171
import parallel = require( '@stdlib/utils/parallel' );
169172
import parseJSON = require( '@stdlib/utils/parse-json' );
173+
import parseNDJSON = require( '@stdlib/utils/parse-ndjson' );
170174
import pick = require( '@stdlib/utils/pick' );
171175
import pickArguments = require( '@stdlib/utils/pick-arguments' );
172176
import pickBy = require( '@stdlib/utils/pick-by' );
@@ -200,6 +204,7 @@ import sizeOf = require( '@stdlib/utils/size-of' );
200204
import some = require( '@stdlib/utils/some' );
201205
import someBy = require( '@stdlib/utils/some-by' );
202206
import someByRight = require( '@stdlib/utils/some-by-right' );
207+
import someOwnBy = require( '@stdlib/utils/some-own-by' );
203208
import tabulate = require( '@stdlib/utils/tabulate' );
204209
import tabulateBy = require( '@stdlib/utils/tabulate-by' );
205210
import timeit = require( '@stdlib/utils/timeit' );
@@ -319,6 +324,69 @@ interface Namespace {
319324
*/
320325
anyByRight: typeof anyByRight;
321326

327+
/**
328+
* Tests whether at least one property in an object passes a test implemented by a predicate function.
329+
*
330+
* ## Notes
331+
*
332+
* - The predicate function is provided three arguments:
333+
*
334+
* - `value`: property value
335+
* - `key`: property key
336+
* - `obj`: the input object
337+
*
338+
* - The function immediately returns upon encountering a truthy return value.
339+
*
340+
* - If provided an empty object, the function returns `false`.
341+
*
342+
* @param obj - input object
343+
* @param predicate - test function
344+
* @param thisArg - execution context
345+
* @returns boolean indicating whether at least one property passes a test
346+
*
347+
* @example
348+
* function isNegative( v ) {
349+
* return ( v < 0 );
350+
* }
351+
*
352+
* var obj = { 'a': 1, 'b': -2, 'c': 3 };
353+
*
354+
* var bool = ns.anyInBy( obj, isNegative );
355+
* // returns true
356+
*/
357+
anyInBy: typeof anyInBy;
358+
359+
/**
360+
* Tests whether any property of an object passes a test implemented by a predicate function.
361+
*
362+
* ## Notes
363+
*
364+
* - The predicate function is provided three arguments:
365+
*
366+
* - `value`: property value
367+
* - `key`: property key
368+
* - `object`: the input object
369+
*
370+
* - The function immediately returns upon encountering a truthy return value.
371+
* - If provided an empty object, the function returns `false`.
372+
*
373+
* @param object - input object
374+
* @param predicate - test function
375+
* @param thisArg - execution context
376+
* @returns boolean indicating whether any own property pass a test
377+
*
378+
* @example
379+
* function isPositive( v ) {
380+
* return ( v > 0 );
381+
* }
382+
*
383+
* var obj = { 'a': -1, 'b': 2, 'c': -3 };
384+
*
385+
* var bool = ns.anyOwnBy( obj, isPositive );
386+
* // returns true
387+
*/
388+
anyOwnBy: typeof anyOwnBy;
389+
322390
/**
323391
* Adds elements from one collection to the end of another collection.
324392
*
@@ -2407,24 +2475,24 @@ interface Namespace {
24072475
*
24082476
* @example
24092477
* var arr = [ 'beep', 'boop', 'foo', 'bar' ];
2410-
* var ns.groups = [ 'b', 'b', 'f', 'b' ];
2478+
* var groups = [ 'b', 'b', 'f', 'b' ];
24112479
*
24122480
* var opts = {
24132481
* 'returns': 'indices'
24142482
* };
24152483
*
2416-
* var out = ns.group( arr, opts, ns.groups );
2484+
* var out = ns.group( arr, opts, groups );
24172485
* // returns { 'b': [ 0, 1, 3 ], 'f': [ 2 ] }
24182486
*
24192487
* @example
24202488
* var arr = [ 'beep', 'boop', 'foo', 'bar' ];
2421-
* var ns.groups = [ 'b', 'b', 'f', 'b' ];
2489+
* var groups = [ 'b', 'b', 'f', 'b' ];
24222490
*
24232491
* var opts = {
24242492
* 'returns': '*'
24252493
* };
24262494
*
2427-
* var out = ns.group( arr, opts, ns.groups );
2495+
* var out = ns.group( arr, opts, groups );
24282496
* // returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
24292497
*/
24302498
group: typeof group;
@@ -2558,7 +2626,7 @@ interface Namespace {
25582626
* @param obj - input object
25592627
* @param options - function options
25602628
* @param options.thisArg - execution context
2561-
* @param options.returns - if `'values'`, values are returned; if `'indices'`, indices are returned; if `'*'`, both indices and values are returned (default: 'values')
2629+
* @param options.returns - if `'values'`, values are returned; if `'keys'`, keys are returned; if `'*'`, both keys and values are returned (default: 'values')
25622630
* @param indicator - indicator function indicating which group an element in the input object belongs to
25632631
* @returns group results
25642632
*
@@ -3855,12 +3923,12 @@ interface Namespace {
38553923
* return prod;
38563924
* }
38573925
*
3858-
* var ns.memoized = ns.memoize( factorial );
3926+
* var memoized = ns.memoize( factorial );
38593927
*
3860-
* var v = ns.memoized( 5 );
3928+
* var v = memoized( 5 );
38613929
* // returns 120
38623930
*
3863-
* v = ns.memoized( 5 );
3931+
* v = memoized( 5 );
38643932
* // returns 120
38653933
*/
38663934
memoize: typeof memoize;
@@ -3896,7 +3964,7 @@ interface Namespace {
38963964
* 'extend': true
38973965
* };
38983966
*
3899-
* var ns.mergefcn = ns.merge.factory( opts );
3967+
* var mergefcn = ns.merge.factory( opts );
39003968
* // returns <Function>
39013969
*/
39023970
merge: typeof merge;
@@ -4089,6 +4157,37 @@ interface Namespace {
40894157
*/
40904158
noneByRight: typeof noneByRight;
40914159

4160+
/**
4161+
* Tests whether every property of an object fails a test implemented by a predicate function.
4162+
*
4163+
* ## Notes
4164+
*
4165+
* - The predicate function is provided three arguments:
4166+
*
4167+
* - `value`: property value
4168+
* - `key`: property key
4169+
* - `object`: the input object
4170+
*
4171+
* - The function immediately returns upon encountering a truthy return value.
4172+
* - If provided an empty object, the function returns `true`.
4173+
*
4174+
* @param object - input object
4175+
* @param predicate - test function
4176+
* @param thisArg - execution context
4177+
* @returns boolean indicating whether every property fails a test
4178+
*
4179+
* @example
4180+
* function isUnderage( v ) {
4181+
* return ( v < 18 );
4182+
* }
4183+
*
4184+
* var obj = { 'a': 20, 'b': 22, 'c': 25 };
4185+
*
4186+
* var bool = ns.noneOwnBy( obj, isUnderage );
4187+
* // returns true
4188+
*/
4189+
noneOwnBy: typeof noneOwnBy;
4190+
40924191
/**
40934192
* Returns an array of an object's own non-enumerable property names and symbols.
40944193
*
@@ -4486,6 +4585,8 @@ interface Namespace {
44864585
*/
44874586
parseJSON: typeof parseJSON;
44884587

4588+
parseNDJSON: typeof parseNDJSON;
4589+
44894590
/**
44904591
* Returns a partial object copy containing only specified keys.
44914592
*
@@ -5336,6 +5437,38 @@ interface Namespace {
53365437
*/
53375438
someByRight: typeof someByRight;
53385439

5440+
/**
5441+
* Tests whether an object contains at least `n` own properties which pass a test implemented by a predicate function.
5442+
*
5443+
* ## Notes
5444+
*
5445+
* - The predicate function is provided three arguments:
5446+
*
5447+
* - `value`: object value
5448+
* - `key`: object key
5449+
* - `obj`: the input object
5450+
*
5451+
* - The function immediately returns upon finding `n` successful properties.
5452+
*
5453+
* - If provided an empty object, the function returns `false`.
5454+
*
5455+
* @param obj - input object
5456+
* @param n - number of properties
5457+
* @param predicate - test function
5458+
* @returns boolean indicating whether an object contains at least `n` own properties which pass a test
5459+
*
5460+
* @example
5461+
* function isNegative( v ) {
5462+
* return ( v < 0 );
5463+
* }
5464+
*
5465+
* var obj = { a: 1, b: 2, c: -3, d: 4, e: -1 };
5466+
*
5467+
* var bool = ns.someOwnBy( obj, 2, isNegative );
5468+
* // returns true
5469+
*/
5470+
someOwnBy: typeof someOwnBy;
5471+
53395472
/**
53405473
* Generates a frequency table.
53415474
*
@@ -6148,19 +6281,19 @@ interface Namespace {
61486281
* @returns output array of arrays
61496282
*
61506283
* @example
6151-
* var ns.zipped = ns.zip( [ 1, 2 ], [ 'a', 'b' ] );
6284+
* var zipped = ns.zip( [ 1, 2 ], [ 'a', 'b' ] );
61526285
* // returns [ [ 1, 'a' ], [ 2, 'b' ] ]
61536286
*
61546287
* @example
6155-
* var ns.zipped = ns.zip( [ 1, 2, 3 ], [ 'a', 'b' ] );
6288+
* var zipped = ns.zip( [ 1, 2, 3 ], [ 'a', 'b' ] );
61566289
* // returns [ [ 1, 'a' ], [ 2, 'b' ] ]
61576290
*
61586291
* @example
61596292
* var opts = {
61606293
* 'trunc': false
61616294
* };
61626295
*
6163-
* var ns.zipped = ns.zip( [ 1, 2, 3 ], [ 'a', 'b' ], opts );
6296+
* var zipped = ns.zip( [ 1, 2, 3 ], [ 'a', 'b' ], opts );
61646297
* // returns [ [ 1, 'a' ], [ 2, 'b' ], [ 3, null ] ]
61656298
*
61666299
* @example
@@ -6169,18 +6302,18 @@ interface Namespace {
61696302
* 'fill': ''
61706303
* };
61716304
*
6172-
* var ns.zipped = ns.zip( [ 1, 2, 3 ], [ 'a', 'b' ], opts );
6305+
* var zipped = ns.zip( [ 1, 2, 3 ], [ 'a', 'b' ], opts );
61736306
* // returns [ [ 1, 'a' ], [ 2, 'b' ], [ 3, '' ] ]
61746307
*
61756308
* @example
61766309
* var arr = [ [ 1, 2 ], [ 'a', 'b' ] ];
61776310
*
61786311
* // Default behavior:
6179-
* var ns.zipped = ns.zip( arr );
6312+
* var zipped = ns.zip( arr );
61806313
* // returns [ [ [ 1, 2 ] ], [ [ 'a', 'b' ] ] ]
61816314
*
61826315
* // Array of arrays:
6183-
* ns.zipped = ns.zip( arr, { 'arrays': true } );
6316+
* zipped = ns.zip( arr, { 'arrays': true } );
61846317
* // returns [ [ 1, 'a' ], [ 2, 'b' ] ]
61856318
*/
61866319
zip: typeof zip;

0 commit comments

Comments
 (0)