verifiable-file-read-all-cache
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

verifiable-file-read-all-cache

CircleCI Greenkeeper badge

Read file all and cache it. Also, you can verify sha-256 hash.

import test from 'ava';
const TextCache = require('verifiable-file-read-all-cache');
const text = new TextCache(
  './path/to/file',
  //sha-256 hash
  'd270ba28b95e9f256ca2eb993fc0692b9d755c4b397f75ea2d5deb5cf39c49f1'
);
test('hoge', async t => {
    await text.verify((actual, expected) => t.true(actual === expected));
    foo(text.get());
})

Readme

Keywords

Package Sidebar

Install

npm i verifiable-file-read-all-cache

Weekly Downloads

2

Version

1.1.2

License

BSL-1.0

Unpacked Size

6.22 kB

Total Files

7

Last publish

Collaborators

  • yumetodo