Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
angular-bluebird
Advanced tools
Readme
An AngularJS service for Bluebird promise library.
NOTE: Right now it's very experimental.
Because Bluebird is probably one of the best promise libraries around. Also, it IS the fastest.
npm install --save angular-bluebird
This library assumes that you use Browserify
app.js:
var ngBluebird = require('angular-bluebird')
var app = angular.module('app', ['angular-bluebird'])
ngBluebird.trackDigests(app) //thank you http://stackoverflow.com/questions/23984471/how-do-i-use-bluebird-with-angular
// ....
some-ctrl.js:
function SomeCtrl($scope, $window, $timeout, $bluebird) {
function asyncAskQuestion(question) {
var deferred = $bluebird.defer
$timeout(function() { //simulate async
var result = $window.prompt(question)
if (typeof result == 'string') { //OK Pressed
deferred.resolve({okPresssed: true, answer: result})
} else { //'Canceled Pressed'
deferred.reject({okPressed: false})
}
}, 250)
return deferred.promise
}
$scope.askQuestion = function() {
var promise = asyncAskQuestion("Who is your favorite Teenage Mutant Ninja Turtle?")
promise.then(function(result) { //success (i.e. resolve)
$window.alert('Cowabunga! Your favorite turtle is ' + result.answer)
}, function(result) { //failure (i.e. reject)
$window.alert("You don't like the Ninja Turtles? What is wrong with you?")
})
}
}
MIT
FAQs
Angular Service for Bluebird
The npm package angular-bluebird receives a total of 1 weekly downloads. As such, angular-bluebird popularity was classified as not popular.
We found that angular-bluebird demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.