q3-schema-utils
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18279
8
578
5
1
2
+ Addedlodash@^4.17.15
+ Addedmongoose@^5.7.1
+ Addedq3-core-responder@^1.0.32
+ Added@types/bson@4.0.5(transitive)
+ Added@types/mongodb@3.6.20(transitive)
+ Added@types/node@22.7.4(transitive)
+ Addedaccepts@1.3.8(transitive)
+ Addedarray-flatten@1.1.1(transitive)
+ Addedbl@2.2.1(transitive)
+ Addedbluebird@3.5.1(transitive)
+ Addedbody-parser@1.20.3(transitive)
+ Addedbson@1.1.6(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcontent-disposition@0.5.4(transitive)
+ Addedcontent-type@1.0.5(transitive)
+ Addedcookie@0.6.0(transitive)
+ Addedcookie-signature@1.0.6(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddebug@2.6.93.1.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddenque@1.5.1(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.22.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedexpress@4.21.0(transitive)
+ Addedfinalhandler@1.3.1(transitive)
+ Addedforwarded@0.2.0(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedipaddr.js@1.9.1(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedkareem@2.3.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmedia-typer@0.3.0(transitive)
+ Addedmemory-pager@1.5.0(transitive)
+ Addedmerge-descriptors@1.0.3(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedmongodb@3.7.4(transitive)
+ Addedmongoose@5.13.22(transitive)
+ Addedmongoose-legacy-pluralize@1.0.2(transitive)
+ Addedmpath@0.8.4(transitive)
+ Addedmquery@3.2.5(transitive)
+ Addedms@2.0.02.1.22.1.3(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedoptional-require@1.0.31.1.8(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedpath-to-regexp@0.1.10(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedproxy-addr@2.0.7(transitive)
+ Addedq3-core-responder@1.25.1(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedraw-body@2.5.2(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedregexp-clone@1.0.0(transitive)
+ Addedrequire-at@1.0.6(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsaslprep@1.0.3(transitive)
+ Addedsend@0.19.0(transitive)
+ Addedserve-static@1.16.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsift@13.5.2(transitive)
+ Addedsliced@1.0.1(transitive)
+ Addedsparse-bitfield@3.0.3(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedtype-is@1.6.18(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedutils-merge@1.0.1(transitive)
+ Addedvary@1.1.2(transitive)