0.5.0 • Published 11 months ago

@hbauer/local-file v0.5.0

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

@hbauer/local-file

Install

$ yarn add @hbauer/local-file
$ npm install @hbauer/local-file

Usage

import { LocalFile } from '@hbauer/local-file'

const path = 'src/path/to/data'
const data = { foo: 'bar' }

const savedFile = await LocalFile.save(path, data)

assert(savedFile.data === data)
assert(typeof savedFile.createdAt.date === 'date')
assert(typeof savedFile.createdAt.milliseconds === 'number')

const file = await LocalFile.read(path, data) // throws error if the file doesn't exist

assert.deepEqual(savedFile.data, file.data)

// TODO: finish readme
0.5.0

11 months ago

0.4.12

12 months ago

0.4.11

12 months ago

0.4.10

12 months ago

0.4.9

12 months ago

0.4.8

12 months ago

0.4.7

12 months ago

0.4.6

12 months ago

0.4.5

12 months ago

0.4.4

12 months ago

0.4.3

12 months ago

0.4.2

12 months ago

0.4.1

12 months ago

0.4.0

12 months ago

0.3.2

12 months ago

0.3.1

12 months ago

0.3.0

12 months ago

0.2.1

12 months ago

0.2.0

12 months ago

0.1.13

12 months ago

0.1.12

12 months ago

0.1.11

12 months ago

0.1.10

12 months ago

0.1.9

12 months ago

0.1.8

12 months ago

0.1.7

12 months ago

0.1.6

12 months ago

0.1.5

12 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago