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

flash-messages-ak

v1.0.1

Published

Flash/Alert Message package which display custom text message, with ability to specify how it will be displayed

Downloads

2

Readme

Flash Message

Simple javascript which can used from anywhere in your application. once this function is triggered it will display the provided message on the screen.

Install

npm install --save flash-messages-ak

and of course you need to require the package:

require('flash-messages-ak')

Or you can added directly from unpack cdn as follow:

<script src="https://unpkg.com/flash-messages-ak"></script>

Usage

once you installed this package you can call the flashMsg() from anywhere in your app for example

flashMsg("My Message", 1000 , "success" , "top" , "left")

Arguments

The flashMsg function accept five arguments as follow:

  • message

    • type: String
    • default: none
    • description: here where you can specify the text content of the flash message
  • timeout

    • type: Number
    • default: 2000
    • description: through this argument you can specify how long this flash message will be displayed on the screen
  • level

    • type: String
    • default: successs
    • options: success or danger
    • description: this argument give you the ability to specify the background color of the flash message success light green danger light red.
  • position

    • type: String
    • default: bottom
    • options: bottom , top
    • description: you can specify the position of the flash message either bottom or top of the screen
  • alignment

    • type: String
    • default: right
    • options: right , left
    • description: you can specify the alignment of this flash message either left or right of the screen

Scren Shots

Screen Shot 1

Screen Shot 1