mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
22 lines
529 B
JavaScript
22 lines
529 B
JavaScript
// @ts-check
|
|
|
|
const getError = () => new Error("Node APIs are not available in browser context.");
|
|
const throwForSync = () => {
|
|
throw getError();
|
|
};
|
|
|
|
export const fs = {
|
|
"access": (path, callback) => callback(getError()),
|
|
"accessSync": throwForSync,
|
|
"readFile": (path, options, callback) => callback(getError()),
|
|
"readFileSync": throwForSync
|
|
};
|
|
|
|
export { default as module } from "./node-imports-browser-module.cjs";
|
|
|
|
export const os = {};
|
|
|
|
export const path = {
|
|
"dirname": throwForSync,
|
|
"resolve": throwForSync
|
|
};
|