-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.js
More file actions
27 lines (24 loc) · 782 Bytes
/
utils.js
File metadata and controls
27 lines (24 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const fs = require("fs");
const { parsePdf } = require("./utils/pdf");
const { writeFile, writeJson, ensureDir } = require('./utils/fs');
const {
getWeekString,
parseDate,
formatDate,
} = require('./utils/date');
/**
* Writes the provided data to a file at the provided file path, and logs a
* confirmation message to the console.
*
* @param {string} filePath - The path to the output file.
* @param {string} data - The data to write to the file.
*/
// writeFile moved to utils/fs; re-exported below
// parsePdf moved to `utils/pdf.js`
exports.getWeekString = getWeekString;
exports.parsePdf = parsePdf;
exports.parseDate = parseDate;
exports.formatDate = formatDate;
exports.writeFile = writeFile;
exports.writeJson = writeJson;
exports.ensureDir = ensureDir;