]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-cache-filename/README.md
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / npm-cache-filename / README.md
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-cache-filename/README.md b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-cache-filename/README.md
new file mode 100644 (file)
index 0000000..47bd08a
--- /dev/null
@@ -0,0 +1,21 @@
+# npm-cache-filename
+
+Given a cache folder and url, return the appropriate cache folder.
+
+## USAGE
+
+```javascript
+var cf = require('npm-cache-filename');
+console.log(cf('/tmp/cache', 'https://registry.npmjs.org:1234/foo/bar'));
+// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar
+```
+
+As a bonus, you can also bind it to a specific root path:
+
+```javascript
+var cf = require('npm-cache-filename');
+var getFile = cf('/tmp/cache');
+
+console.log(getFile('https://registry.npmjs.org:1234/foo/bar'));
+// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar
+```