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

angular-observe

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-observe - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/angular-observe.js

@@ -77,3 +77,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

var isolateScope = $rootScope.$new(true, $scope);
var source = $scope.$eval($attrs.observe || $attrs.source);
var source = $scope.$eval($attrs.asyncBind || $attrs.source);

@@ -80,0 +80,0 @@ $element.empty();

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

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular")):"function"==typeof define&&define.amd?define(["angular"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular")):e.AngularObserve=r(e.angular)}(this,function(e){return function(e){function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var t=n(1);e.exports="filearts.angularObserve";var o=t.module(e.exports,[]);o.directive("asyncBind",["$compile","$q","$rootScope","$timeout",function(e,r,n,o){function u(e){var r=a(e);return function(e,t,o){function u(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(v.$value)||!r(e);v.$value=e,f("active",n)}function a(e){f("complete")}function s(e){v.$error=e,f("error")}function f(e,n){if(n||e!==p){var o=r[e];if(l&&l.$destroy(),!o)return void t.empty();l=v.$new(),p=e,o(l,function(e){t.empty(),t.append(e)})}v.$root.$$phase||v.$digest(!0)}var l,p,v=n.$new(!0,e),d=e.$eval(o.observe||o.source);if(t.empty(),!d)return void console.warn("The `observable` directive requires a source observable.");f("loading");var b="function"==typeof d.subscribe?d:"function"==typeof d.then?c(d):i(d),m=b.subscribe(u,s,a);e.$on("$destroy",function(){m.unsubscribe()})}}function c(e){return{subscribe:function(r,n,o){return e.then(r,n,r)["catch"](function(e){return e}).then(o),{unsubscribe:t.noop}}}}function i(e){return{subscribe:function(r,n,u){return o(r.bind(null,e),0,!1).then(u),{unsubscribe:t.noop}}}}function a(r){var n={},o={loading:[],active:[],error:[],complete:[]},u=[];t.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return o.loading.push(e);case"active":return o.active.push(e);case"error":return o.error.push(e);case"complete":return o.complete.push(e);default:return u.push(e)}});var c=!1;if(t.forEach(o,function(r,o){if(r.length){c=!0;var u=t.element(r).clone();n[o]=e(u)}}),!c){u.length||u.push(document.createTextNode("{{$value}}"));var i=t.element(u).clone();n.active=e(i),n.complete=e(i.clone())}return n}return{restrict:"EA",scope:!0,compile:u}}])},function(r,n){r.exports=e}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular")):"function"==typeof define&&define.amd?define(["angular"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular")):e.AngularObserve=r(e.angular)}(this,function(e){return function(e){function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var t=n(1);e.exports="filearts.angularObserve";var o=t.module(e.exports,[]);o.directive("asyncBind",["$compile","$q","$rootScope","$timeout",function(e,r,n,o){function u(e){var r=a(e);return function(e,t,o){function u(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(v.$value)||!r(e);v.$value=e,f("active",n)}function a(e){f("complete")}function s(e){v.$error=e,f("error")}function f(e,n){if(n||e!==p){var o=r[e];if(l&&l.$destroy(),!o)return void t.empty();l=v.$new(),p=e,o(l,function(e){t.empty(),t.append(e)})}v.$root.$$phase||v.$digest(!0)}var l,p,v=n.$new(!0,e),d=e.$eval(o.asyncBind||o.source);if(t.empty(),!d)return void console.warn("The `observable` directive requires a source observable.");f("loading");var b="function"==typeof d.subscribe?d:"function"==typeof d.then?c(d):i(d),m=b.subscribe(u,s,a);e.$on("$destroy",function(){m.unsubscribe()})}}function c(e){return{subscribe:function(r,n,o){return e.then(r,n,r)["catch"](function(e){return e}).then(o),{unsubscribe:t.noop}}}}function i(e){return{subscribe:function(r,n,u){return o(r.bind(null,e),0,!1).then(u),{unsubscribe:t.noop}}}}function a(r){var n={},o={loading:[],active:[],error:[],complete:[]},u=[];t.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return o.loading.push(e);case"active":return o.active.push(e);case"error":return o.error.push(e);case"complete":return o.complete.push(e);default:return u.push(e)}});var c=!1;if(t.forEach(o,function(r,o){if(r.length){c=!0;var u=t.element(r).clone();n[o]=e(u)}}),!c){u.length||u.push(document.createTextNode("{{$value}}"));var i=t.element(u).clone();n.active=e(i),n.complete=e(i.clone())}return n}return{restrict:"EA",scope:!0,compile:u}}])},function(r,n){r.exports=e}])});
{
"name": "angular-observe",
"version": "2.0.0",
"version": "2.0.1",
"description": "Angular directive for representing the different states of an Observable.",

@@ -5,0 +5,0 @@ "main": "./dist/angular-observe.js",

@@ -21,3 +21,3 @@ var Angular = require('angular');

var isolateScope = $rootScope.$new(true, $scope);
var source = $scope.$eval($attrs.observe || $attrs.source);
var source = $scope.$eval($attrs.asyncBind || $attrs.source);

@@ -24,0 +24,0 @@ $element.empty();

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