Socket
Socket
Sign inDemoInstall

cachedir

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

7

index.js
const os = require('os')
const path = require('path')
const homedir = require('os-homedir')
function posix (id) {
const cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache')
const cacheHome = process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache')
return path.join(cacheHome, id)

@@ -11,7 +10,7 @@ }

function darwin (id) {
return path.join(homedir(), 'Library', 'Caches', id)
return path.join(os.homedir(), 'Library', 'Caches', id)
}
function win32 (id) {
const appData = process.env.LOCALAPPDATA || path.join(homedir(), 'AppData', 'Local')
const appData = process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local')
return path.join(appData, id, 'Cache')

@@ -18,0 +17,0 @@ }

{
"name": "cachedir",
"version": "2.0.0",
"version": "2.1.0",
"license": "MIT",

@@ -10,5 +10,3 @@ "repository": "LinusU/node-cachedir",

},
"dependencies": {
"os-homedir": "^1.0.1"
},
"dependencies": {},
"devDependencies": {

@@ -15,0 +13,0 @@ "mocha": "^5.2.0",

/* eslint-env mocha */
const assert = require('assert')
const homedir = require('os-homedir')
const os = require('os')
const proxyquire = require('proxyquire')
const platforms = [
['darwin', `${homedir()}/Library/Caches/linusu`],
['freebsd', `${homedir()}/.cache/linusu`],
['linux', `${homedir()}/.cache/linusu`],
['win32', `${homedir()}/AppData/Local/linusu/Cache`]
['darwin', `${os.homedir()}/Library/Caches/linusu`],
['freebsd', `${os.homedir()}/.cache/linusu`],
['linux', `${os.homedir()}/.cache/linusu`],
['win32', `${os.homedir()}/AppData/Local/linusu/Cache`]
]

@@ -13,0 +13,0 @@

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