broccoli-replace
Advanced tools
Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## 2.0.1 — 2021-02-28 | ||
_This version does not introduce any user-facing changes._ | ||
## 2.0.0 — 2021-02-26 | ||
@@ -4,0 +8,0 @@ |
@@ -20,6 +20,4 @@ 'use strict'; | ||
ReplaceFilter.prototype.processString = function (string) { | ||
var res = this.applause.replace(string); | ||
var result = res.content; | ||
var count = res.count; | ||
if (count === 0) { | ||
var result = this.applause.replace(string).content; | ||
if (result === false) { | ||
// No replacements | ||
@@ -26,0 +24,0 @@ return string; |
{ | ||
"name": "broccoli-replace", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Replace text patterns with applause.", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "eslint . && broccoli build temp && ava && del-cli temp", | ||
"test": "eslint . && broccoli build temp && ava", | ||
"release": "release-it" | ||
@@ -48,3 +48,2 @@ }, | ||
"broccoli-cli": "^1.0.0", | ||
"del-cli": "^3.0.1", | ||
"eslint": "^7.20.0", | ||
@@ -54,3 +53,3 @@ "eslint-config-xo": "^0.35.0", | ||
"release-it": "^14.4.1", | ||
"rimraf": "^2.5.0" | ||
"rimraf": "^3.0.2" | ||
}, | ||
@@ -57,0 +56,0 @@ "eslintConfig": { |
@@ -74,3 +74,3 @@ # broccoli-replace | ||
match: 'timestamp', | ||
replacement: new Date().getTime() | ||
replacement: Date.now() | ||
} | ||
@@ -137,3 +137,3 @@ ] | ||
match: 'timestamp', | ||
replacement: new Date().getTime() | ||
replacement: Date.now() | ||
} | ||
@@ -167,3 +167,3 @@ ] | ||
match: 'timestamp', | ||
replacement: new Date().getTime() | ||
replacement: Date.now() | ||
} | ||
@@ -223,3 +223,3 @@ ] | ||
match: /(\w+)\s(\w+)/, | ||
replacement: '$2, $1' // Replaces "John Smith" to "Smith, John" | ||
replacement: '$2, $1' // Replaces "John Smith" with "Smith, John" | ||
} | ||
@@ -226,0 +226,0 @@ ] |
8
8297
22