cache-point
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -28,8 +28,10 @@ 'use strict' | ||
} | ||
/** | ||
* Cache directory | ||
* @type {string} | ||
*/ | ||
this.cacheDir = options.cacheDir | ||
try { | ||
fs.mkdirSync(this.cacheDir) | ||
} catch (err) { | ||
// exists | ||
} | ||
const mkdirp = require('mkdirp') | ||
mkdirp.sync(this.cacheDir) | ||
} | ||
@@ -36,0 +38,0 @@ |
{ | ||
"name": "cache-point", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "cache-point", | ||
@@ -25,4 +25,5 @@ "repository": "https://github.com/75lb/cache-point.git", | ||
"core-js": "^2.4.1", | ||
"feature-detect-es6": "^1.3.1" | ||
"feature-detect-es6": "^1.3.1", | ||
"mkdirp": "~0.5.1" | ||
} | ||
} |
@@ -19,2 +19,3 @@ [![view on npm](http://img.shields.io/npm/v/cache-point.svg)](https://www.npmjs.org/package/cache-point) | ||
* [new Cache([options])](#new_module_cache-point--Cache_new) | ||
* [.cacheDir](#module_cache-point--Cache.Cache+cacheDir) : <code>string</code> | ||
* [.read(keys)](#module_cache-point--Cache+read) ⇒ <code>Promise</code> | ||
@@ -39,2 +40,8 @@ * [.write(keys, content)](#module_cache-point--Cache+write) ⇒ <code>Promise</code> | ||
<a name="module_cache-point--Cache.Cache+cacheDir"></a> | ||
#### cache.cacheDir : <code>string</code> | ||
Cache directory | ||
**Kind**: instance property of <code>[Cache](#exp_module_cache-point--Cache)</code> | ||
<a name="module_cache-point--Cache+read"></a> | ||
@@ -41,0 +48,0 @@ |
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
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
14178
275
95
5
+ Addedmkdirp@~0.5.1
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)