npm package: @sofiakb/local-storage
Description: Package description.
Author: Sofiakb
Latest version: 1.0.0-alpha.3

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]

[comment]: <> ([![LinkedIn][linkedin-shield]][linkedin-url])



<!-- PROJECT LOGO -->
<br />
<p align="center">

  <h1 align="center">local-storage</h1>

  <p align="center">
      <!--A PHP Library for detect OS System !-->
      <br />
      <!--<a href="https://github.com/sofiakb/local-storage"><strong>Explore the docs »</strong></a>-->
      <br />
      <br />
      <a href="https://github.com/sofiakb/local-storage/issues">Report Bug</a>
      ·
      <a href="https://github.com/sofiakb/local-storage/issues">Request Feature</a>
  </p>

</p>



<!-- TABLE OF CONTENTS -->
<details open="open">
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About the library</a>
      <ul>
        <li><a href="#built-with">Built With</a></li>
      </ul>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#prerequisites">Prerequisites</a></li>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#usage">Usage</a></li>
    <li><a href="#roadmap">Roadmap</a></li>
    <li><a href="#contributing">Contributing</a></li>
    <li><a href="#license">License</a></li>
    <li><a href="#contact">Contact</a></li>
    <li><a href="#acknowledgements">Acknowledgements</a></li>
  </ol>
</details>



<!-- ABOUT THE PROJECT -->

## About The Library

[comment]: <> (The library allows to detect os system in PHP project.)

### Built With

This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the
acknowledgements section. Here are a few examples.

* [Javascript](https://developer.mozilla.org/fr/docs/Web/JavaScript)
* [Adonis.js](https://adonisjs.com/)
* [Node.js](https://nodejs.org/en/)

<!-- GETTING STARTED -->

### Prerequisites

### Installation

```shell
npm install --save @sofiakb/local-storage
```

<!-- USAGE EXAMPLES -->

## Usage

### local-storage.set(string key, var value[, object options])
Set local-storage with specified key and value with options. value can be a object.
Available options are:
- expires: Days of expiration.
- days: Alias of expires.
- path: Path of local-storage.
- domain: Domain of local-storage.
- secure: HTTPS only.

```javascript
import local-storage from 'json-local-storage';

local-storage.set('test', 'test');		// test=test
local-storage.set('json-test', { name: '.modernator' });    // json-test={"name":".modernator"}

local-storage.set('ex-test', 'test', {
	expires: 1
});		// ex-test=test; expires= ...
```


### local-storage.get(string key)
Get local-storage with key. If local-storage isn't exist, it returns undefined.

```javascript
import local-storage from 'json-local-storage';

local-storage.get('test');		// test
local-storage.get('json-test');	// Object { name: '.modernator' }

```


### local-storage.delete(string key)
Delete local-storage with key.

```javascript
import local-storage from 'json-local-storage';

local-storage.delete('test');
local-storage.get('test');		//
```

<!-- ROADMAP -->

## Roadmap

See the [open issues](https://github.com/sofiakb/local-storage/issues) for a list of proposed features (and known issues).


<!-- LICENSE -->

## License

Distributed under the MIT License. See `LICENSE` for more information.




<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

[contributors-shield]: https://img.shields.io/github/contributors/sofiakb/local-storage.svg?style=for-the-badge

[contributors-url]: https://github.com/sofiakb/local-storage/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/sofiakb/local-storage.svg?style=for-the-badge

[forks-url]: https://github.com/sofiakb/local-storage/network/members

[stars-shield]: https://img.shields.io/github/stars/sofiakb/local-storage.svg?style=for-the-badge

[stars-url]: https://github.com/sofiakb/local-storage/stargazers

[issues-shield]: https://img.shields.io/github/issues/sofiakb/local-storage.svg?style=for-the-badge

[issues-url]: https://github.com/sofiakb/local-storage/issues

[license-shield]: https://img.shields.io/github/license/sofiakb/local-storage.svg?style=for-the-badge

[license-url]: https://github.com/sofiakb/local-storage/blob/main/LICENSE

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555

[linkedin-url]: https://www.linkedin.com/in/sofiane-akbly/