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 3.1.3 to 3.1.4

2

dist/angular-observe.js

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

subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete);
subscription = follow(sourcePath.slice(), source).subscribe(onNext, onError, onComplete);

@@ -124,0 +124,0 @@ function atPath(path) {

@@ -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(o){if(r[o])return r[o].exports;var t=r[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(2)},function(n,r){n.exports=e},function(e,n,r){var o=r(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,n,r,t,i){function u(e,n){var o=(n.asyncBind||n.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",s=t.shift(),f=a(e,u);return e.empty(),function(e,n,o){function a(e){function n(e){var n=typeof e;return"boolean"===n||"number"===n||"string"===n}var r=!n(g[u])||!n(e);g[u]=e,d("active",r)}function l(e){d("complete")}function p(e){g.$error=e,d("error")}function d(e,r){if(r||e!==m){var o=f[e];if(h&&h.$destroy(),!o)return void n.empty();h=g.$new(),m=e,o(h,function(e){n.empty(),n.append(e)})}g.$root.$$phase||g.$digest(!0)}var h,m,v,g=r.$new(!0,e);e.$watch(s,function(e){function n(e){var n=e.shift(),o=e;return function(e){var t=e[n];return t?r(o,t):i.fromValue()}}function r(e,r){var o=c(r);return e.length?i.switchMap.call(o,n(e)):o}v&&(v.unsubscribe(),v=null),d("loading"),v=r(t,e).subscribe(a,p,l)}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(n,r){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(n.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(n,r){if(n.length){c=!0;var i=o.element(n).clone();t[r]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+r+"}}"));var a=o.element(u).clone(),s=o.element(u).clone();t.active=e(a),t.complete=e(s)}return t}return{restrict:"EA",scope:!0,compile:u}}])}])});
!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(o){if(r[o])return r[o].exports;var t=r[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(2)},function(n,r){n.exports=e},function(e,n,r){var o=r(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,n,r,t,i){function c(e,n){var o=(n.asyncBind||n.source).split(/\s+as\s+/i),t=o.shift().split("."),c=o[0]||"$value",s=t.shift(),f=a(e,c);return e.empty(),function(e,n,o){function a(e){function n(e){var n=typeof e;return"boolean"===n||"number"===n||"string"===n}var r=!n(g[c])||!n(e);g[c]=e,d("active",r)}function l(e){d("complete")}function p(e){g.$error=e,d("error")}function d(e,r){if(r||e!==m){var o=f[e];if(h&&h.$destroy(),!o)return void n.empty();h=g.$new(),m=e,o(h,function(e){n.empty(),n.append(e)})}g.$root.$$phase||g.$digest(!0)}var h,m,v,g=r.$new(!0,e);e.$watch(s,function(e){function n(e){var n=e.shift(),o=e;return function(e){var t=e[n];return t?r(o,t):i.fromValue()}}function r(e,r){var o=u(r);return e.length?i.switchMap.call(o,n(e)):o}v&&(v.unsubscribe(),v=null),d("loading"),v=r(t.slice(),e).subscribe(a,p,l)}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function u(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(n,r){var t={},i={loading:[],active:[],error:[],complete:[]},c=[];o.forEach(n.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return c.push(e)}});var u=!1;if(o.forEach(i,function(n,r){if(n.length){u=!0;var i=o.element(n).clone();t[r]=e(i)}}),!u){c.length||c.push(document.createTextNode("{{"+r+"}}"));var a=o.element(c).clone(),s=o.element(c).clone();t.active=e(a),t.complete=e(s)}return t}return{restrict:"EA",scope:!0,compile:c}}])}])});

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

subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete);
subscription = follow(sourcePath.slice(), source).subscribe(onNext, onError, onComplete);

@@ -135,0 +135,0 @@ function atPath(path) {

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

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("most")):"function"==typeof define&&define.amd?define(["angular","most"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("most")):e.AngularObserve=r(e.angular,e.most)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.fromPromise,e.fromValue=t.of,e.map=t.map,e.switchMap=t.switchLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",a=t.shift(),f=s(e,u);return e.empty(),function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,d("active",n)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,n){if(n||e!==h){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=g.$new(),h=e,o(m,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,h,v,g=n.$new(!0,e);e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}v&&(v.unsubscribe(),v=null),d("loading"),v=n(t,e).subscribe(s,l,p)}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var s=o.element(u).clone(),a=o.element(u).clone();t.active=e(s),t.complete=e(a)}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("most")):"function"==typeof define&&define.amd?define(["angular","most"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("most")):e.AngularObserve=r(e.angular,e.most)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.fromPromise,e.fromValue=t.of,e.map=t.map,e.switchMap=t.switchLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function c(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),c=o[0]||"$value",a=t.shift(),f=s(e,c);return e.empty(),function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[c])||!r(e);g[c]=e,d("active",n)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,n){if(n||e!==h){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=g.$new(),h=e,o(m,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,h,v,g=n.$new(!0,e);e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=u(n);return e.length?i.switchMap.call(o,r(e)):o}v&&(v.unsubscribe(),v=null),d("loading"),v=n(t.slice(),e).subscribe(s,l,p)}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function u(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},c=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return c.push(e)}});var u=!1;if(o.forEach(i,function(r,n){if(r.length){u=!0;var i=o.element(r).clone();t[n]=e(i)}}),!u){c.length||c.push(document.createTextNode("{{"+n+"}}"));var s=o.element(c).clone(),a=o.element(c).clone();t.active=e(s),t.complete=e(a)}return t}return{restrict:"EA",scope:!0,compile:c}}])},function(e,n){e.exports=r}])});

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

subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete);
subscription = follow(sourcePath.slice(), source).subscribe(onNext, onError, onComplete);

