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 🙏

© 2026 – Pkg Stats / Ryan Hefner

io-toaster

v0.0.17

Published

Customized toaster based on the toastr npm package

Readme

io-toaster

Invent One

Based on Toastr package

Check it out at toastr

Quick Start

One Easy Step

For other API calls, see the toastr demo.

  1. import minified js and css files from dist/ directory

Basic Usage

node
import {IOToaster} from 'io-toaster';

// OR

const IOToaster = require('io-toaster').IOToaster;

#####browser

<!--
 1. Download library from gitlab repo
 2. Unzip and copy dist folder into your project
 3. link css and js files in dist/
-->
<link href="./RELATIVE_PATH/dist/io-toaster.min.css" type="text/css" rel="stylesheet">
<script src="./RELATIVE_PATH/dist/io-toaster.min.js" type="text/javascript"></script> 

Other Options

// Display an info toast with no title
IOToaster.info('Are you the 6 fingered man?')
// Display a warning toast, with no title
IOToaster.warning('My name is Inigo Montoya. You killed my father, prepare to die!')

// Display a success toast, with a title
IOToaster.success('Have fun storming the castle!', 'Miracle Max Says')

// Display an error toast, with a title
IOToaster.error('I do not think that word means what you think it means.', 'Inconceivable!')

// Immediately remove current toasts without using animation
IOToaster.remove()

// Remove current toasts using animation
IOToaster.clear()

// Override global options
IOToaster.success('We do have the Kapua suite available.', 'Turtle Bay Resort', {timeOut: 5000})

Escape HTML characters

In case you want to escape HTML characters in title and message

IOToaster.options.escapeHtml = true;

Close Button

Optionally enable a close button

IOToaster.options.closeButton = true;

Optionally override the close button's HTML.

IOToaster.options.closeHtml = '<button><i class="icon-off"></i></button>';

You can also override the CSS/LESS for #toast-container .toast-close-button

Optionally override the hide animation when the close button is clicked (falls back to hide configuration).

IOToaster.options.closeMethod = 'fadeOut';
IOToaster.options.closeDuration = 300;
IOToaster.options.closeEasing = 'swing';

Display Sequence

Show newest toast at bottom (top is default)

IOToaster.options.newestOnTop = false;

Callbacks

// Define a callback for when the toast is shown/hidden/clicked
IOToaster.options.onShown = function() { console.log('hello'); }
IOToaster.options.onHidden = function() { console.log('goodbye'); }
IOToaster.options.onclick = function() { console.log('clicked'); }
IOToaster.options.onCloseClick = function() { console.log('close button clicked'); }

Animation Options

IO Toaster will supply default animations, so you do not have to provide any of these settings. However you have the option to override the animations if you like.

Easings

Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery.

IOToaster.options.showEasing = 'swing';
IOToaster.options.hideEasing = 'linear';
IOToaster.options.closeEasing = 'linear';

Using the jQuery Easing plugin (http://www.gsgd.co.uk/sandbox/jquery/easing/)

IOToaster.options.showEasing = 'easeOutBounce';
IOToaster.options.hideEasing = 'easeInBack';
IOToaster.options.closeEasing = 'easeInBack';

Animation Method

Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.

IOToaster.options.showMethod = 'slideDown';
IOToaster.options.hideMethod = 'slideUp';
IOToaster.options.closeMethod = 'slideUp';

Prevent Duplicates

Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.

IOToaster.options.preventDuplicates = true;

Timeouts

Control how IO Toaster interacts with users by setting timeouts appropriately. Timeouts can be disabled by setting them to 0.

IOToaster.options.timeOut = 30; // How long the toast will display without user interaction
IOToaster.options.extendedTimeOut = 60; // How long the toast will display after a user hovers over it

Progress Bar

Visually indicate how long before a toast expires.

IOToaster.options.progressBar = true;

rtl

Flip the IO Toaster to be displayed properly for right-to-left languages.

IOToaster.options.rtl = true;

Building IO Toaster

npm install -g gulp
npm install

At this point the dependencies have been installed and you can build IO Toaster

  • Run the analytics gulp analyze
  • Run the build gulp

Contributing

No contribution will be accepted on this project.

Authors

Invent One

Credits

Based on toastr

Copyright

Copyright © 2018