@date-io/dayjs
Advanced tools
Comparing version 2.8.0 to 2.8.1
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var defaultDayjs = require('dayjs'); | ||
var customParseFormatPlugin = require('dayjs/plugin/customParseFormat'); | ||
var localizedFormatPlugin = require('dayjs/plugin/localizedFormat'); | ||
var isBetweenPlugin = require('dayjs/plugin/isBetween'); | ||
var defaultDayjs = _interopDefault(require('dayjs')); | ||
var customParseFormatPlugin = _interopDefault(require('dayjs/plugin/customParseFormat')); | ||
var localizedFormatPlugin = _interopDefault(require('dayjs/plugin/localizedFormat')); | ||
var isBetweenPlugin = _interopDefault(require('dayjs/plugin/isBetween')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
defaultDayjs.extend(customParseFormatPlugin); | ||
defaultDayjs.extend(localizedFormatPlugin); | ||
defaultDayjs.extend(isBetweenPlugin); | ||
var defaultDayjs__default = /*#__PURE__*/_interopDefaultLegacy(defaultDayjs); | ||
var customParseFormatPlugin__default = /*#__PURE__*/_interopDefaultLegacy(customParseFormatPlugin); | ||
var localizedFormatPlugin__default = /*#__PURE__*/_interopDefaultLegacy(localizedFormatPlugin); | ||
var isBetweenPlugin__default = /*#__PURE__*/_interopDefaultLegacy(isBetweenPlugin); | ||
defaultDayjs__default['default'].extend(customParseFormatPlugin__default['default']); | ||
defaultDayjs__default['default'].extend(localizedFormatPlugin__default['default']); | ||
defaultDayjs__default['default'].extend(isBetweenPlugin__default['default']); | ||
var withLocale = function (dayjs, locale) { | ||
@@ -55,3 +60,3 @@ return !locale ? dayjs : function () { | ||
this.lib = "dayjs"; | ||
this.rawDayJsInstance = instance || defaultDayjs; | ||
this.rawDayJsInstance = instance || defaultDayjs__default['default']; | ||
this.dayjs = withLocale(this.rawDayJsInstance, locale); | ||
@@ -58,0 +63,0 @@ this.locale = locale; |
{ | ||
"name": "@date-io/dayjs", | ||
"version": "2.8.0", | ||
"version": "2.8.1", | ||
"description": "Abstraction over common javascript date management libraries", | ||
@@ -12,3 +12,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@date-io/core": "^2.8.0" | ||
"@date-io/core": "^2.8.1" | ||
}, | ||
@@ -45,3 +45,3 @@ "devDependencies": { | ||
"license": "MIT", | ||
"gitHead": "25036d2ad2155f77e48edcb662c877431102f9fd" | ||
"gitHead": "5f04842fb1c5949535b79460f073ab8e668bdb6a" | ||
} |
35261
893
Updated@date-io/core@^2.8.1