Allow custom namespace for store

release
Anri Asaturov 2016-12-07 01:23:35 +02:00
parent 462ba0cd26
commit b3752574b2
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
const NAMESPACE = 'emoji-mart'
var NAMESPACE = 'emoji-mart'
var isLocalStorageSupported = typeof window !== 'undefined' &&
'localStorage' in window
@ -24,4 +24,8 @@ function get(key) {
}
}
export default { update, set, get }
function setNamespace(namespace){
NAMESPACE = namespace
}
export default { update, set, get, setNamespace }