New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

string-mapreplace

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-mapreplace

Replace parts of string using map.

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

string-mapreplace

NOTE: string-mapreplace was renamed to @extra-string/map-replace. NPM

Replace parts of string using map.

const mapReplace = require('string-mapreplace');
// mapReplace(<string>, <map>)

mapReplace('alpha beta', new Map().set('alpha', 'α').set('beta', 'β'));
// 'α β'
mapReplace('gamma DELTA', new Map().set('gamma', 'γ').set('delta', 'δ'));
// 'γ DELTA'
mapReplace('Epsilon ZETA', new Map().set(/epsilon/gi, 'ε').set(/zeta/gi, 'ζ'));
// 'ε ζ'

Keywords

string

FAQs

Package last updated on 24 Sep 2018

Did you know?

Socket

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.

Install

Related posts