new LocalStorageAdapter(opts)
LocalStorageAdapter class.
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object |
<optional> |
Configuration opts. Properties
|
- Source:
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
- Source:
-
debug :boolean
-
TODO
Type:
- boolean
- Default Value:
-
- false
- Source:
-
storage :Object
-
TODO
Type:
- Object
- Default Value:
-
- localStorage
- Source:
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.
- Source:
Returns:
Subclass of
LocalStorageAdapter
.- Type
- Object
-
ensureId()
-
TODO
- Source:
-
getIdPath()
-
TODO
- Source:
-
getIds()
-
TODO
- Source:
-
getPath()
-
TODO
- Source:
-
removeId()
-
TODO
- Source:
-
saveKeys()
-
TODO
- Source: