@tryghost/content-api 1.6.0 → 1.6.1

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.
package/es/content-api.js CHANGED
@@ -119,12 +119,12 @@ var indexedObject = fails(function () {
119
119
  return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
120
120
  } : Object$4;
121
121
 
122
- var TypeError$f = global_1.TypeError;
122
+ var TypeError$g = global_1.TypeError;
123
123
 
124
124
  // `RequireObjectCoercible` abstract operation
125
125
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
126
126
  var requireObjectCoercible = function (it) {
127
- if (it == undefined) throw TypeError$f("Can't call method on " + it);
127
+ if (it == undefined) throw TypeError$g("Can't call method on " + it);
128
128
  return it;
129
129
  };
130
130
 
@@ -223,12 +223,12 @@ var tryToString = function (argument) {
223
223
  }
224
224
  };
225
225
 
226
- var TypeError$e = global_1.TypeError;
226
+ var TypeError$f = global_1.TypeError;
227
227
 
228
228
  // `Assert: IsCallable(argument) is true`
229
229
  var aCallable = function (argument) {
230
230
  if (isCallable(argument)) return argument;
231
- throw TypeError$e(tryToString(argument) + ' is not a function');
231
+ throw TypeError$f(tryToString(argument) + ' is not a function');
232
232
  };
233
233
 
234
234
  // `GetMethod` abstract operation
@@ -238,7 +238,7 @@ var getMethod = function (V, P) {
238
238
  return func == null ? undefined : aCallable(func);
239
239
  };
240
240
 
241
- var TypeError$d = global_1.TypeError;
241
+ var TypeError$e = global_1.TypeError;
242
242
 
243
243
  // `OrdinaryToPrimitive` abstract operation
244
244
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
@@ -247,7 +247,7 @@ var ordinaryToPrimitive = function (input, pref) {
247
247
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
248
248
  if (isCallable(fn = input.valueOf) && !isObject$1(val = functionCall(fn, input))) return val;
249
249
  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
250
- throw TypeError$d("Can't convert object to primitive value");
250
+ throw TypeError$e("Can't convert object to primitive value");
251
251
  };
252
252
 
253
253
  // eslint-disable-next-line es/no-object-defineproperty -- safe
@@ -270,10 +270,10 @@ var shared = createCommonjsModule(function (module) {
270
270
  (module.exports = function (key, value) {
271
271
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
272
272
  })('versions', []).push({
273
- version: '3.20.3',
273
+ version: '3.21.1',
274
274
  mode: 'global',
275
275
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
276
- license: 'https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE',
276
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
277
277
  source: 'https://github.com/zloirock/core-js'
278
278
  });
279
279
  });
@@ -320,7 +320,7 @@ var wellKnownSymbol = function (name) {
320
320
  } return WellKnownSymbolsStore[name];
321
321
  };
322
322
 
323
- var TypeError$c = global_1.TypeError;
323
+ var TypeError$d = global_1.TypeError;
324
324
  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
325
325
 
326
326
  // `ToPrimitive` abstract operation
@@ -333,7 +333,7 @@ var toPrimitive = function (input, pref) {
333
333
  if (pref === undefined) pref = 'default';
334
334
  result = functionCall(exoticToPrim, input, pref);
335
335
  if (!isObject$1(result) || isSymbol(result)) return result;
336
- throw TypeError$c("Can't convert object to primitive value");
336
+ throw TypeError$d("Can't convert object to primitive value");
337
337
  }
338
338
  if (pref === undefined) pref = 'number';
339
339
  return ordinaryToPrimitive(input, pref);
@@ -391,15 +391,15 @@ var v8PrototypeDefineBug = descriptors && fails(function () {
391
391
  });
392
392
 
393
393
  var String$4 = global_1.String;
394
- var TypeError$b = global_1.TypeError;
394
+ var TypeError$c = global_1.TypeError;
395
395
 
396
396
  // `Assert: Type(argument) is Object`
397
397
  var anObject = function (argument) {
398
398
  if (isObject$1(argument)) return argument;
399
- throw TypeError$b(String$4(argument) + ' is not an object');
399
+ throw TypeError$c(String$4(argument) + ' is not an object');
400
400
  };
401
401
 
