New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

unnotify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unnotify

Pure JS growlish notifications with zero dependencies, simple API written in TypeScript.

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

unnotify

Project has migrated to @unaxiom/unnotify. This package is only for legacy purposes.

Pure JS growlish notifications with zero dependencies, simple API written in TypeScript. No jQuery needed either.

Installation

user@username ~> npm install unnotify --save
  • If integrating using browserify:

In your typescript files, import as:

import * as unnotify from 'unnotify';
  • If integrating to webpage:
<script src="dist/unnotify.min.js" type="text/javascript"></script>

Usage

// Initialization is required just once across all the files.
unnotify.init();

// To display a notification
var notificationID = unnotify.show('This is the Title', 'This is the content', {
    type: 'success' | 'info' | 'warning' | 'danger' | 'custom',
    timeout: 5000, // Number of milliseconds for which this notification needs to be displayed. If value is 0, then it won't be automatically destroyed.
    customClass: '', // (**Optional**) Name of the custom class that will be used instead of builtin classes. For this to be used, **type** should be set to 'custom'. 
    animateIn: 'lightSpeedIn', // (**Optional**) Name of the animation class (from animate.css) that needs to be used while creating the notification.
    animateOut: 'bounceOut', // (**Optional**) Name of the animation class (from animate.css) that needs to be used while destroying the notification.
})

// To close the notification programatically
unnotify.destroy(notificationID);

Dev

user@username ~> npm install
user@username ~> gulp

Make necessary code changes in unnotify.ts

Keywords

JS

FAQs

Package last updated on 10 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts