mscan

mscan is super light weight file scanner module for get specific file informations

Usage no npm install needed!

<script type="module">
  import mscan from 'https://cdn.skypack.dev/mscan';
</script>

README

mscan v1.0.0

Super light weight file scanner module for get specific file informations

Q. License?

A. Free to use. Thanks.

How to use?

  1. include module into your project
    const mscan = require('mscan');
    
  2. specify directory where you want to search.
    mscan.scan(PATH_FOR_SEARCH)
    .then((results) => {
        ...
    })
    .catch((err) => {
        ...
    })
    
  3. Returning value is Object that has key as file name and detail informations in property like this:
    {
        'exam.js': {
            stats: { ... },
            mime: 'application/javascript',
            isDirectory: false
        },
        'index.js': { ... },
        'node_modules': {
            stats: { ... },
            mime: 'application/octet-stream',
            isDirectory: true
        }
    }
    

Please don't hesitate to ask some issues on github issues page. Or you can send me a mail: rico345100@gmail.com