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

easy-notify-vanilla

v0.2.7

Published

------------------------------

Downloads

8

Readme

Easy Notification Packgae


Description

This package is doing somthing you are probably too lazy to do. Using this package you will be able to run simple notifications on you page.

installation

 npm i easy-notify-vanilla

Setup

to use the notification import the one and only function:

import { notify } from 'easy-notify-vanilla';

How to use it


Must have:


the first object is a must have which will provide you with the simplest notification possible

type: the type of the notification - can be: "success" | "error" | "warning" | "info"

message: "this is a message" can be what ever you want

Example:

notify({type: "success", message: "Hello World"});

Optional values:


in optional values object you can add diffrent configurations that you may need or not, setting up various styling options.

The Options:

isIcon: = true/false - each type has it's own specific icon;

timeout: number - this is configured in ms => 1s = 1000ms

position: you can change the position of the notification: "top-left" | "top-right" | "bottom-left" | "bottom-right"

isCloseButton: = true/false - add a close button that can close the notification.

isProgress: true/false - adds a progress bar for the time that the notification is working.

top: false/number - distance from top if false defualt value.

bottom: false/number - distance from bottom if false defualt value.

left: false/number - distance from left if false defualt value.

right: false/number - distance from right if false defualt value.

height: false/number - custom height if false defualt value.

width: false/number - custom width if false defualt value.

Examples:

  notify({type: "success", message: "Hello World"},{isProgress: true, isIcon: true, isCloseButton: true})
  notify({type: "info", message: "Hello World"},{position: "bottom-left", isIcon:true, isCloseButton: true})
  notify({type: "error", message: "Hello World"},{position: "top-right", isProgress: true, isCloseButton: true})
Github:

Link to Github