@visulima/fs
Version:
Human friendly file system utilities for Node.js
12 lines (9 loc) • 496 B
JavaScript
;
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const assertValidFileContents = /* @__PURE__ */ __name((contents) => {
if (typeof contents !== "string" && !(contents instanceof ArrayBuffer) && !ArrayBuffer.isView(contents)) {
throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.");
}
}, "assertValidFileContents");
module.exports = assertValidFileContents;