
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Alters a string by replacing multiple range fragments in one fast pass. Works in node and browsers.
var alter = require("alter");
alter("0123456789", [
{start: 1, end: 3, str: "first"},
{start: 5, end: 9, str: "second"},
]); // => "0first34second9"
The fragments does not need to be sorted but must not overlap. More examples in test/alter-tests.js
Install using npm
npm install alter
var alter = require("alter");
Clone the repo and include it in a script tag
git clone https://github.com/olov/alter.git
<script src="alter/alter.js"></script>
FAQs
alters a string by replacing multiple range fragments in one fast pass
The npm package alter receives a total of 222,190 weekly downloads. As such, alter popularity was classified as popular.
We found that alter 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
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.