Skip to content

Commit

Permalink
Release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Akurganow committed Dec 18, 2020
1 parent 6fc6549 commit d9605a4
Show file tree
Hide file tree
Showing 9 changed files with 1,933 additions and 5,178 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const path = require('path')

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
### [1.1.1](https://github.com/Akurganow/use-persisted-state/compare/v1.1.0...v1.1.1) (2020-12-18)

## [1.1.0](https://github.com/Akurganow/use-persisted-state/compare/v1.0.2...v1.1.0) (2020-10-04)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const [usePersistedState, clear] = createPersistedState('example', myStorage)
- Useful for average web application
### [browser.storage](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/storage) `@plq/use-persisted-state/lib/storages/browser-storage`
- Only for web extensions.
- Don't forget to setup [polyfill](https://github.com/mozilla/webextension-polyfill) if you want to run extension in Chrome browser.
- Don't forget to set up [polyfill](https://github.com/mozilla/webextension-polyfill) if you want to run extension in Chrome browser.
- To use this storage you need to include the "storage" [permission](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions) in your `manifest.json` file
### [chrome.storage](https://developer.chrome.com/apps/storage) `@plq/use-persisted-state/lib/storages/chrome-storage`
- Only for Chrome-based web extensions.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/is-promise.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import isPromise from '../src/utils/is-promise'

describe('is-promise', () => {
it('should return true if promise', function () {
const fn1 = new Promise(resolve => { resolve() })
const fn1 = new Promise<void>(resolve => { resolve() })
const fn2 = async function () { return undefined }

expect(isPromise(fn1)).toBe(true)
Expand Down
2 changes: 1 addition & 1 deletion examples/async-storage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const storage = {
},
}

const [usePersistedState, clear] = createPersistedState('simple_example', storage)
const [usePersistedState, clear] = createPersistedState('async_example', storage)
const initialValue = 0

function Actions() {
Expand Down
2 changes: 1 addition & 1 deletion examples/local-storage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { render } from 'react-dom'
import createPersistedState from '../../lib'
import storage from '../../lib/storages/local-storage'

const [usePersistedState, clear] = createPersistedState('simple_example', storage)
const [usePersistedState, clear] = createPersistedState('local_example', storage)
const initialValue = 0

function Actions() {
Expand Down
2 changes: 1 addition & 1 deletion examples/session-storage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { render } from 'react-dom'
import createPersistedState from '../../lib'
import storage from '../../lib/storages/session-storage'

const [usePersistedState, clear] = createPersistedState('simple_example', storage)
const [usePersistedState, clear] = createPersistedState('session_example', storage)
const initialValue = 0

function Actions() {
Expand Down
Loading

0 comments on commit d9605a4

Please sign in to comment.