Skip to content

paanSinghCoder/async-localstorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Badges GitHub license PRs Welcome made-with-typescript Maintenance TypeScript Open Source? Yes!


🚀

Async-localstorage

Asynchronous local storage

Report Bug · Request Feature · See on NPM

About The Project

Asynchronous local storage operation. 🔥

Provides setItem and getItem promises.

Built With

Async-localstorage is extremely light weight and built with:

  • Typescript

Getting Started

Async-localstorage can be used with any web based projects and frameworks such as React, Angular etc.

Installation

Async-localstorage requires Node to be installed in order to use yarn/npm.

  • npm

    npm i @paanSinghCoder/async-localstorage
  • yarn

    yarn add @paanSinghCoder/async-localstorage
  • pnpm

    pnpm i @paanSinghCoder/async-localstorage

Usage

After installation import Async-localstorage to your project :

// Import this as
import { asyncLocalStorage } from '@paanSinghCoder/async-localstorage'
...

const getName = async () => {
    try {
        const someName = await asyncLocalStorage.getItem('name')
    } catch (err) {
        ...
    }
}

const setName = async (newName) => {
    try {
        await asyncLocalStorage.setItem('name', newName)
    } catch (err) {
        ...
    }
}

Roadmap

See the open issues for the list of known issues.

See the Product board for the list of proposed features

Contributing

Consider starring this project on Github.

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

About

Promise based localstorage for the web

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published