Add fetch* utils
This commit is contained in:
9
server/utils/createTempPath.js
Normal file
9
server/utils/createTempPath.js
Normal file
@ -0,0 +1,9 @@
|
||||
const path = require("path");
|
||||
const tmpdir = require("os-tmpdir");
|
||||
|
||||
function createTempPath(name, version) {
|
||||
const hyphenName = name.replace(/\//g, "-");
|
||||
return path.join(tmpdir(), `unpkg-${hyphenName}-${version}`);
|
||||
}
|
||||
|
||||
module.exports = createTempPath;
|
||||
Reference in New Issue
Block a user