Skip to content

Commit 681ec43

Browse files
remove: remove objectInverseBy from namespace
This commit removes the `objectInverseBy` symbol from the `@stdlib/utils` namespace due to a package migration. BREAKING CHANGE: remove `objectInverseBy` To migrate, users should access the same symbol via the `@stdlib/object` namespace. Ref: #8755
1 parent e758b76 commit 681ec43

2 files changed

Lines changed: 0 additions & 49 deletions

File tree

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

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ import nonEnumerablePropertySymbolsIn = require( '@stdlib/utils/nonenumerable-pr
152152
import nonIndexKeys = require( '@stdlib/utils/nonindex-keys' );
153153
import noop = require( '@stdlib/utils/noop' );
154154
import objectInverse = require( '@stdlib/utils/object-inverse' );
155-
import objectInverseBy = require( '@stdlib/utils/object-inverse-by' );
156155
import omit = require( '@stdlib/utils/omit' );
157156
import omitBy = require( '@stdlib/utils/omit-by' );
158157
import openURL = require( '@stdlib/utils/open-url' );
@@ -4051,45 +4050,6 @@ interface Namespace {
40514050
*/
40524051
objectInverse: typeof objectInverse;
40534052

4054-
/**
4055-
* Inverts an object, such that keys become values and values become keys, according to a transform function.
4056-
*
4057-
* ## Notes
4058-
*
4059-
* - The transform function is provided three arguments:
4060-
*
4061-
* - `key`: object key.
4062-
* - `value`: object value corresponding to `key`.
4063-
* - `obj`: the input object.
4064-
*
4065-
* - The value returned by a transform function should be a value which can be serialized as an object key. Hence, beware when providing objects having values which are themselves objects. The function relies on native object serialization (`#toString`) when converting transform function return values to keys.
4066-
*
4067-
* - In older JavaScript engines, insertion order is not guaranteed, as object key enumeration was not specified according to the ECMAScript specification in earlier editions. In practice, however, most older engines use insertion order to sort an object's keys, thus allowing for deterministic inversion.
4068-
*
4069-
* @param obj - input object
4070-
* @param opts - function options
4071-
* @param opts.duplicates - boolean indicating whether to store duplicate keys (default: true)
4072-
* @param transform - transform function
4073-
* @returns inverted object
4074-
*
4075-
* @example
4076-
* function transform( key, value ) {
4077-
* return value;
4078-
* }
4079-
*
4080-
* var obj = {};
4081-
* obj.a = 'beep';
4082-
* obj.b = 'boop';
4083-
* obj.c = 'beep'; // inserted after `a`
4084-
*
4085-
* var opts = {
4086-
* 'duplicates': false
4087-
* };
4088-
* var out = ns.objectInverseBy( obj, opts, transform );
4089-
* // returns { 'beep': 'c', 'boop': 'b' }
4090-
*/
4091-
objectInverseBy: typeof objectInverseBy;
4092-
40934053
/**
40944054
* Returns a partial object copy excluding specified keys.
40954055
*

lib/node_modules/@stdlib/utils/lib/index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,15 +1228,6 @@ setReadOnly( utils, 'noop', require( '@stdlib/utils/noop' ) );
12281228
*/
12291229
setReadOnly( utils, 'objectInverse', require( '@stdlib/utils/object-inverse' ) );
12301230

1231-
/**
1232-
* @name objectInverseBy
1233-
* @memberof utils
1234-
* @readonly
1235-
* @type {Function}
1236-
* @see {@link module:@stdlib/utils/object-inverse-by}
1237-
*/
1238-
setReadOnly( utils, 'objectInverseBy', require( '@stdlib/utils/object-inverse-by' ) );
1239-
12401231
/**
12411232
* @name omit
12421233
* @memberof utils

0 commit comments

Comments
 (0)