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

typescript-angular-utilities

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-angular-utilities - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

2

package.json
{
"name": "typescript-angular-utilities",
"version": "2.1.3",
"version": "2.1.4",
"description": "Typescript utility classes published as angular services",

@@ -5,0 +5,0 @@ "author": "Renovo Development Team",

@@ -7,2 +7,3 @@ import * as angular from 'angular';

isPromise(promise: angular.IPromise<any>): boolean;
resolvePromises(resolves: any): angular.IPromise<any>;
}

@@ -7,3 +7,5 @@ 'use strict';

var PromiseUtility = (function () {
function PromiseUtility() {
function PromiseUtility($q, $injector) {
this.$q = $q;
this.$injector = $injector;
}

@@ -13,2 +15,19 @@ PromiseUtility.prototype.isPromise = function (promise) {

};
PromiseUtility.prototype.resolvePromises = function (resolves) {
var _this = this;
var promises = {};
_.each(resolves, function (value, key) {
if (_.isFunction(value) || _.isArray(value)) {
promises[key] = (_this.$q.when(_this.$injector.invoke(value)));
}
else if (_.isString(value)) {
promises[key] = (_this.$q.when(_this.$injector.get(value)));
}
else {
promises[key] = (_this.$q.when(value));
}
});
return this.$q.all(promises);
};
PromiseUtility.$inject = ['$q', '$injector'];
return PromiseUtility;

@@ -15,0 +34,0 @@ })();

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