@@ -135,0 +135,0 @@ function atPath(path) {

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

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rx")):"function"==typeof define&&define.amd?define(["angular","rx"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rx")):e.AngularObserve=r(e.angular,e.Rx)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.flatMapLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",s=t.shift(),f=a(e,u);return e.empty(),function(e,r,o){function a(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(y[u])||!r(e);y[u]=e,d("active",n)}function p(e){d("complete")}function l(e){y.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=y.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}y.$root.$$phase||y.$digest(!0)}var m,v,h,y=n.$new(!0,e);e.$watch(s,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),d("loading"),h=n(t,e).subscribe(a,l,p)}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var a=o.element(u).clone(),s=o.element(u).clone();t.active=e(a),t.complete=e(s)}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rx")):"function"==typeof define&&define.amd?define(["angular","rx"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rx")):e.AngularObserve=r(e.angular,e.Rx)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.flatMapLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",s=t.shift(),f=a(e,u);return e.empty(),function(e,r,o){function a(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(y[u])||!r(e);y[u]=e,d("active",n)}function p(e){d("complete")}function l(e){y.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=y.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}y.$root.$$phase||y.$digest(!0)}var m,v,h,y=n.$new(!0,e);e.$watch(s,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),d("loading"),h=n(t.slice(),e).subscribe(a,l,p)}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var a=o.element(u).clone(),s=o.element(u).clone();t.active=e(a),t.complete=e(s)}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])});

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

subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete);
subscription = follow(sourcePath.slice(), source).subscribe(onNext, onError, onComplete);

@@ -135,0 +135,0 @@ function atPath(path) {

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

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rxjs")):"function"==typeof define&&define.amd?define(["angular","rxjs"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rxjs")):e.AngularObserve=r(e.angular,e.rxjs)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.switchMap}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",a=t.shift(),f=s(e,u);return e.empty(),function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(y[u])||!r(e);y[u]=e,d("active",n)}function p(e){d("complete")}function l(e){y.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=y.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}y.$root.$$phase||y.$digest(!0)}var m,v,h,y=n.$new(!0,e);e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),d("loading"),h=n(t,e).subscribe(s,l,p)}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var s=o.element(u).clone(),a=o.element(u).clone();t.active=e(s),t.complete=e(a)}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rxjs")):"function"==typeof define&&define.amd?define(["angular","rxjs"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rxjs")):e.AngularObserve=r(e.angular,e.rxjs)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.switchMap}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function c(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),c=o[0]||"$value",a=t.shift(),f=s(e,c);return e.empty(),function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(y[c])||!r(e);y[c]=e,d("active",n)}function p(e){d("complete")}function l(e){y.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=y.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}y.$root.$$phase||y.$digest(!0)}var m,v,h,y=n.$new(!0,e);e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=u(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),d("loading"),h=n(t.slice(),e).subscribe(s,l,p)}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function u(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},c=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push.apply(i.loading,e.childNodes);case"active":return i.active.push.apply(i.active,e.childNodes);case"error":return i.error.push.apply(i.error,e.childNodes);case"complete":return i.complete.push.apply(i.complete,e.childNodes);default:return c.push(e)}});var u=!1;if(o.forEach(i,function(r,n){if(r.length){u=!0;var i=o.element(r).clone();t[n]=e(i)}}),!u){c.length||c.push(document.createTextNode("{{"+n+"}}"));var s=o.element(c).clone(),a=o.element(c).clone();t.active=e(s),t.complete=e(a)}return t}return{restrict:"EA",scope:!0,compile:c}}])},function(e,n){e.exports=r}])});
{
"name": "angular-observe",
"version": "3.1.3",
"version": "3.1.4",
"description": "Angular directive for representing the different states of an Observable.",

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

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

subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete);
subscription = follow(sourcePath.slice(), source).subscribe(onNext, onError, onComplete);

@@ -62,0 +62,0 @@ function atPath(path) {

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