402
- var TypeError$a = global_1.TypeError;
402
+ var TypeError$b = global_1.TypeError;
403
403
  // eslint-disable-next-line es/no-object-defineproperty -- safe
404
404
  var $defineProperty = Object.defineProperty;
405
405
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -432,7 +432,7 @@ var f$4 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Att
432
432
  if (ie8DomDefine) try {
433
433
  return $defineProperty(O, P, Attributes);
434
434
  } catch (error) { /* empty */ }
435
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$a('Accessors not supported');
435
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
436
436
  if ('value' in Attributes) O[P] = Attributes.value;
437
437
  return O;
438
438
  };
@@ -472,7 +472,7 @@ var sharedKey = function (key) {
472
472
  var hiddenKeys$1 = {};
473
473
 
474
474
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
475
- var TypeError$9 = global_1.TypeError;
475
+ var TypeError$a = global_1.TypeError;
476
476
  var WeakMap = global_1.WeakMap;
477
477
  var set$1, get, has;
478
478
 
@@ -484,7 +484,7 @@ var getterFor = function (TYPE) {
484
484
  return function (it) {
485
485
  var state;
486
486
  if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
487
- throw TypeError$9('Incompatible receiver, ' + TYPE + ' required');
487
+ throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
488
488
  } return state;
489
489
  };
490
490
  };
