new LocalStorageAdapter(opts)
LocalStorageAdapter class.
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object |
<optional> |
Configuration opts. Properties
|
Example
import {DataStore} from 'js-data' import LocalStorageAdapter from 'js-data-localstorage' const store = new DataStore() const adapter = new LocalStorageAdapter() store.registerAdapter('ls', adapter, { 'default': true })
Members
-
<static> version :Object
-
Details of the current version of the
js-data-localstorage
module.Type:
- Object
- Source:
Properties:
Name Type Description version.full
string The full semver value.
version.major
number The major version number.
version.minor
number The minor version number.
version.patch
number The patch version number.
version.alpha
string | boolean The alpha version value, otherwise
false
if the current version is not alpha.version.beta
string | boolean The beta version value, otherwise
false
if the current version is not beta. -
basePath :string
-
TODO
Type:
- string
-
debug :boolean
-
TODO
Type:
- boolean
-
storage :Object
-
TODO
Type:
- Object
Methods
-
<static> extend(instanceProps, classProps)
-
Alternative to ES6 class syntax for extending
LocalStorageAdapter
.Parameters:
Name Type Argument Description instanceProps
Object <optional>
Properties that will be added to the prototype of the subclass.
classProps
Object <optional>
Properties that will be added as static properties to the subclass itself.
Returns:
Subclass of
LocalStorageAdapter
.- Type
- Object
-
ensureId()
-
TODO
-
getIdPath()
-
TODO
-
getIds()
-
TODO
-
getPath()
-
TODO
-
removeId()
-
TODO
-
saveKeys()
-
TODO