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 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.editorconfig

37

package.json
{
"name": "replace-last",
"version": "1.0.0",
"description": "",
"version": "1.0.1",
"description": "Replaces last match for pattern in string with replacement",
"author": "Daniel Lewis BSc (Hons)",
"license": "ISC",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "./node_modules/.bin/istanbul cover -x \"**/*.spec.js\" ./node_modules/mocha/bin/_mocha",
"enforcer": "./node_modules/.bin/istanbul check-coverage --statement 100 --branch 100 --function 100 --line 100",
"build": "npm-run-all test enforcer",
"prepush": "npm run build"
},
"author": "",
"license": "ISC"
"repository": {
"type": "git",
"url": "git+https://github.com/danday74/replace-last.git"
},
"bugs": {
"url": "https://github.com/danday74/replace-last/issues"
},
"homepage": "https://github.com/danday74/replace-last#readme",
"keywords": [],
"dependencies": {
"kind-of": "^6.0.0"
},
"devDependencies": {
"chai": "^4.1.2",
"coveralls": "2.11.16",
"eslint": "^4.9.0",
"husky": "^0.14.3",
"istanbul": "^0.4.5",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.1"
},
"engines": {
"node": ">= 4.0.0"
}
}

22

README.md
# replace-last
**Replaces last match for pattern in string with replacement.**
<br>[![Linux Build](https://img.shields.io/travis/danday74/replace-last/master.svg?label=linux)](https://travis-ci.org/danday74/replace-last)
[![Windows Build](https://img.shields.io/appveyor/ci/danday74/replace-last/master.svg?label=windows)](https://ci.appveyor.com/project/danday74/replace-last)
[![Coverage Status](https://coveralls.io/repos/github/danday74/replace-last/badge.svg)](https://coveralls.io/github/danday74/replace-last)
<br>[![npm](https://img.shields.io/npm/v/replace-last.svg)](https://www.npmjs.com/package/replace-last)
[![Dependencies Status](https://david-dm.org/danday74/replace-last/status.svg)](https://david-dm.org/danday74/replace-last)
[![npm](https://img.shields.io/npm/dm/replace-last.svg)](https://www.npmjs.com/package/replace-last)
[![node](https://img.shields.io/node/v/replace-last.svg)](https://www.npmjs.com/package/replace-last)
**Replaces last match for pattern in string with replacement**
```npm install --save replace-last```
COMING VERY SOON!
replaceLast([string=''], pattern, replacement)
replaceLast(str, pattern, replacement)
## Arguments
[string=''] (string): The string to modify.
str (string): The string to modify.

@@ -23,8 +33,6 @@ pattern (RegExp|string): The pattern to replace.

```npm i --save replace-last```
```javascript 1.5
var replaceLast = require('replace-last');
replaceLast('hello hello hello there', 'hello', 'bye');
// => 'hello hello bye there'
replaceLast('hello hello hello', 'hello', 'bye');
// => 'hello hello bye'
```
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