@karmaniverous/entity-manager
Advanced tools
Comparing version 2.1.3 to 2.2.0
@@ -8,2 +8,3 @@ "use strict"; | ||
var _zipObject2 = _interopRequireDefault(require("lodash/zipObject")); | ||
var _isArray2 = _interopRequireDefault(require("lodash/isArray")); | ||
var _map2 = _interopRequireDefault(require("lodash/map")); | ||
@@ -295,3 +296,3 @@ var _size2 = _interopRequireDefault(require("lodash/size")); | ||
* @param {string} entityToken - Entity token. | ||
* @param {string} indexToken - Index token. | ||
* @param {string|string[]} indexToken - Index token or array of key tokens. | ||
* @param {string} value - Dehydrated index value. | ||
@@ -306,3 +307,3 @@ * @param {string} [delimiter] - Delimiter. | ||
let delimiter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '~'; | ||
const indexComponents = _classPrivateFieldGet(this, _entityManager).getIndexComponents(entityToken, indexToken); | ||
const indexComponents = (0, _isArray2.default)(indexToken) ? indexToken : _classPrivateFieldGet(this, _entityManager).getIndexComponents(entityToken, indexToken); | ||
const indexKeys = (0, _sortBy2.default)(indexComponents.reduce((keys, component) => { | ||
@@ -309,0 +310,0 @@ const { |
@@ -271,3 +271,3 @@ /** | ||
* @param {string} entityToken - Entity token. | ||
* @param {string} indexToken - Index token. | ||
* @param {string|string[]} indexToken - Index token or array of key tokens. | ||
* @param {string} value - Dehydrated index value. | ||
@@ -280,6 +280,5 @@ * @param {string} [delimiter] - Delimiter. | ||
rehydrateIndex(entityToken, indexToken, value = '', delimiter = '~') { | ||
const indexComponents = this.#entityManager.getIndexComponents( | ||
entityToken, | ||
indexToken | ||
); | ||
const indexComponents = _.isArray(indexToken) | ||
? indexToken | ||
: this.#entityManager.getIndexComponents(entityToken, indexToken); | ||
@@ -286,0 +285,0 @@ const indexKeys = _.sortBy( |
{ | ||
"name": "@karmaniverous/entity-manager", | ||
"version": "2.1.3", | ||
"version": "2.2.0", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -378,3 +378,3 @@ # entity-manager | ||
| entityToken | <code>string</code> | | Entity token. | | ||
| indexToken | <code>string</code> | | Index token. | | ||
| indexToken | <code>string</code> \| <code>Array.<string></code> | | Index token or array of key tokens. | | ||
| value | <code>string</code> | | Dehydrated index value. | | ||
@@ -381,0 +381,0 @@ | [delimiter] | <code>string</code> | <code>"~"</code> | Delimiter. | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78129
417
88
22
45
60