@bbn/bbn 2.0.6 → 2.0.7

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/dist/date.js CHANGED
@@ -16,6 +16,7 @@ import substr from './fn/string/substr.js';
16
16
  import isNumber from './fn/type/isNumber.js';
17
17
  import isDate from './fn/type/isDate.js';
18
18
  import isPrimitive from './fn/type/isPrimitive.js';
19
+ import extend from './fn/object/extend.js';
19
20
  const patterns = [
20
21
  // MariaDB DATETIME "YYYY-MM-DD HH:MM:SS"
21
22
  {
@@ -235,7 +236,7 @@ const buildLocaleFromIntl = () => {
235
236
  weekdaysShort,
236
237
  };
237
238
  };
238
- const locales = buildLocaleFromIntl();
239
+ const locales = {};
239
240
  class bbnDateDuration {
240
241
  constructor(len, unit, fromMs = false) {
241
242
  _bbnDateDuration_instances.add(this);
@@ -373,6 +374,9 @@ class bbnDateTool {
373
374
  */
374
375
  static parse(input, format, locale) {
375
376
  var _a, _b, _c, _d;
377
+ if (!('monthsLong' in locales)) {
378
+ extend(locales, buildLocaleFromIntl());
379
+ }
376
380
  const loc = {
377
381
  monthsLong: (_a = locale === null || locale === void 0 ? void 0 : locale.monthsLong) !== null && _a !== void 0 ? _a : locales.monthsLong,
378
382
  monthsShort: (_b = locale === null || locale === void 0 ? void 0 : locale.monthsShort) !== null && _b !== void 0 ? _b : locales.monthsShort,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",