Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 9, 2021
1 parent f7c8be8 commit 24600eb
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ indent_style = tab
indent_style = space
indent_size = 2

# Set properties for `cli_opts.json` files:
[cli_opts.json]
indent_style = tab

# Set properties for TypeScript files:
[*.ts]
indent_style = tab
Expand Down
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ limitations under the License.

# Utils

[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->

> Standard library utilities.
> Utilities.
<section class="installation">

Expand All @@ -44,20 +44,20 @@ var utils = require( '@stdlib/utils' );

#### utils

Standard library utilities.
Namespace containing utilities.

```javascript
var o = utils;
// returns {...}
```

The package contains the following sub-namespaces:
The namespace has the following sub-namespaces:

<!-- <toc pattern="async"> -->

<div class="namespace-toc">

- <span class="signature">[`async`][@stdlib/utils/async]</span><span class="delimiter">: </span><span class="description">standard library async utilities.</span>
- <span class="signature">[`async`][@stdlib/utils/async]</span><span class="delimiter">: </span><span class="description">async utilities.</span>

</div>

Expand Down Expand Up @@ -159,6 +159,7 @@ The package contains the following sub-namespaces:
<div class="namespace-toc">

- <span class="signature">[`capitalizeKeys( obj )`][@stdlib/utils/capitalize-keys]</span><span class="delimiter">: </span><span class="description">convert the first letter of each object key to uppercase.</span>
- <span class="signature">[`commonKeys( obj1, obj2[, obj3[,...,objN]] )`][@stdlib/utils/common-keys]</span><span class="delimiter">: </span><span class="description">return the common own property names of two or more objects.</span>
- <span class="signature">[`deepGet( obj, path[, options] )`][@stdlib/utils/deep-get]</span><span class="delimiter">: </span><span class="description">get a nested property value.</span>
- <span class="signature">[`deepSet( obj, path, value[, options] )`][@stdlib/utils/deep-set]</span><span class="delimiter">: </span><span class="description">set a nested property value.</span>
- <span class="signature">[`setConfigurableReadOnlyAccessor( obj, prop, getter )`][@stdlib/utils/define-configurable-read-only-accessor]</span><span class="delimiter">: </span><span class="description">define a configurable **read-only** accessor.</span>
Expand Down Expand Up @@ -304,6 +305,7 @@ The package contains the following sub-namespaces:

<div class="namespace-toc">

- <span class="signature">[`commonKeysIn( obj1, obj2[, obj3[,...,objN]] )`][@stdlib/utils/common-keys-in]</span><span class="delimiter">: </span><span class="description">return the common own and inherited property names of two or more objects.</span>
- <span class="signature">[`constructorName( value )`][@stdlib/utils/constructor-name]</span><span class="delimiter">: </span><span class="description">determine the name of a value's constructor.</span>
- <span class="signature">[`convertPath( from, to )`][@stdlib/utils/convert-path]</span><span class="delimiter">: </span><span class="description">convert between POSIX and Windows paths.</span>
- <span class="signature">[`copy( value[, level] )`][@stdlib/utils/copy]</span><span class="delimiter">: </span><span class="description">copy or deep clone a value to an arbitrary depth.</span>
Expand Down Expand Up @@ -412,9 +414,13 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils/main.svg
[coverage-url]: https://codecov.io/github/stdlib-js/utils?branch=main

<!--
[dependencies-image]: https://img.shields.io/david/stdlib-js/utils.svg
[dependencies-url]: https://david-dm.org/stdlib-js/utils/main
-->

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/

Expand All @@ -426,6 +432,8 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].

<!-- <toc-links> -->

[@stdlib/utils/common-keys-in]: https://github.com/stdlib-js/utils/tree/main/common-keys-in

[@stdlib/utils/constructor-name]: https://github.com/stdlib-js/utils/tree/main/constructor-name

[@stdlib/utils/convert-path]: https://github.com/stdlib-js/utils/tree/main/convert-path
Expand Down Expand Up @@ -540,6 +548,8 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].

[@stdlib/utils/capitalize-keys]: https://github.com/stdlib-js/utils/tree/main/capitalize-keys

