
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@pulsechain/react-middle-ellipsis
Advanced tools
Put the dots in the middle of a long string, versus the end.
Adding ellipses to the end of long text is cool. But not always! Sometimes the end of the text contains vital information, particularly for URLs or filenames.
This React component is designed with that use case in mind.
yarn add react-middle-ellipsis
Once imported, you can then wrap any node with <MiddleEllipsis>.
This will compute the width of the surrounding parent node. Then, it
will look for the child node (so make sure to add a span at
minimum internally): it will use this element to compute the width
of the child, and then shorten the text element whose class is
ellipseMe (optional) to fit within the parent.
The component re-computes things if the browser window is resized, too!
import React from "react";
import MiddleEllipsis from "react-middle-ellipsis";
const Component = props => {
return (
<>
<div style={{ width: "350px", whiteSpace: "nowrap" }}>
<MiddleEllipsis>
<span>
I am some long text that should be ellipsed in the middle because
the end contains important stuff.
</span>
</MiddleEllipsis>
</div>
<div style={{ width: "350px", whiteSpace: "nowrap" }}>
<MiddleEllipsis>
<span>
Don't ellipse me.{" "}
<span className="ellipseMe">
I am some long text that should be ellipsed in the middle because
the end contains important stuff.
</span>
</span>
</MiddleEllipsis>
</div>
<>
);
};
export default Component;
Notes for developing this component.
yarn && yarn run start in this directory and separately also in /example. This will
live reload any changes made in /src.
Change the version number in package.json and npm publish once complete.
MIT © bluepeter
FAQs
Put the dots in the middle of a long string, versus the end.
We found that @pulsechain/react-middle-ellipsis 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.