@frsource/frs-replace 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/types.d.ts +0 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -245,15 +245,15 @@ const result = sync({
|
|
|
245
245
|
|
|
246
246
|
| Rank | Library | Average latency [ms] | Difference percentage (comparing to best average latency) |
|
|
247
247
|
| ---- | ----------------------------- | -------------------- | ----------------------------------------------------------------------------- |
|
|
248
|
-
| 1 | @frsource/frs-replace (sync) | 0.
|
|
249
|
-
| 2 | replace-in-file (sync) | 0.
|
|
250
|
-
| 3 | @frsource/frs-replace (async) | 1.
|
|
251
|
-
| 4 | replace-in-file (async) | 3.
|
|
248
|
+
| 1 | @frsource/frs-replace (sync) | 0.46 ± 1.06% | +0.00% |
|
|
249
|
+
| 2 | replace-in-file (sync) | 0.81 ± 1.37% | +78.29% |
|
|
250
|
+
| 3 | @frsource/frs-replace (async) | 1.82 ± 1.18% | +300.19% |
|
|
251
|
+
| 4 | replace-in-file (async) | 3.15 ± 1.33% | +591.39% |
|
|
252
252
|
|
|
253
253
|
### input & replacement as strings
|
|
254
254
|
|
|
255
255
|
| Rank | Library | Average latency [ms] | Difference percentage (comparing to best average latency) |
|
|
256
256
|
| ---- | ----------------------------- | -------------------- | ----------------------------------------------------------------------------- |
|
|
257
|
-
| 1 | @frsource/frs-replace (sync) | 0.01 ± 0.
|
|
258
|
-
| 2 | @frsource/frs-replace (async) | 0.01 ± 0.
|
|
259
|
-
| 3 | replaceString | 0.18 ± 0.
|
|
257
|
+
| 1 | @frsource/frs-replace (sync) | 0.01 ± 0.28% | +0.00% |
|
|
258
|
+
| 2 | @frsource/frs-replace (async) | 0.01 ± 0.27% | +11.43% |
|
|
259
|
+
| 3 | replaceString | 0.18 ± 0.93% | +2171.86% |
|
package/dist/types.d.ts
CHANGED
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Args } from './types.js';
|
|
2
2
|
export declare const writeError: (msg: string) => never;
|
|
3
|
-
export declare const getReplaceFn: (needle: Args[
|
|
3
|
+
export declare const getReplaceFn: (needle: Args["needle"], replacement: string) => (content: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frsource/frs-replace",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Simple wrapper around javascript replace with CLI usage support!",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frs-replace": "./bin/cli.mjs"
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"clean": "rimraf dist"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@frsource/eslint-config": "1.
|
|
65
|
-
"@frsource/prettier-config": "1.
|
|
64
|
+
"@frsource/eslint-config": "1.33.0",
|
|
65
|
+
"@frsource/prettier-config": "1.21.0",
|
|
66
66
|
"@frsource/semantic-release-config": "^1.35.0",
|
|
67
67
|
"@semantic-release/changelog": "^6.0.3",
|
|
68
68
|
"@semantic-release/commit-analyzer": "^12.0.0",
|