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

meteor-bootstrap_key-value-tag-input

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meteor-bootstrap_key-value-tag-input - npm Package Compare versions

Comparing version 3.2.3 to 3.3.0

21

dist/main.js

@@ -316,2 +316,23 @@ 'use strict';

};
DateKeyValueType.mongoDateExpressionFor = function (value, field) {
var _a, _b, _c, _d;
switch (value.operator) {
case "<":
case ">=":
return _a = {}, _a[field] = (_b = {}, _b[compOpToSelector(value.operator)] = moment(value.date).startOf("day").toDate(), _b), _a;
case ">":
case "<=":
return _c = {}, _c[field] = (_d = {}, _d[compOpToSelector(value.operator)] = moment(value.date).endOf("day").toDate(), _d), _c;
case "=":
return { $and: [
this.mongoDateExpressionFor({ date: value.date, operator: "<=" }, field),
this.mongoDateExpressionFor({ date: value.date, operator: ">=" }, field),
] };
case "!=":
return { $or: [
this.mongoDateExpressionFor({ date: value.date, operator: "<" }, field),
this.mongoDateExpressionFor({ date: value.date, operator: ">" }, field),
] };
}
};
Object.defineProperty(DateKeyValueType.prototype, "dateFormat", {

@@ -318,0 +339,0 @@ set: function (dateFormat) {

2

package.json
{
"name": "meteor-bootstrap_key-value-tag-input",
"version": "3.2.3",
"version": "3.3.0",
"description": "A reactive input field for tags and key-value data, developed for meteor apps running bootstrap.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -15,2 +15,3 @@ import { CompOperator, CompOpSymbol } from "../helpers/operators";

};
static mongoDateExpressionFor(value: DateKeyValue, field: string): object;
private _dateFormat;

@@ -17,0 +18,0 @@ set dateFormat(dateFormat: string);

@@ -29,2 +29,23 @@ var __extends = (this && this.__extends) || (function () {

};
DateKeyValueType.mongoDateExpressionFor = function (value, field) {
var _a, _b, _c, _d;
switch (value.operator) {
case "<":
case ">=":
return _a = {}, _a[field] = (_b = {}, _b[compOpToSelector(value.operator)] = moment(value.date).startOf("day").toDate(), _b), _a;
case ">":
case "<=":
return _c = {}, _c[field] = (_d = {}, _d[compOpToSelector(value.operator)] = moment(value.date).endOf("day").toDate(), _d), _c;
case "=":
return { $and: [
this.mongoDateExpressionFor({ date: value.date, operator: "<=" }, field),
this.mongoDateExpressionFor({ date: value.date, operator: ">=" }, field),
] };
case "!=":
return { $or: [
this.mongoDateExpressionFor({ date: value.date, operator: "<" }, field),
this.mongoDateExpressionFor({ date: value.date, operator: ">" }, field),
] };
}
};
Object.defineProperty(DateKeyValueType.prototype, "dateFormat", {

@@ -31,0 +52,0 @@ set: function (dateFormat) {

@@ -26,2 +26,23 @@ import {

public static mongoDateExpressionFor(value: DateKeyValue, field: string): object {
switch (value.operator) {
case "<":
case ">=":
return { [field]: { [compOpToSelector(value.operator)]: moment(value.date).startOf("day").toDate() } };
case ">":
case "<=":
return { [field]: { [compOpToSelector(value.operator)]: moment(value.date).endOf("day").toDate() } };
case "=":
return { $and: [
this.mongoDateExpressionFor({ date: value.date, operator: "<=" }, field),
this.mongoDateExpressionFor({ date: value.date, operator: ">=" }, field),
]};
case "!=":
return { $or: [
this.mongoDateExpressionFor({ date: value.date, operator: "<" }, field),
this.mongoDateExpressionFor({ date: value.date, operator: ">" }, field),
]};
}
}
private _dateFormat: string = "YYYY-MM-DD";

@@ -28,0 +49,0 @@ set dateFormat(dateFormat: string) {

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