@algolia/client-common 5.0.0-alpha.32 → 5.0.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -266,6 +266,7 @@ function createStatefulHost(host, status = 'up') {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
function _defineProperty(obj, key, value) {
|
|
269
|
+
key = _toPropertyKey(key);
|
|
269
270
|
if (key in obj) {
|
|
270
271
|
Object.defineProperty(obj, key, {
|
|
271
272
|
value: value,
|
|
@@ -278,6 +279,20 @@ function _defineProperty(obj, key, value) {
|
|
|
278
279
|
}
|
|
279
280
|
return obj;
|
|
280
281
|
}
|
|
282
|
+
function _toPrimitive(input, hint) {
|
|
283
|
+
if (typeof input !== "object" || input === null) return input;
|
|
284
|
+
var prim = input[Symbol.toPrimitive];
|
|
285
|
+
if (prim !== undefined) {
|
|
286
|
+
var res = prim.call(input, hint || "default");
|
|
287
|
+
if (typeof res !== "object") return res;
|
|
288
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
289
|
+
}
|
|
290
|
+
return (hint === "string" ? String : Number)(input);
|
|
291
|
+
}
|
|
292
|
+
function _toPropertyKey(arg) {
|
|
293
|
+
var key = _toPrimitive(arg, "string");
|
|
294
|
+
return typeof key === "symbol" ? key : String(key);
|
|
295
|
+
}
|
|
281
296
|
|
|
282
297
|
class AlgoliaError extends Error {
|
|
283
298
|
constructor(message, name) {
|
|
@@ -262,6 +262,7 @@ function createStatefulHost(host, status = 'up') {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
function _defineProperty(obj, key, value) {
|
|
265
|
+
key = _toPropertyKey(key);
|
|
265
266
|
if (key in obj) {
|
|
266
267
|
Object.defineProperty(obj, key, {
|
|
267
268
|
value: value,
|
|
@@ -274,6 +275,20 @@ function _defineProperty(obj, key, value) {
|
|
|
274
275
|
}
|
|
275
276
|
return obj;
|
|
276
277
|
}
|
|
278
|
+
function _toPrimitive(input, hint) {
|
|
279
|
+
if (typeof input !== "object" || input === null) return input;
|
|
280
|
+
var prim = input[Symbol.toPrimitive];
|
|
281
|
+
if (prim !== undefined) {
|
|
282
|
+
var res = prim.call(input, hint || "default");
|
|
283
|
+
if (typeof res !== "object") return res;
|
|
284
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
285
|
+
}
|
|
286
|
+
return (hint === "string" ? String : Number)(input);
|
|
287
|
+
}
|
|
288
|
+
function _toPropertyKey(arg) {
|
|
289
|
+
var key = _toPrimitive(arg, "string");
|
|
290
|
+
return typeof key === "symbol" ? key : String(key);
|
|
291
|
+
}
|
|
277
292
|
|
|
278
293
|
class AlgoliaError extends Error {
|
|
279
294
|
constructor(message, name) {
|
package/package.json
CHANGED