New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fenextjs-date

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fenextjs-date - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

16

cjs/index.d.ts

@@ -14,2 +14,6 @@ export interface FenextjsDateFormatOptions extends Intl.DateTimeFormatOptions {

export type FenextjsDateConstructor = FenextjsDateValue | FenextjsDateProps;
export declare const FenextjsDateCompare: readonly ["Date", "FullYear", "Hours", "Milliseconds", "Minutes", "Month", "Seconds"];
export type FenextjsDateCompareType = (typeof FenextjsDateCompare)[number];
export declare const FenextjsDateCompareSymbol: string[];
export type FenextjsDateCompareSymbolType = (typeof FenextjsDateCompareSymbol)[number];
export declare class FenextjsDate {

@@ -44,2 +48,14 @@ date: Date;

}): boolean;
onCompareDate({ date, dateCompare, compare, compareSymbol, }: {
date?: Date;
dateCompare: Date;
compare: {
[id in FenextjsDateCompareType]?: boolean;
};
compareSymbol: {
[id in FenextjsDateCompareSymbolType]?: boolean;
};
}): {
[x: string]: boolean | undefined;
};
}

31

cjs/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FenextjsDate = void 0;
exports.FenextjsDate = exports.FenextjsDateCompareSymbol = exports.FenextjsDateCompare = void 0;
exports.FenextjsDateCompare = [
"Date",
"FullYear",
"Hours",
"Milliseconds",
"Minutes",
"Month",
"Seconds",
];
exports.FenextjsDateCompareSymbol = ["==", "!=", ">", ">=", "<", "<="];
class FenextjsDate {

@@ -130,4 +140,23 @@ date;

}
onCompareDate({ date, dateCompare, compare, compareSymbol, }) {
const d = new Date(date ?? this.date);
const compareValue = {};
exports.FenextjsDateCompare.forEach((e) => {
const compareKey = e;
if (compare[compareKey] !== true) {
const f = `set${compareKey}`;
d[f](0);
dateCompare[f](0);
}
});
exports.FenextjsDateCompareSymbol.forEach((b) => {
const compareKeySymbol = b;
if (compareSymbol[compareKeySymbol] === true) {
compareValue[compareKeySymbol] = eval(`${d.getTime()} ${compareKeySymbol} ${dateCompare.getTime()}`);
}
});
return compareValue;
}
}
exports.FenextjsDate = FenextjsDate;
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "fenextjs-date",
"version": "3.1.0",
"version": "3.2.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "./cjs/index.js",

Sorry, the diff of this file is not supported yet

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