create-new-express-app
Version:
A CLI tool to create a TypeScript Express application with best practices
15 lines (14 loc) • 409 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWriteable = isWriteable;
const node_constants_1 = require("node:constants");
const promises_1 = require("node:fs/promises");
async function isWriteable(directory) {
try {
await (0, promises_1.access)(directory, node_constants_1.W_OK);
return true;
}
catch (err) {
return false;
}
}