
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ember-promise-tools
Advanced tools
This is a collection of tools we built to help deal with and unwrap promises when you know they are already fulfilled.
While you can always use the standard promise resolve mechanisms, if you preload a lot of ember data so that all your relationships are already resolved,
or you are dealing with promises you know were previously resolved and just want access to the fulfilled content, this is a collection of tools to help to do that.
ember install ember-promise-tools
A Mixin that you can include in any object to give you a promise resolving workflow.
The method signature is:
resolvePromise(maybePromise, immediateResolve, delayedResolve, catchResolve)
maybePromise is the value that may or may not be a promise.
If the value is a promise and is already resolved, or the value isn't a promise, immediateResolve is called.
If it is a promise and needs to wait, then the delayedResolve is called. If you don't pass this method in, immediateResolve will be called in its place.
If it gets an error, the catchResolve is called.
This method is meant to be used as last object in wins. If you pass multiple promises in, only the last one passed in calls callbacks on resolve.
function(maybePromise)
A simple function where you pass in a value, and it returns true or false if its a promise.
function(maybePromise)
A simple function where you pass in a value, and it returns true or false if the promise is fulfilled.
It is expected that if you call this method, you know its a promise or previously called is-promise util.
This detects fulfilled state only from objects using Ember.PromiseProxyMixin and Ember.RSVP.Promise.
function(maybePromise)
A simple function where you pass in a value, and it returns the content of a fulfilled promise.
It is expected that if you call this method, you know its a promise and previously fulfilled.
This only returns content from objects using Ember.PromiseProxyMixin and Ember.RSVP.Promise.
function(maybePromise)
This is a method combining the previously three utilities to try and return the most appropriate value.
If its not a promise, it returns the value.
If it is a promise and the promise is fulfilled, it returns the content.
If it is a promise and the promise isn't fulfilled, it returns the promise.
FAQs
A collection of tools to deal with promises easier.
The npm package ember-promise-tools receives a total of 62 weekly downloads. As such, ember-promise-tools popularity was classified as not popular.
We found that ember-promise-tools 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.