@@ -495,7 +495,7 @@ if (nativeWeakMap || sharedStore.state) {
495
495
  var wmhas = functionUncurryThis(store.has);
496
496
  var wmset = functionUncurryThis(store.set);
497
497
  set$1 = function (it, metadata) {
498
- if (wmhas(store, it)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
498
+ if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
499
499
  metadata.facade = it;
500
500
  wmset(store, it, metadata);
501
501
  return metadata;
@@ -510,7 +510,7 @@ if (nativeWeakMap || sharedStore.state) {
510
510
  var STATE = sharedKey('state');
511
511
  hiddenKeys$1[STATE] = true;
512
512
  set$1 = function (it, metadata) {
513
- if (hasOwnProperty_1(it, STATE)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
513
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
514
514
  metadata.facade = it;
515
515
  createNonEnumerableProperty(it, STATE, metadata);
516
516
  return metadata;
@@ -801,8 +801,8 @@ var _export = function (options, source) {
801
801
  var arrayMethodIsStrict = function (METHOD_NAME, argument) {
802
802
  var method = [][METHOD_NAME];
803
803
  return !!method && fails(function () {
804
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
805
- method.call(null, argument || function () { throw 1; }, 1);
804
+ // eslint-disable-next-line no-useless-call -- required for testing
805
+ method.call(null, argument || function () { return 1; }, 1);
806
806
  });
807
807
  };
808
808
 
@@ -1190,11 +1190,11 @@ var isRegexp = function (it) {
1190
1190
  return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
1191
1191
  };
1192
1192
 
1193
- var TypeError$8 = global_1.TypeError;
1193
+ var TypeError$9 = global_1.TypeError;
1194
1194
 
1195
1195
  var notARegexp = function (it) {
1196
1196
  if (isRegexp(it)) {
1197
- throw TypeError$8("The method doesn't accept regular expressions");
1197
+ throw TypeError$9("The method doesn't accept regular expressions");
1198
1198
  } return it;
1199
1199
  };
1200
1200
 
@@ -1302,11 +1302,11 @@ var redefineAll = function (target, src, options) {
1302
1302
  };
1303
1303
 
1304
1304
  var String$2 = global_1.String;
1305
- var TypeError$7 = global_1.TypeError;
1305
+ var TypeError$8 = global_1.TypeError;
1306
1306
 
1307
1307
  var aPossiblePrototype = function (argument) {
1308
1308
  if (typeof argument == 'object' || isCallable(argument)) return argument;
1309
- throw TypeError$7("Can't set " + String$2(argument) + ' as a prototype');
1309
+ throw TypeError$8("Can't set " + String$2(argument) + ' as a prototype');
1310
1310
  };
1311
1311
 
1312
1312
  /* eslint-disable no-proto -- safe */
@@ -1364,11 +1364,11 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
1364
1364
  }
1365
1365
  };
1366
1366
 
1367
- var TypeError$6 = global_1.TypeError;
1367
+ var TypeError$7 = global_1.TypeError;
1368
1368
 
1369
1369
  var anInstance = function (it, Prototype) {
1370
1370
  if (objectIsPrototypeOf(Prototype, it)) return it;
1371
- throw TypeError$6('Incorrect invocation');
1371
+ throw TypeError$7('Incorrect invocation');
1372
1372
  };
1373
1373
 
1374
1374
  var bind$2 = functionUncurryThis(functionUncurryThis.bind);
@@ -1399,12 +1399,12 @@ var getIteratorMethod = function (it) {
1399
1399
  || iterators[classof(it)];
1400
1400
  };
1401
1401
 
1402
- var TypeError$5 = global_1.TypeError;
1402
+ var TypeError$6 = global_1.TypeError;
1403
1403
 
1404
1404
  var getIterator = function (argument, usingIterator) {
1405
1405
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1406
1406
  if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
1407
- throw TypeError$5(tryToString(argument) + ' is not iterable');
1407
+ throw TypeError$6(tryToString(argument) + ' is not iterable');
1408
1408
  };
1409
1409
 
1410
1410
  var iteratorClose = function (iterator, kind, value) {
@@ -1427,7 +1427,7 @@ var iteratorClose = function (iterator, kind, value) {
1427
1427
  return value;
1428
1428
  };
1429
1429
 
1430
- var TypeError$4 = global_1.TypeError;
1430
+ var TypeError$5 = global_1.TypeError;
1431
1431
 
1432
1432
  var Result = function (stopped, result) {
1433
1433
  this.stopped = stopped;
@@ -1460,7 +1460,7 @@ var iterate = function (iterable, unboundFunction, options) {
1460
1460
  iterator = iterable;
1461
1461
  } else {
1462
1462
  iterFn = getIteratorMethod(iterable);
1463
- if (!iterFn) throw TypeError$4(tryToString(iterable) + ' is not iterable');
1463
+ if (!iterFn) throw TypeError$5(tryToString(iterable) + ' is not iterable');
1464
1464
  // optimisation for array iterators
1465
1465
  if (isArrayIteratorMethod(iterFn)) {
1466
1466
  for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
@@ -1565,12 +1565,12 @@ var isConstructor = !construct || fails(function () {
1565
1565
  || called;
1566
1566
  }) ? isConstructorLegacy : isConstructorModern;
1567
1567
 
1568
- var TypeError$3 = global_1.TypeError;
1568
+ var TypeError$4 = global_1.TypeError;
1569
1569
 
1570
1570
  // `Assert: IsConstructor(argument) is true`
1571
1571
  var aConstructor = function (argument) {
1572
1572
  if (isConstructor(argument)) return argument;
1573
- throw TypeError$3(tryToString(argument) + ' is not a constructor');
1573
+ throw TypeError$4(tryToString(argument) + ' is not a constructor');
1574
1574
  };
1575
1575
 
1576
1576
  var SPECIES$3 = wellKnownSymbol('species');
@@ -1594,6 +1594,13 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBind
1594
1594
 
1595
1595
  var arraySlice = functionUncurryThis([].slice);
1596
1596
 
1597
+ var TypeError$3 = global_1.TypeError;
1598
+
1599
+ var validateArgumentsLength = function (passed, required) {
1600
+ if (passed < required) throw TypeError$3('Not enough arguments');
1601
+ return passed;
1602
+ };
1603
+
1597
1604
  var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
1598
1605
 
1599
1606
  var engineIsNode = classofRaw(global_1.process) == 'process';
@@ -1640,10 +1647,12 @@ var post = function (id) {
1640
1647
 
1641
1648
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1642
1649
  if (!set || !clear) {
1643
- set = function setImmediate(fn) {
1650
+ set = function setImmediate(handler) {
1651
+ validateArgumentsLength(arguments.length, 1);
1652
+ var fn = isCallable(handler) ? handler : Function$1(handler);
1644
1653
  var args = arraySlice(arguments, 1);
1645
1654
  queue$1[++counter] = function () {
1646
- functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
1655
+ functionApply(fn, undefined, args);
1647
1656
  };
1648
1657
  defer(counter);
1649
1658
  return counter;