Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-flash-alert

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-flash-alert - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

index.js

2

bower.json
{
"name": "angular-flash-alert",
"version": "2.2.2",
"version": "2.2.4",
"homepage": "https://github.com/sachinchoolur/angular-flash",

@@ -5,0 +5,0 @@ "authors": [

'use strict';
/*! angular-flash - v2.2.1 - 2016-02-06
/*! angular-flash - v2.2.4 - 2016-03-05
* https://github.com/sachinchoolur/angular-flash

@@ -5,0 +5,0 @@ * Copyright (c) 2016 Sachin; Licensed MIT */

@@ -1,4 +0,4 @@

/*! angular-flash - v2.2.3 - 2016-03-02
/*! angular-flash - v2.2.4 - 2016-03-05
* https://github.com/sachinchoolur/angular-flash
* Copyright (c) 2016 Sachin; Licensed MIT */
"use strict";var app=angular.module("ngFlash",[]);app.run(["$rootScope",function(a){return a.flashes=[]}]),app.directive("dynamic",["$compile",function(a){return{restrict:"A",replace:!0,link:function(b,c,d){return b.$watch(d.dynamic,function(d){return c.html(d),a(c.contents())(b)})}}}]),app.directive("closeFlash",["$compile","$rootScope","Flash",function(a,b,c){return{link:function(a,d,e){return d.on("click",function(){var a=parseInt(e.closeFlash,10);c.dismiss(a),b.$apply()})}}}]),app.directive("flashMessage",["Flash",function(a){return{restrict:"E",scope:{duration:"=",showClose:"=",onDismiss:"&"},template:'<div role="alert" ng-repeat="flash in $root.flashes track by $index" id="{{flash.config.id}}" class="alert {{flash.config.class}} alert-{{flash.type}} alert-dismissible alertIn alertOut"><div type="button" class="close" ng-show="flash.showClose" close-flash="{{flash.id}}"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></div> <span dynamic="flash.text"></span> </div>',link:function(b,c,d){function e(a){"function"==typeof b.onDismiss&&b.onDismiss({flash:a})}a.setDefaultTimeout(b.duration),a.setShowClose(b.showClose),a.setOnDismiss(e)}}}]),app.factory("Flash",["$rootScope","$timeout",function(a,b){function c(b){return a.flashes.findIndex(function(a){return a.id===b})}var d={},e=0;return d.setDefaultTimeout=function(a){"number"==typeof a&&(d.defaultTimeout=a)},d.defaultShowClose=!0,d.setShowClose=function(a){"boolean"==typeof a&&(d.defaultShowClose=a)},d.setOnDismiss=function(a){"function"==typeof a&&(d.onDismiss=a)},d.create=function(c,f,g,h,i){var j=void 0,k=void 0;return j=this,k={type:c,text:f,config:h,id:e++},k.showClose="undefined"!=typeof i?i:d.defaultShowClose,d.defaultTimeout&&"undefined"==typeof g?k.timeout=d.defaultTimeout:g&&(k.timeout=g),a.flashes.push(k),k.timeout&&(k.timeoutObj=b(function(){j.dismiss(k.id)},k.timeout)),k.id},d.pause=function(c){a.flashes[c].timeoutObj&&b.cancel(a.flashes[c].timeoutObj)},d.dismiss=function(b){var e=c(b);if(-1!==e){var f=a.flashes[e];d.pause(e),a.flashes.splice(e,1),a.$digest(),"function"==typeof d.onDismiss&&d.onDismiss(f)}},d.clear=function(){for(;a.flashes.length>0;)d.dismiss(a.flashes[0].id)},d.reset=d.clear,d}]);
{
"name": "angular-flash-alert",
"version": "2.2.3",
"version": "2.2.4",
"description": "Flash message for AngularJS and Bootstrap",

@@ -23,3 +23,3 @@ "keywords": [

},
"contributors": [
"contributors": [
{

@@ -35,3 +35,3 @@ "name": "Roope Hakulinen",

},
"main": "dist/angular-flash.js",
"main": "index.js",
"license": "MIT",

@@ -38,0 +38,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc