@leofcoin/storage

npm i --save @leofcoin/storage

Usage no npm install needed!

<script type="module">
  import leofcoinStorage from 'https://cdn.skypack.dev/@leofcoin/storage';
</script>

README

LeofcoinStorage

install

npm i --save @leofcoin/storage

Usage

import LeofcoinStorage from '@leofcoin/storage'

const storage = new LeofcoinStorage(name, root, home)

storage.put('hello', 'world') // hello world
storage.get('hello') // world
storage.has('hello') // true
storage.size('hello') // 4
storage.delete('hello') // bye world

API

options

name: store name
root: root directory
home: wether or not to use homedir (defaults to true)

new LeofcoinStorage(name, root, home)