# vue-localstorageie11

> Vue.js localStorage plugin with types support and IE11 compatible

Latest version **0.6.6** (published 2018-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-localstorageie11
pnpm add vue-localstorageie11
yarn add vue-localstorageie11
bun add vue-localstorageie11
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.6 |
| Published | 2018-03-12 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexander Avakov |
| Maintainers | oxmfras |
| Keywords | vuejs, vuejs2, localstorage, vue |

## Links

- npm: https://www.npmjs.com/package/vue-localstorageie11
- Repository: https://github.com/frasiek/vue-local-storage
- Homepage: https://github.com/frasiek/vue-local-storage#readme
- Issues: https://github.com/frasiek/vue-local-storage/issues
- npm.io page: https://npm.io/package/vue-localstorageie11

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.6.6 (latest) — 2018-03-12
- 0.6.5 — 2018-03-06
- 0.6.4 — 2018-03-06
- 0.6.3 — 2018-03-06
- 0.6.2 — 2018-03-06
- 0.6.1 — 2018-03-06

## README

# VueLocalStorage
[![npm version](https://img.shields.io/npm/v/vue-localstorageie11.svg)](https://www.npmjs.com/package/vue-localstorageie11)
[![npm downloads](https://img.shields.io/npm/dt/vue-localstorageie11.svg)](https://www.npmjs.com/package/vue-localstorageie11)

LocalStorage plugin inspired by Vue typed props which take a care of typecasting for Vue.js 1 and 2 with SSR support.

Oryginal package https://www.npmjs.com/package/vue-localstorage with fixed IE11 missing [].includes() method
## Install

  ``` bash
  npm install vue-localstorageie11 --save
  ```
  or
  ``` bash
  bower install vue-localstorageie11
  ```

## Usage
  ``` js
  import VueLocalStorage from 'vue-localstorageie11'

  Vue.use(VueLocalStorage)
  // Or you can specify any other name and use it via this.$ls, this.$whatEverYouWant
  Vue.use(VueLocalStorage, {
    name: 'ls',
    bind: true //created computed members from your variable declarations
  })

  // Use localStorage from Vue object
  Vue.localStorage.set('someNumber', 123)
  Vue.localStorage.get('someNumber')

  // Fallback value if nothing found in localStorage
  Vue.localStorage.get('propertyThatNotExists', 'fallbackValue') // Will return 'fallbackValue' string
  
  // Default type if value isn't registered in localStorage section
  Vue.localStorage.get('property', null, Number)

  //register localStorage variables and adds computed variables to local components
  //to be used like regular computeds that are stored in the localstorage
  var vm = new Vue({
    localStorage: {
      someObject: {
        type: Object,
        default: {
          hello: 'world'
        }
      },
      someNumber: {
        type: Number,
      },
      someBoolean: {
        type: Boolean
      },
      stringOne: '',
      stringTwo: {
        type: String,
        default: 'helloworld!'
      },
      stringThree: {
        default: 'hello'
      }
    },
    methods: {
      someMethod () {
        let lsValue = this.$localStorage.get('someObject')
        this.$localStorage.set('someBoolean', true)
        this.$localStorage.remove('stringOne')
      }
    }
  })
  ```
## License
  [MIT]

---
_Source: https://npm.io/package/vue-localstorageie11 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
