Socket
Socket
Sign inDemoInstall

@platform/cache

Package Overview
Dependencies
6
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.27 to 0.3.30

lib/FileSystem/CachedFile.TEST.js

2

lib/FileSystem/CachedFile.js

@@ -9,3 +9,3 @@ "use strict";

var cache = args.cache;
var path = path_1.cleanPath(args.path);
var path = (0, path_1.cleanPath)(args.path);
var file = {

@@ -12,0 +12,0 @@ dir: cache.dir,

@@ -10,3 +10,3 @@ "use strict";

var fs = args.fs;
var dir = path_1.cleanDir(args.dir);
var dir = (0, path_1.cleanDir)(args.dir);
var cache = {

@@ -20,3 +20,3 @@ dir: dir,

return tslib_1.__generator(this, function (_a) {
path = path_1.toCachePath(dir, path);
path = (0, path_1.toCachePath)(dir, path);
return [2, fs.exists(path)];

@@ -32,3 +32,3 @@ });

case 0:
path = path_1.toCachePath(dir, path);
path = (0, path_1.toCachePath)(dir, path);
return [4, fs.exists(path)];

@@ -54,3 +54,3 @@ case 1:

case 0:
path = path_1.toCachePath(dir, path);
path = (0, path_1.toCachePath)(dir, path);
return [4, fs.ensureDir(fs.dirname(path))];

@@ -72,3 +72,3 @@ case 1:

case 0:
path = path_1.toCachePath(dir, path);
path = (0, path_1.toCachePath)(dir, path);
return [4, fs.exists(path)];

@@ -75,0 +75,0 @@ case 1:

@@ -6,7 +6,7 @@ "use strict";

exports.clean = clean;
var cleanPath = function (path) { return exports.clean(path).replace(/^\/*/, ''); };
var cleanPath = function (path) { return (0, exports.clean)(path).replace(/^\/*/, ''); };
exports.cleanPath = cleanPath;
var cleanDir = function (path) { return exports.clean(path).replace(/\/*$/, ''); };
var cleanDir = function (path) { return (0, exports.clean)(path).replace(/\/*$/, ''); };
exports.cleanDir = cleanDir;
var toCachePath = function (dir, path) { return exports.cleanDir(dir) + "/" + exports.cleanPath(path); };
var toCachePath = function (dir, path) { return "".concat((0, exports.cleanDir)(dir), "/").concat((0, exports.cleanPath)(path)); };
exports.toCachePath = toCachePath;

@@ -65,4 +65,4 @@ "use strict";

if (typeof this.ttl === 'number') {
rxjs_1.timer(this.ttl)
.pipe(operators_1.takeUntil(item.put$))
(0, rxjs_1.timer)(this.ttl)
.pipe((0, operators_1.takeUntil)(item.put$))
.subscribe(function (e) { return _this.delete(key); });

@@ -69,0 +69,0 @@ }

{
"name": "@platform/cache",
"version": "0.3.27",
"version": "0.3.30",
"description": "Caching tools.",

@@ -11,3 +11,2 @@ "main": "lib/index",

"test": "ts test",
"tdd": "ts test --watch",
"lint": "ts lint",

@@ -18,8 +17,8 @@ "build": "ts build --no-esm",

"dependencies": {
"@platform/fs.types": "0.1.12",
"@platform/libs": "0.2.14"
"@platform/fs.types": "0.1.15",
"@platform/libs": "0.3.2"
},
"devDependencies": {
"@platform/test": "0.2.10",
"@platform/ts": "4.1.23"
"@platform/test": "0.3.2",
"@platform/ts": "4.7.7"
},

@@ -26,0 +25,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc