
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
unless-async
Advanced tools
Async unless
conditional flow inspired by Ruby.
Node 6+
Because programming is fun, and implementing what you think you know shows you what you've yet to learn.
npm i -S unless-async
const unless = require('unless-async');
const foo = false;
unless(foo, () => console.log('Foo is false so I am called!'));
const bar = true;
unless(bar, () => console.log('Bar is true so I am NOT called!'));
unless(user.isAuthenticated(), () => authenticate(user))
.then(() => {
return mail.send(user.email);
});
const isAdmin = User.find(params.userId).then(u => u.isAdmin);
return unless(isAdmin, () => {
throw new Error('Forbidden');
})
.then(() => Message.find(params));
unless(
Promise<any>|boolean condition,
function action
) -> Promise
Creates a promise that is resolved with the given action function when false, otherwise resolves undefined.
npm test
MIT
FAQs
Async unless conditional flow.
The npm package unless-async receives a total of 0 weekly downloads. As such, unless-async popularity was classified as not popular.
We found that unless-async 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
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.