Socket
Socket
Sign inDemoInstall

q3-schema-utils

Package Overview
Dependencies
Maintainers
1
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q3-schema-utils - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

plugins/__tests__/common.int.test.js

0

CHANGELOG.md

@@ -0,0 +0,0 @@ # Change Log

17

index.js

@@ -17,3 +17,4 @@ /* eslint-disable no-param-reassign */

return (
!effectiveFrom || moment(effectiveFrom).isAfter(new Date())
!effectiveFrom ||
moment(effectiveFrom).isAfter(new Date())
);

@@ -24,3 +25,5 @@ };

const { expiresOn } = this;
return !expiresOn || moment(expiresOn).isBefore(new Date());
return (
!expiresOn || moment(expiresOn).isBefore(new Date())
);
};

@@ -71,4 +74,6 @@

if (!equals && inboundCurrency === 'USD') sum = num * rate;
if (!equals && inboundCurrency === 'CAD') sum = num / rate;
if (!equals && inboundCurrency === 'USD')
sum = num * rate;
if (!equals && inboundCurrency === 'CAD')
sum = num / rate;
return sum;

@@ -87,3 +92,5 @@ };

const compareObjectIds = (a, b) =>
typeof a === 'object' && 'equals' in a ? a.equals(b) : a === b;
typeof a === 'object' && 'equals' in a
? a.equals(b)
: a === b;

@@ -90,0 +97,0 @@ const isMatch = (name, pattern = '*') =>

@@ -61,3 +61,5 @@ const moment = require('moment');

expect(methods).toHaveProperty('convert');
expect(methods.convert(100, 'USD', 'CAD', 1.33)).toBe(133);
expect(methods.convert(100, 'USD', 'CAD', 1.33)).toBe(
133,
);
expect(

@@ -109,3 +111,6 @@ methods.convert(100, 'CAD', 'USD', 1.33),

const items = [{ _id: { equals } }, { _id: { equals } }];
const items = [
{ _id: { equals } },
{ _id: { equals } },
];
expect(items.filter(stub)).toHaveLength(1);

@@ -112,0 +117,0 @@ });

{
"name": "q3-schema-utils",
"version": "1.0.1",
"version": "1.0.2",
"main": "index.js",
"dependencies": {
"lodash": "^4.17.15",
"micromatch": "^4.0.2",
"moment": "^2.24.0"
"moment": "^2.24.0",
"mongoose": "^5.7.1",
"q3-core-responder": "^1.0.32"
},
"gitHead": "8e006e7f79e54675263512aa278f8c8cacce3bb0"
"devDependencies": {
"q3-test-utils": "^1.0.42"
},
"jest": {
"verbose": true,
"testEnvironment": "node",
"preset": "q3-test-utils",
"setupFilesAfterEnv": [
"q3-test-utils/jest-setup.js"
]
},
"gitHead": "8b8c854d5952cdc6a62ac30a0459808779838806"
}

@@ -0,0 +0,0 @@ <h1>Q3 Schema Utils</h1>

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