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

central-storage

v0.0.3

Published

centralStorage is a Javascript library with the same API as localStorage that allows you to store state in a centralized location.

Downloads

3

Readme

npm version npm version typescript code style: prettier

Frigade iamge

Install

Install the package from your command line.

With yarn

yarn add @frigade/js

With npm

npm install @frigade/js

Usage

Simply import { Frigade } from '@frigade/js' and use it. Example:

import {Frigade} from 'packages/js-client'

const frigade = new Frigade('FRIGADE_API_KEY')

await frigade.identify('USER_ID', {
  name: 'USER_NAME',
  email: 'USER_EMAIL',
  signed_up_at: 'USER_SIGNED_UP_AT' // ISO 8601 format
})

// Optional: send organization/group id
await frigade.group('ORGANIZATION_ID', {
  name: 'COMPANY_NAME',
})

API Reference

Get a flow:

const flow = await frigade.getFlow('FLOW_ID')
// Flow data defined in config.yml in the Frigade dashboard
console.log('Flow status:', flow.isCompleted)
console.log('Flow data:', flow.rawData)

Marking a flow as completed:

const flow = await frigade.getFlow('FLOW_ID')
await flow.complete()

Marking a step in a flow as completed:

const flow = await frigade.getFlow('FLOW_ID')
const step = flow.steps.get('STEP_ID')
await step.start()
await step.complete()

Sending tracking events:

await frigade.track('EVENT_NAME', {
  property1: 'value1',
  property2: 'value2',
})

Event handlers

Global event handlers can be registered to be notified when any state change occurs in any flow. For example, to be notified when a flow is completed:

// This callback will be called when a the current user/group changes state in any flow
const callback = (updatedFlow, previousFlow) => {
  console.log('Flow state changed:', flow.isCompleted)
  console.log('Step state changed:', flow.steps.get('STEP_ID').isCompleted)
};

frigade.onStateChange(callback);
// To remove the callback use:
frigade.removeOnFlowStateChangeHandler(callback);

Flow specific event handlers can be registered to be notified when a specific flow changes state. For example, to be notified when a flow is completed:

// This callback will be called when a the current user/group changes state in the flow with id FLOW_ID
const flow = await frigade.getFlow('FLOW_ID')
const callback = (updatedFlow, previousFlow) => {
  console.log('Flow state changed:', flow.isCompleted)
  console.log('Step state changed:', flow.steps.get('STEP_ID').isCompleted)
};
flow.onStateChange(callback);

To only target a specific step in a flow, use:

// This callback will be called when a the current user/group changes state in the flow with id FLOW_ID and step with id STEP_ID
const flow = await frigade.getFlow('FLOW_ID')
const step = flow.steps.get('STEP_ID')
const callback = (updatedStep, previousStep) => {
  console.log('Step state changed:', step.isCompleted)
};
step.onStateChange(callback);

Cross-platform support

All non-UI related functionality of the SDK works in all JavaScript environments (Node.js, browser, React Native, etc.).

TypeScript support

This package contains TypeScript definitions of the frigade object.

About Frigade

Frigade is a developer-first platform for building quality product onboarding. A powerful, flexible API and native SDKs allow you to build onboarding 10x faster, experiment more easily, and drive customer success.

Frigade supports a series of use cases such as:

  • Registration: Maximize the number of users getting through your sign up flows with beautiful explainers, progress bars, and forms.
  • Activation: Convert more customers by taking them through a series of key onboarding items specific to their role, permissions, or goals.
  • Adoption: Introduce audiences to specific features that deliver value with native hotspots, tooltips, tours, and interactive product guides.
  • Engagement: Keep active customers engaged, announce new product features, and create lifecycle specific re-onboarding flows for dormant or churned customers.
  • Retention: Increase retention by delivering the right content at the right time, and by asking your users for feedback on the product.

Features

Component Library

Unstyled, ready-made components for building high‑quality user onboarding, faster. Onboarding checklists, tooltips, product walkthroughs, and much more. See components

Integrations

Integrations with Segment, Mixpanel, Posthog, and more to power targeting, analytics, and communications.

Content Management

Lightweight CMS built-in to update and test onboarding copy and content.

Versioning

Frigade makes it easy to manage multiple versions of onboarding across staging and production. Revisit previous versions of onboarding to see how they performed and make improvements.

Customer Journeys

Frigade automatically tracks state management and onboarding progress. Give your team full observability into the customer journey, and use Frigade to kick off automated workflows.

To learn more, visit frigade.com