honkit
Version:
HonKit is building beautiful books using Markdown.
21 lines (19 loc) • 431 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
Return a JSON representation of a file
@param {File} file
@return {Object}
*/
function encodeFileToJson(file) {
const filePath = file.getPath();
if (!filePath) {
return undefined;
}
return {
path: filePath,
mtime: file.getMTime(),
type: file.getType()
};
}
exports.default = encodeFileToJson;