vamtiger-get-file-text

Get text data for a defined file path.

Usage no npm install needed!

<script type="module">
  import vamtigerGetFileText from 'https://cdn.skypack.dev/vamtiger-get-file-text';
</script>

README

VAMTIGER Get Path Data

VAMTIGER Get File Text returns text for a defined file path.

Installation

VAMTIGER Get File Text can be installed using npm or yarn:

npm i vamtiger-get-file-text 

or

yarn add vamtiger-get-file-text

Usage

Import or require a referece to VAMTIGER Get File Text:

import getFileText from 'vamtiger-get-file-text';

or

const getFileText = require('vamtiger-get-file-text').default;

VAMTIGER Get File Text will return text for defined file path.:

const fileText = getFileText('some/file/absolute/path')
    .then(handleResult)
    .catch(handleError);

Since VAMTIGER Get File Text returns a Promise, it can be more conveniently executed within an async function:

async someAsyncFunction function() {
    const fileText = await getFileText('some/file/absolute/path');
}