npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

subscribe-msg-svelte

v1.1.2

Published

International subscription message component, Supports HTML pages, including Vue, React, Angular, etc. # Install npm install subscribe-msg-svelte --save # Usage ## step 1: ``` import SubscribeMsg from "subscribe-msg-svelte";

Downloads

40

Readme

International subscription message component, Supports HTML pages, including Vue, React, Angular, etc.

Install

npm install subscribe-msg-svelte --save

Usage

step 1:

import SubscribeMsg from "subscribe-msg-svelte";

step 2:

const subscribeMsg = new SubscribeMsg({
    target: document.body,
    props: {
        appId: '${appId}',
        authCode: '${authCode}',
        templateIds: ${templateIds},
        callback: this.handleCallback,
    }
});

step 3:

subscribeMsg.requestSubscribeMessage();

Component API

| attribute name | default value | type | description | | --- | --- | --- | --- | | requestSubscribeMessage | | Function | request subscribe message. | | authCode | | String | auth token | | templateIds | | Array | templateIds | | animation | false | Boolean | Whether to enable animation effects. | | callback | null | Function | callback method will get the return result. |

Return value Description

success

  • indicates whether the subscription action is successful.
  • the user clicks Cancel to return false.(Click mask to cancel subscription process, and return errorCode)
  • The user clicks Reject to return true.(Click Reject actually performs the subscription process, but the submission type is unsubscribe, so it returns true).
  • Other exceptions also return false.

type

  • 'AGREE': Agree to subscribe.
  • 'REJECT': reject to subscribe.

errorCode

| Code | description | | --- | --- | | CANCELLED | User cancelled | | NETWORK | network error | | SYSTEM | system error | | INCONSISTENT_TEMPLATE_TYPE | Templates type must be same. | | INVALID_TEMPLATE_CODE | Invalid template code. | | EXCEEDING_SUBSCRIPTION_LIMIT | Templates count out of max bounds. | | INCOMING_EXCEEDED_THE_UPPER_LIMIT | The number of incoming templates exceeded the upper limit. |

Changelog

Detailed changes for each release are documented in the release notes.

v1.0.0

add subscribe message component.

v1.1.0

Dynamically acquire subscription channels.

v1.1.1

delete hylid-bridge for BurgerKing.

v1.1.2

revert hylid-bridge.