npm

@pandino/persistence-manager-localstorage
TypeScript icon, indicating that this package has built-in type declarations

0.8.31 • Public • Published

persistence-manager-localstorage

build-test license TypeScript

Localstorage implementation of the Persistence Manager API.

Context

This package is part of the pandino-root monorepo. For detailed information about what is Pandino / how this package fits into the ecosystem, please consult with the related documentation(s).

Installation

Install via adding it to pandino-manifests

Only works, if @pandino/bundle-installer-dom is installed!

<script type="pandino-manifests">
  [
    ...,
    "https://unpkg.com/@pandino/persistence-manager-localstorage/dist/esm/persistence-manager-localstorage-manifest.json"
  ]
</script>

Install via BundleContext API

E.g.: directly via the Pandino instance.

const pandino: Bundle;

// ...

pandino.getBundleContext().installBundle('https://unpkg.com/@pandino/persistence-manager-localstorage/dist/esm/persistence-manager-localstorage-manifest.json');

Usage

export default class Activator {
  async start(context) {
    this.persistenceManagerReference = context.getServiceReference('@pandino/persistence-manager/PersistenceManager');
    this.persistenceManager = context.getService(this.persistenceManagerReference);

    console.log(this.persistenceManager.exists('test.pid'));
  }

  async stop(context) {
    context.ungetService(this.persistenceManagerReference);
  }
}

License

Eclipse Public License - v 2.0

Package Sidebar

Install

npm i @pandino/persistence-manager-localstorage

Weekly Downloads

3

Version

0.8.31

License

EPL-2.0

Unpacked Size

114 kB

Total Files

9

Last publish

Collaborators

  • robertcsakany
  • oss-blackbelt
  • norbert.herczeg