
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
@morphism/utils
Advanced tools
A re-export of fp-ts-contrib with some additional convenience functions/domains:
JSON: an FP wrapper around the native JSON.stringify and JSON.parse methodsDo: Haskell-inspired do-notation for Either, TaskEither, Option, and TaskDoconst addTen = ({ a }:{ a: number }) => Either.right(a + 10)
const doNotation = Do.forEither() // Initiates do notation context for `Either`
.let('a', 10) // Set 'a' to 10 in the context
.bindL('b', addTen) // Lazily passes in 'a' to 'addTen' & binds result to context under 'b'
.return(({ a }) => `${a} dollars`) // Returns a value derived from the context
const result = pipe(
doNotation,
Either.getOrElse(() => `0 dollars`)
)
expect(result).toEqual('20 dollars')
JSONConverting to JSON:
import { Either } from "@morphism/fp";
import { JSON } from "@morphism/utils";
const short = pipe(
{ someField: "someValue" },
JSON.Stringify.short,
Either.fold(
() => "{}",
(json) => json
)
)
expect(short).toEqual('{ "someField": "someValue" }')
Converting to pretty JSON:
const pretty = pipe(
{ someField: "someValue" },
JSON.Stringify.pretty,
Either.fold(
() => "{}",
(json) => json
)
)
expect(pretty).toEqual('{\n "someField": "someValue"\n}')
Converting to pretty JSON and never failing:
const result = JSON.Stringify.Always.pretty({ someField: "someValue" })
expect(result).toEqual('{\n "someField": "someValue"\n}')
FAQs
@morphism/utils
The npm package @morphism/utils receives a total of 27 weekly downloads. As such, @morphism/utils popularity was classified as not popular.
We found that @morphism/utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.