Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 385 Bytes

replacestring.md

File metadata and controls

14 lines (11 loc) · 385 Bytes

replaceString(text, replaces)

Change values ​​from a string to defined ones

  • text <String> The original text
  • replaces <Array> List of modifications that must be made

Example

const { replaceString } = require("@bready/core");
console.log(replaceString("👋 Hi, user", {"👋": "🤩", "user": "OutroNinja"}));
// Expected output:
// 🤩 Hi, OutroNinja