
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@sweet-monads/async
Advanced tools
Package for better developer experience with Promise
and @sweet-monad/interfaces/Monad
sweet-monads — easy-to-use monads implementation with static types definition and separated packages.
npm install @sweet-monads/async
import { chain } from "@sweet-monads/async";
import { right } from "@sweet-monads/either";
const fn = () =>
Promise.resolve(right("Hello, Sweet Monad."))
.then(chain(doSomethingAsync))
.then(chain(doOneMoreAsyncThing));
chain
chain<T, R>(fn: (v: T) => Promise<Monad<R>>): (m: Monad<T>) => Promise<Monad<R>>;
f: (v: T) => Promise<Monad<R>>
- async function which convert a Monad to another one.Promise
with mapped by fn
function value wrapped by Monad
by the Monad
implementation rule.Example:
declare function getUser(email: string): Promise<Either<UserNotFoundError, User>>;
declare function arePasswordsMatched(password: string, user: User): Promise<Either<WrongCredentialsError, boolean>>;
// result is Promise<Either<UserNotFoundError | WrongCredentialsError, boolean>>
const result = getUser("some@email.com")
.then(chain(user => arePasswordsMatched("some password", user.password)));
MIT (c) Artem Kobzar see LICENSE file.
FAQs
Promise helpers for monad
The npm package @sweet-monads/async receives a total of 0 weekly downloads. As such, @sweet-monads/async popularity was classified as not popular.
We found that @sweet-monads/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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.