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

@foxify/odin

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foxify/odin - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

2

dist/types/Date.d.ts

@@ -28,3 +28,3 @@ /*

protected _type: string;
protected _base(v: any): "Must be a date" | null;
protected _base(v: any): "Must be a valid date" | null;
min(date: Date | (() => Date)): this;

@@ -31,0 +31,0 @@ max(date: Date | (() => Date)): this;

@@ -31,17 +31,17 @@ /*

const e = require("../utils"), t = require("./Any");
const t = require("../utils"), e = require("./Any");
exports.default = class TypeDate extends t.default {
exports.default = class TypeDate extends e.default {
constructor() {
super(...arguments), this._type = "Date";
}
_base(t) {
return e.date.isDate(t) ? null : "Must be a date";
_base(e) {
return (t.string.isString(e) || t.number.isNumber(e)) && (e = new Date(e)), t.date.isDate(e) && "Invalid Date" !== e.toString() ? null : "Must be a valid date";
}
min(t) {
return e.date.isDate(t) && (t = (() => t)), this._test(e => e < t() ? `Must be at least ${t}` : null);
min(e) {
return t.date.isDate(e) && (e = (() => e)), this._test(t => t < e() ? `Must be at least ${e}` : null);
}
max(t) {
return e.date.isDate(t) && (t = (() => t)), this._test(e => e > t() ? `Must be at most ${t}` : null);
max(e) {
return t.date.isDate(e) && (e = (() => e)), this._test(t => t > e() ? `Must be at most ${e}` : null);
}
};
{
"name": "@foxify/odin",
"version": "0.5.1",
"version": "0.5.2",
"description": "Active Record Model",

@@ -5,0 +5,0 @@ "author": "Ardalan Amini <ardalanamini22@gmail.com> [https://github.com/ardalanamini]",

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