New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

string-replace-async

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-replace-async - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

4

index.js

@@ -1,2 +0,2 @@

module.exports = function replaceAsync(string, searchValue, replacer) {
export default function replaceAsync(string, searchValue, replacer) {
try {

@@ -25,2 +25,2 @@ if (typeof replacer === "function") {

}
};
}
{
"name": "string-replace-async",
"version": "2.0.0",
"version": "3.0.0",
"description": "Asynchronous String.prototype.replace()",

@@ -12,4 +12,5 @@ "license": "MIT",

},
"type": "module",
"engines": {
"node": ">=0.12"
"node": ">= 14.0.0"
},

@@ -16,0 +17,0 @@ "scripts": {

@@ -11,6 +11,12 @@ # string-replace-async

**Note:** If you're using pre-14 version of Node or your node codebase isn't converted to [ES Modules](https://nodejs.org/api/esm.html#esm_introduction) yet, please use Version 2 specifically!
```
$ npm install string-replace-async@^2.0.0
```
## Usage
```js
let replaceAsync = require("string-replace-async");
import replaceAsync from "string-replace-async";

@@ -17,0 +23,0 @@ await replaceAsync("#rebeccapurple", /#(\w+)/g, async (match, name) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc