Socket
Socket
Sign inDemoInstall

cachedir

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cachedir - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

5

index.js
var os = require('os')
var path = require('path')
var homedir = require('os-homedir')
function linux (id) {
return path.join(os.homedir(), '.cache', id)
return path.join(homedir(), '.cache', id)
}
function darwin (id) {
return path.join(os.homedir(), 'Library', 'Caches', id)
return path.join(homedir(), 'Library', 'Caches', id)
}

@@ -11,0 +12,0 @@

{
"name": "cachedir",
"version": "0.1.2",
"version": "0.1.3",
"license": "MIT",

@@ -15,3 +15,6 @@ "author": "Linus Unnebäck <linus@folkdatorn.se>",

"standard": "^6.0.8"
},
"dependencies": {
"os-homedir": "^1.0.1"
}
}

6

test.js
/* eslint-env mocha */
var assert = require('assert')
var homedir = require('os-homedir')
var proxyquire = require('proxyquire')
var platforms = [
['linux', '$HOME/.cache/linusu'],
['darwin', '$HOME/Library/Caches/linusu']
['linux', homedir() + '/.cache/linusu'],
['darwin', homedir() + '/Library/Caches/linusu']
]

@@ -17,3 +18,2 @@

var os = {
homedir: function () { return '$HOME' },
platform: function () { return platform[0] }

@@ -20,0 +20,0 @@ }

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