[@stdlib/utils/common-keys]: https://github.com/stdlib-js/utils/tree/main/common-keys

[@stdlib/utils/deep-get]: https://github.com/stdlib-js/utils/tree/main/deep-get

[@stdlib/utils/deep-set]: https://github.com/stdlib-js/utils/tree/main/deep-set
Expand Down
4 changes: 2 additions & 2 deletions async/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# Async

> Standard library async utilities.
> Async utilities.
<section class="usage">

Expand All @@ -32,7 +32,7 @@ var ns = require( '@stdlib/utils/async' );

#### ns

Standard library async utilities.
Namespace containing async utilities.

```javascript
var o = ns;
Expand Down
4 changes: 2 additions & 2 deletions convert-path/bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var readFileSync = require( '@stdlib/fs/read-file' ).sync;
var CLI = require( '@stdlib/cli/ctor' );
var stdin = require( '@stdlib/process/read-stdin' );
var stdinStream = require( '@stdlib/streams/node/stdin' );
var reEOL = require( '@stdlib/regexp/eol' );
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
var convertPath = require( './../lib' );


Expand Down Expand Up @@ -82,7 +82,7 @@ function main() {
if ( error ) {
return cli.error( error );
}
lines = data.toString().split( reEOL.REGEXP );
lines = data.toString().split( RE_EOL );
for ( i = 0; i < lines.length; i++ ) {
console.log( convertPath( lines[ i ], flags.out ) ); // eslint-disable-line no-console
}
Expand Down
91 changes: 91 additions & 0 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ import bifurcateIn = require( './../../bifurcate-in' );
import bifurcateOwn = require( './../../bifurcate-own' );
import capitalizeKeys = require( './../../capitalize-keys' );
import CircularBuffer = require( './../../circular-buffer' );
import commonKeys = require( './../../common-keys' );
import commonKeysIn = require( './../../common-keys-in' );
import CompactAdjacencyMatrix = require( './../../compact-adjacency-matrix' );
import compose = require( './../../compose' );
import constantFunction = require( './../../constant-function' );
import constructorName = require( './../../constructor-name' );
Expand Down Expand Up @@ -603,6 +606,94 @@ interface Namespace {
*/
CircularBuffer: typeof CircularBuffer;

/**
* Returns the common own property names of two or more objects.
*
* @param obj1 - first object
* @param obj2 - second object
* @param obj - additional objects
* @returns common keys of objects
*
* @example
* var obj = {
* 'a': 1,
* 'b': 2,
* 'c': 3
* };
*
* var obj2 = {
* 'a': 1,
* 'b': 2
* };
*
* var keys = ns.commonKeys( obj, obj2 );
* // returns [ 'a', 'b' ]
*
* @example
* var obj1 = {
* 'a': 1,
* 'b': 2,
* 'c': 3
* };
*
* var obj2 = {
* 'a': 1,
* 'b': 2
* };
*
* var obj3 = {
* 'a': 1,
* };
*
* var keys = ns.commonKeys( obj1, obj2, obj3 );
* // returns [ 'a' ]
*/
commonKeys: typeof commonKeys;

/**
* Returns the common own and inherited property names of two or more objects.
*
* @param obj1 - first object
* @param obj2 - second object
* @param obj - additional objects
* @returns common keys
*
* @example
* var obj = {
* 'a': 1,
* 'b': 2,
* 'c': 3
* };
*
* var obj2 = {
* 'a': 1,
* 'b': 2
* };
*
* var keys = ns.commonKeysIn( obj, obj2 );
* // returns [ 'a', 'b' ]
*
* @example
* var obj1 = {
* 'a': 1,
* 'b': 2,
* 'c': 3
* };
*
* var obj2 = {
* 'a': 1,
* 'b': 2
* };
*
* var obj3 = {
* 'a': 1,
* };
*
* var keys = ns.commonKeysIn( obj1, obj2, obj3 );
* // returns [ 'a' ]
*/
commonKeysIn: typeof commonKeysIn;

/**
* Function composition.
*
Expand Down

0 comments on commit 24600eb

Please sign in to comment.