Natively Pronounced Mandarin

    @buxlabs/simpleload

    2.0.1 • Public • Published

    simpleload

    Build Status

    npm install @buxlabs/simpleload
    

    Load multiple files at once

    Usage

    • extension
    const simpleload = require('simpleload')
    const path = require('path')
    const source = path.join(__dirname, 'articles')
    const articles = simpleload(source, { extension: 'html' })
    contents.foo // 'bar'
    • exclude exclude given modules
    const simpleload = require('simpleload')
    const path = require('path')
    const source = path.join(__dirname, 'articles')
    const articles = simpleload(source, {
      extension: 'html',
      exclude: 'foo'
    });
    articles.foo // undefined
    • recursive find modules in subfolders
    const simpleload = require('simpleload')
    const path = require('path')
    const source = path.join(__dirname, 'articles')
    const articles = simpleload(source, {
      extension: 'html',
      recursive: true
    });
    articles.foo // 'bar'
    articles['bar/baz'] // 'foo'

    Install

    npm i @buxlabs/simpleload

    DownloadsWeekly Downloads

    11

    Version

    2.0.1

    License

    MIT

    Last publish

    Collaborators

    • buxlabs-dev
    • emilos