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

@boldcommerce/bold-subscriptions-js

v1.2.9

Published

This Javascript API makes it easy to add subscriptions to the cart and navigate to the Bold Subscriptions or Cashier checkout.

Downloads

1,989

Readme

BoldSubscriptions.js

:warning: This package is meant for Bold Subscriptions v1 which is no longer installable and has been replaced by Bold Subscriptions v2. See the Bold Developer Portal for the latest developer documentation.

About

Use these Javascript APIs to easily build custom subscription flows, add subscriptions to the cart and navigate to the Bold Subscriptions or Cashier checkout. The available methods are a fast alternative to and largely based off of our Custom Subscription Flow and Widget API documentation. Included with these API methods are detailed exceptions and error messages to help you quickly and reliably develop custom subscription flows.

Browser Support

Chrome | Firefox | Safari | Opera | Edge | IE | --- | --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |

Installing

Using npm:

$ npm install @boldcommerce/bold-subscriptions-js

Using yarn:

$ yarn add @boldcommerce/bold-subscriptions-js

Using CDN:

<script src="https://unpkg.com/@boldcommerce/bold-subscriptions-js"></script>

API Reference

To view our full documentation on the available methods head over to our BoldSubscriptions.js API reference.

Example Node.js usage

import { cart } from '@boldcommerce/bold-subscriptions-js';
cart.standard.addToCart({
	'id': 1250183643165,
	properties: {
		'group_id': 1234,
		'frequency_num': 1,
		'frequency_type': 3,
		'frequency_type_text': 'Every 1 Month(s)',
	}
})
	.then(() => alert('Successfully added!'));

Example CDN usage

<form>
	<input type="hidden" name="group_id" value="1234">
	<input type="hidden" name="frequency_num" value="1">
	<input type="hidden" name="frequency_type" value="3">
	<input type="hidden" name="frequency_type_text" value="Every 1 Month(s)">
	<input type="hidden" name="quantities[]" value="1">
	<input type="hidden" name="variant_id[]" value="1250183643165">
	<input type="hidden" name="product_id[]" value="103180140573">
	<button onclick="BoldSubscriptions.cart.standard.directlyToCheckout(event)">Checkout</button>
</form>

Contributing

This project is read only. Please contact Bold Commerce with any changes or additions you would like to make.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.