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 🙏

© 2025 – Pkg Stats / Ryan Hefner

quitx-activities

v2.1.2

Published

QuitX program activities & their definitions. This SDK suggests program activities by evaluating past history & profile of the smoker.

Downloads

8

Readme

QuitX-Activities

QuitX program activities & their definitions. This SDK suggests program activities by evaluating past history & profile of the smoker.

Build Status

Features:

  • Simple APIs
  • Get program definitions
  • Get program activities

Installation

QuitX-Activities requires Node.js v6+ to run. NPM

$ npm install quitx-activities --save

How to use

const { QuitxPrograms } = require('quitx-activities');

// Get program activities
QuitxPrograms.get('A1'); // { music: [], mindfullness: [], activities: [] }

All APIs

Also available in examples folder

const { QuitxPrograms } = require('../');

console.log(`Get activity: A23`);
console.log(
	QuitxPrograms.get('A23')
);

console.log(`Get activity: A1`);
console.log(
	QuitxPrograms.get('A1')
);

console.log(`Custom activity: A2`);
console.log(
	// Be default activities is set to 3 & suggestions is set to 3
	QuitxPrograms.get('A2', { activities: 2, suggestions: 1 })
);

console.log(`Custom activity: A2`);
console.log(
	// Define activities to consider by program. This will ignore the random selection of activities.
	// "activities" property won't have any effect when "classes" property is passed
	// Still, you can manipulate "suggestions" count
	QuitxPrograms.get('A4', { classes: [ 'music' ] })
); 

console.log(`Get all programs`);
console.log(
	QuitxPrograms.programs()
);

console.log(`Get all activities`);
const activities = QuitxPrograms.activities();
console.log(activities);

console.log(`Get ${activities[0]} definitions`);
console.log(
	QuitxPrograms.definitions(activities[0])
);

console.log("activities[0]:", activities[0]);
console.log("Add new definition to an activity")
const id = QuitxPrograms.add(activities[0], { title: 'lorem ipsum doret' });
console.log("id:", id);

console.log("Update definition of an activity");
console.log(
	QuitxPrograms.update(activities[0], id, { title: 'lorem ipsum doret - [UPDATED]' })
);

console.log("Remove definition from an activity");
console.log(
	QuitxPrograms.remove(activities[0], id)
);