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

@deviser/notify

v1.0.7

Published

Introducing a lightweight and versatile JavaScript library that seamlessly integrates informative popup messages into your web applications. Built with efficiency and flexibility in mind.

Downloads

11

Readme

Notify

Introducing a lightweight and versatile JavaScript library that seamlessly integrates informative popup messages into your web applications. Built with efficiency and flexibility in mind.

How do I get set up?

  • Enjoy immediate integration without external dependencies: (For simple html website)

    • <link href="css/notify.css" rel="stylesheet">
    • <script src="js/notify.js" type="module"></script>
    • <script type="module">
        // important to import first before use anywhere in project
        import {Notify} from './notify.js'
        const notify = new Notify()
            
        // uses
        notify.show('success', 'This is success message')
      </script>
  • For Node Based applications like react, view and so.

    • npm i @deviser/notify
  • Configuration

    • In Your js file setup notify
      let notify = new Notify(config)
    • Experience effortless customization using config
        let config = {
            title: false
        }
    • Embrace a user-centric approach to communication:
        | Option  | type    | Default      | Description                                                                                                              |
        |---------|---------|--------------|--------------------------------------------------------------------------------------------------------------------------|
        | title   | boolean | True         | This will be a default title based on notification. you can remove it by setting option to false                         |
        | icon    | boolean | True         | This will be a default icon based on notification. you can remove it by setting option to false                          |
        | type    | string  | info         | you can use type options to display different notification.                                                              |
        | html    | string  | default-html | This will be custom html for your notification you need to add a class ```notify__message``` in your html do add message |
        | timeout | int     | 4000         | This is be timeout for notification to disappear                                                                         |
        | position| string  | top-right    | The position of the notificatino where it will appears                                                                   |
    • Options (type): You can use any of the option from array to display a specific type of notifications
      'danger': ['danger', 'error'],
      'info': ['information', 'info', 'message'],
      'success': ['success'],
      'warning': ['warning'],
      'notice': ['notice']
  • Display Message notify.show(type, message)

    • Examples:

      notify.show('danger','This is error message')
      notify.show('success', 'This is success message')
      notify.show('error', 'This is error message')
      notify.show('warning', 'This is warning message')
      notify.show('info', 'This is info message')
      notify.show('notice', 'This is notice message')

      alt text

    • To change html to custom you need some classes for div to interact with notify, you can optionality use these but for message, class is required to display notify message

      Uses:                   Class Name
      For Message             notify__message         This will be your notify message
      For Icon                notify__icon            This will be defualt icon based on type
      For Title               notify__title           This will be default title based on type
  • There is no dependency unless you need to customize your custom html in notify (required css only dependency)

Contribution guidelines

  • If you wish to update any info or need to change readme please feel free to raise PR
  • Once review, it will be updated.

Who do I talk to?

  • Repo owner or admin
  • Other community or team contact