@trunkrs/common 1.4.26 → 1.4.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trunkrs/common",
3
- "version": "1.4.26",
3
+ "version": "1.4.27",
4
4
  "description": "Common standards library for development in Trunkrs",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/Trunkrs/common.git",
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const isAfter_1 = __importDefault(require("date-fns/isAfter"));
6
+ const isBefore_1 = __importDefault(require("date-fns/isBefore"));
7
7
  const addMilliseconds_1 = __importDefault(require("date-fns/addMilliseconds"));
8
8
  class Cache {
9
9
  constructor(stalenessTimeout) {
@@ -16,7 +16,7 @@ class Cache {
16
16
  };
17
17
  }
18
18
  isValidItem(item) {
19
- return (0, isAfter_1.default)(new Date(), item.expiration);
19
+ return (0, isBefore_1.default)(new Date(), item.expiration);
20
20
  }
21
21
  }
22
22
  exports.default = Cache;
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../utils/caching/Cache.ts"],"names":[],"mappings":";;;;;AAAA,+DAAsC;AACtC,+EAAsD;AAOtD,MAAe,KAAK;IAClB,YAAyC,gBAAwB;QAAxB,qBAAgB,GAAhB,gBAAgB,CAAQ;IAAG,CAAC;IA8C3D,UAAU,CAAS,QAAgB;QAC3C,OAAO;YACL,UAAU,EAAE,IAAA,yBAAe,EAAC,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,gBAAgB,CAAC;YAC9D,KAAK,EAAE,QAAQ;SAChB,CAAA;IACH,CAAC;IAES,WAAW,CAAC,IAAe;QACnC,OAAO,IAAA,iBAAO,EAAC,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;IAC7C,CAAC;CACF;AAED,kBAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../utils/caching/Cache.ts"],"names":[],"mappings":";;;;;AAAA,iEAAwC;AACxC,+EAAsD;AAOtD,MAAe,KAAK;IAClB,YAAyC,gBAAwB;QAAxB,qBAAgB,GAAhB,gBAAgB,CAAQ;IAAG,CAAC;IA8C3D,UAAU,CAAS,QAAgB;QAC3C,OAAO;YACL,UAAU,EAAE,IAAA,yBAAe,EAAC,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,gBAAgB,CAAC;YAC9D,KAAK,EAAE,QAAQ;SAChB,CAAA;IACH,CAAC;IAES,WAAW,CAAC,IAAe;QACnC,OAAO,IAAA,kBAAQ,EAAC,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;IAC9C,CAAC;CACF;AAED,kBAAe,KAAK,CAAA"}