Socket
Book a DemoInstallSign in
Socket

@ccrpc/hash-manager

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ccrpc/hash-manager

Store application state in the URL hash

0.1.2
latest
npmnpm
Version published
Weekly downloads
1
-97.37%
Maintainers
2
Weekly downloads
 
Created
Source

Hash Manager

Store application state in the URL hash. Hash Manager is designed for use in Stencil components.

Usage

import { Component, Listen, Prop, Watch } from '@stencil/core';
import { hashManager } from '@ccrpc/hash-manager';

@Component({
  tag: 'person',
})
export class Person {
  @Prop() name: string = hashManager.init('name', 'Jane');

  @Listen('hashManagerChange', {target: 'window'})
  updateName(e: CustomEvent) {
    if (e.detail.old.name !== e.detail.new.name) this.name = e.detail.new.name;
  }
  
  @Watch('name')
  nameChanged() {
    hashManager.set('name', this.name);
  }
}

Credits

Hash Manager was developed by Matt Yoder for the Champaign County Regional Planning Commission.

License

Hash Manager is available under the terms of the BSD 3-clause license.

FAQs

Package last updated on 04 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.