Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@date-io/dayjs

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@date-io/dayjs - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

LICENSE

6

build/dayjs-utils.d.ts
import defaultDayjs from "dayjs";
import { IUtils } from "@date-io/core/IUtils";
interface Opts {
/** Locale string, only for consistency and rerendering */
locale?: string;
/** Make sure that your dayjs instance extends customParseFormat and advancedFormat */
instance?: typeof defaultDayjs;
/** @deprecated */
dayjs?: typeof defaultDayjs;

@@ -18,3 +22,3 @@ }

dateFormat: string;
constructor({ locale, dayjs }?: Opts);
constructor({ locale, instance, dayjs }?: Opts);
parse(value: any, format: any): defaultDayjs.Dayjs;

@@ -21,0 +25,0 @@ date(value?: any): defaultDayjs.Dayjs;

4

build/index.esm.js

@@ -9,3 +9,3 @@ import defaultDayjs from 'dayjs';

function DayjsUtils(_a) {
var _b = _a === void 0 ? {} : _a, locale = _b.locale, dayjs = _b.dayjs;
var _b = _a === void 0 ? {} : _a, locale = _b.locale, instance = _b.instance, dayjs = _b.dayjs;
this.yearFormat = "YYYY";

@@ -18,3 +18,3 @@ this.yearMonthFormat = "MMMM YYYY";

this.dateFormat = "MMMM Do";
this.dayjs = dayjs || defaultDayjs;
this.dayjs = instance || dayjs || defaultDayjs;
this.locale = locale;

@@ -21,0 +21,0 @@ }

@@ -13,3 +13,3 @@ 'use strict';

function DayjsUtils(_a) {
var _b = _a === void 0 ? {} : _a, locale = _b.locale, dayjs = _b.dayjs;
var _b = _a === void 0 ? {} : _a, locale = _b.locale, instance = _b.instance, dayjs = _b.dayjs;
this.yearFormat = "YYYY";

@@ -22,3 +22,3 @@ this.yearMonthFormat = "MMMM YYYY";

this.dateFormat = "MMMM Do";
this.dayjs = dayjs || defaultDayjs;
this.dayjs = instance || dayjs || defaultDayjs;
this.locale = locale;

@@ -25,0 +25,0 @@ }

{
"name": "@date-io/dayjs",
"version": "1.1.0",
"version": "1.2.0",
"description": "Abstraction over common javascript date management libraries",

@@ -12,8 +12,8 @@ "main": "build/index.js",

"dependencies": {
"@date-io/core": "^1.1.0"
"@date-io/core": "^1.2.0"
},
"devDependencies": {
"dayjs": "^1.8.0",
"dayjs": "^1.8.12",
"rollup": "^0.66.6",
"typescript": "^3.2.4"
"typescript": "^3.4.4"
},

@@ -45,3 +45,3 @@ "scripts": {

"license": "MIT",
"gitHead": "75f08408e702874235295cf283747ed5c02193f0"
"gitHead": "dc8ace95621e7f1a14024dbfd5b9d42fa18f4e88"
}

@@ -10,3 +10,7 @@ import defaultDayjs from "dayjs";

interface Opts {
/** Locale string, only for consistency and rerendering */
locale?: string;
/** Make sure that your dayjs instance extends customParseFormat and advancedFormat */
instance?: typeof defaultDayjs;
/** @deprecated */
dayjs?: typeof defaultDayjs;

@@ -36,4 +40,4 @@ }

constructor({ locale, dayjs }: Opts = {}) {
this.dayjs = dayjs || defaultDayjs;
constructor({ locale, instance, dayjs }: Opts = {}) {
this.dayjs = instance || dayjs || defaultDayjs;
this.locale = locale;

@@ -40,0 +44,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc