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 1.1.0 to 1.1.1

17

dist/angular-observe.js

@@ -83,10 +83,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

// Subscribe to the observable
var observable = typeof source.subscribe === 'function'
? source
: typeof source.then === 'function'
? liftPromise(source)
: liftValue(source);
var subscription = observable.subscribe(onNext, onError, onComplete);
$transclude(compileState.bind(null, 'active', false), null, '');

@@ -100,4 +92,13 @@ $transclude(compileState.bind(null, 'loading', true), null, 'loading');

console.warn('The `observable` directive requires at least one child element.');
return;
}
// Subscribe to the observable
var observable = typeof source.subscribe === 'function'
? source
: typeof source.then === 'function'
? liftPromise(source)
: liftValue(source);
var subscription = observable.subscribe(onNext, onError, onComplete);
setState('loading', true);

@@ -104,0 +105,0 @@

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

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("angular")):"function"==typeof define&&define.amd?define(["angular"],n):"object"==typeof exports?exports.AngularObserve=n(require("angular")):e.AngularObserve=n(e.angular)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){var t=r(1);e.exports="filearts.angularObserve";var o=t.module(e.exports,[]);o.directive("observe",["$compile","$timeout",function(e,n){return{restrict:"EA",scope:!0,transclude:{loading:"?loading",active:"?active",complete:"?complete",error:"?error"},link:function(r,o,i,u,c){function l(e){r.$value=e,p("active")}function a(e){p("complete")}function s(e){r.$error=e,p("error")}function f(n,r,t){var o=r?t.contents():t;if(o.length){var i=e(o);g[n]=i}}function b(e){return{subscribe:function(n,r,o){return e.then(n,r,n)["catch"](function(e){return e}).then(o),{unsubscribe:t.noop}}}}function d(e){return{subscribe:function(r,o,i){return n(r.bind(null,e),0,!1).then(i),{unsubscribe:t.noop}}}}function p(e,n){if(e!==v){var t=g[e];if(!t)return;var i=t(r);o.empty(),o.append(i),v=e}n||r.$root.$$phase||r.$digest(!0)}var v,g={},m=r.$eval(i.observe||i.source);if(!m)return void console.warn("The `observable` directive requires a source observable.");var x="function"==typeof m.subscribe?m:"function"==typeof m.then?b(m):d(m),h=x.subscribe(l,s,a);c(f.bind(null,"active",!1),null,""),c(f.bind(null,"loading",!0),null,"loading"),c(f.bind(null,"active",!0),null,"active"),c(f.bind(null,"complete",!0),null,"complete"),c(f.bind(null,"error",!0),null,"error"),g.active||console.warn("The `observable` directive requires at least one child element."),p("loading",!0),r.$on("$destroy",function(){h.unsubscribe()})}}}])},function(n,r){n.exports=e}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("angular")):"function"==typeof define&&define.amd?define(["angular"],n):"object"==typeof exports?exports.AngularObserve=n(require("angular")):e.AngularObserve=n(e.angular)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){var t=r(1);e.exports="filearts.angularObserve";var o=t.module(e.exports,[]);o.directive("observe",["$compile","$timeout",function(e,n){return{restrict:"EA",scope:!0,transclude:{loading:"?loading",active:"?active",complete:"?complete",error:"?error"},link:function(r,o,i,u,c){function l(e){r.$value=e,p("active")}function a(e){p("complete")}function s(e){r.$error=e,p("error")}function f(n,r,t){var o=r?t.contents():t;if(o.length){var i=e(o);g[n]=i}}function b(e){return{subscribe:function(n,r,o){return e.then(n,r,n)["catch"](function(e){return e}).then(o),{unsubscribe:t.noop}}}}function d(e){return{subscribe:function(r,o,i){return n(r.bind(null,e),0,!1).then(i),{unsubscribe:t.noop}}}}function p(e,n){if(e!==v){var t=g[e];if(!t)return;var i=t(r);o.empty(),o.append(i),v=e}n||r.$root.$$phase||r.$digest(!0)}var v,g={},m=r.$eval(i.observe||i.source);if(!m)return void console.warn("The `observable` directive requires a source observable.");if(c(f.bind(null,"active",!1),null,""),c(f.bind(null,"loading",!0),null,"loading"),c(f.bind(null,"active",!0),null,"active"),c(f.bind(null,"complete",!0),null,"complete"),c(f.bind(null,"error",!0),null,"error"),!g.active)return void console.warn("The `observable` directive requires at least one child element.");var x="function"==typeof m.subscribe?m:"function"==typeof m.then?b(m):d(m),h=x.subscribe(l,s,a);p("loading",!0),r.$on("$destroy",function(){h.unsubscribe()})}}}])},function(n,r){n.exports=e}])});
{
"name": "angular-observe",
"version": "1.1.0",
"version": "1.1.1",
"description": "Angular directive for representing the different states of an Observable.",

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

@@ -27,10 +27,2 @@ var Angular = require('angular');

// Subscribe to the observable
var observable = typeof source.subscribe === 'function'
? source
: typeof source.then === 'function'
? liftPromise(source)
: liftValue(source);
var subscription = observable.subscribe(onNext, onError, onComplete);
$transclude(compileState.bind(null, 'active', false), null, '');

@@ -44,4 +36,13 @@ $transclude(compileState.bind(null, 'loading', true), null, 'loading');

console.warn('The `observable` directive requires at least one child element.');
return;
}
// Subscribe to the observable
var observable = typeof source.subscribe === 'function'
? source
: typeof source.then === 'function'
? liftPromise(source)
: liftValue(source);
var subscription = observable.subscribe(onNext, onError, onComplete);
setState('loading', true);

@@ -48,0 +49,0 @@

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