frncsdrk / renaissance-local-storage

local storage adapter for renaissance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

renaissance-local-storage

Test Status

local storage adapter for renaissance

Usage

const { r } = require('renaissance')
const LocalStorageAdapter = require('renaissance-local-storage')
const adapter = r.registerAdapter('localStorage', LocalStorageAdapter)

adapter.save('foo', 'bar');
console.log(adapter.get('foo'));

API

adapter.save({string} key, {string} value)

returns {bool}

Save value as key in local storage

adapter.update({string} key, {string} value)

returns {bool}

Update key in local storage with value

adapter.get({string} key)

returns {string}

Get value from key in local storage

adapter.remove({string} key)

returns {bool}

Remove key and corresponding value from local storage

adapter.clear()

returns {bool}

Clear local storage

Contributing

See CONTRIBUTING

Credits

See CREDITS

License

MIT (c) 2017 - 2023 frncsdrk and contributors

About

local storage adapter for renaissance

License:MIT License


Languages

Language:CoffeeScript 100.0%