read-from-fs
    Preparing search index...

    read-from-fs

    read-from-fs

    Utilities to read files from the file system 🗃

    # npm
    npm install read-from-fs

    # yarn
    yarn add read-from-fs

    # pnpm
    pnpm add read-from-fs
    // schemas/index
    import { readFromSyncGenerator } from "read-from-fs";

    const readFromHere = readFromSyncGenerator(__dirname);

    export const myFirstSchema = readFromHere("schema.graphql");
    export const my2Schema = readFromHere("2.graphql");
    export const my3Schema = readFromHere("3.graphql");

    By default it read the file as utf-8 but you can change that by

    export const my3Schema = readFromHere("3.graphql", "ascii");
    

    Check the API on 👇

    https://read-from-fs.js.org

    Licensed under the MIT License.