Skip to content

Commit

Permalink
(refactor): rename localStorageAdaptor to asyncLocalStorage
Browse files Browse the repository at this point in the history
- because that makes a bit more sense / is more intuitive
  • Loading branch information
agilgur5 committed Jul 11, 2019
1 parent f48f3db commit 349420d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions persist.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { onSnapshot, applySnapshot } from 'mobx-state-tree'

import * as LocalStorage from './localStorageAdaptor.js'
import * as AsyncLocalStorage from './asyncLocalStorage.js'

export const persist = (name, store, options = {}) => {
let {storage, jsonify, whitelist, blacklist} = options

if (typeof window.localStorage !== 'undefined' && (!storage || storage === window.localStorage)) {
storage = LocalStorage
storage = AsyncLocalStorage
}
if (!jsonify) { jsonify = true } // default to true like mobx-persist
const whitelistDict = arrToDict(whitelist)
Expand Down

0 comments on commit 349420d

Please sign in to comment.