lockr
lockr copied to clipboard
es6 import modules support
Recently switching my projects to es6 with babel, I'd like to do something like this with lockr:
import {
get,
set,
} from 'lockr'
but when I call get
this error throws:
TypeError: Cannot read property '_getPrefixedKey' of undefined
var query_key = this._getPrefixedKey(key, options)
Not a big deal; importing the entire library is not a problem because it's small and minimal.
Thank you =]
@roblav96 good catch. I've never used Lockr in ES6 env, but I know why it doesn't work. It will require a major refactor on how the lib works under the hood.
No worries at all man! Still loving lockr to death haha
I would appreciate a pull request, if you want to give it a try!