Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

replace-last

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace-last

[![Linux Build](https://img.shields.io/travis/danday74/awol/master.svg?label=linux)](https://travis-ci.org/danday74/awol) [![Windows Build](https://img.shields.io/appveyor/ci/danday74/awol/master.svg?label=windows)](https://ci.appveyor.com/project/dan

  • 1.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39K
increased by17.4%
Maintainers
1
Weekly downloads
 
Created
Source

replace-last


Linux Build Windows Build Coverage Status
npm Dependencies Status npm node

Replaces last match for pattern in string with replacement

npm install --save replace-last

replaceLast(str, pattern, replacement)

Arguments

str (string): The string to modify.

pattern (RegExp|string): The pattern to replace.

replacement (string): The match replacement.

Returns

(string): Returns the modified string.

Example

var replaceLast = require('replace-last');
replaceLast('hello hello hello', 'hello', 'bye');
// => 'hello hello bye'

Another missing method from the AWOL library

FAQs

Package last updated on 27 Oct 2017

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

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