Skip to content

Commit bfb01a2

Browse files
authored
Apply suggestions from code review
1 parent 02175dc commit bfb01a2

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

lib/node_modules/@stdlib/string/base/replace-after/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,17 @@ var replaceAfter = require( '@stdlib/string/base/replace-after' );
4545
Replaces the substring after the first occurrence of a specified search string.
4646

4747
```javascript
48-
var str = 'beep boop';
49-
var replacement = 'foo';
50-
var out = replaceAfter( str, replacement, 'o' );
48+
var out = replaceAfter( 'beep boop', 'foo', 'o' );
5149
// returns 'beep bofoo'
5250

53-
out = replaceAfter( str, replacement, ' ' );
51+
out = replaceAfter( 'beep boop', 'foo', ' ' );
5452
// returns 'beep foo'
5553
```
5654

57-
By default, the search starts at the beginning of the string. To start searching from a different index, provide a `fromIndex` argument:
55+
By default, the search starts at the beginning of the string. To start searching from a different index, provide a `fromIndex` argument.
5856

5957
```javascript
60-
var str = 'boop baz boop';
61-
var replacement = 'foo';
62-
var out = replaceAfter( str, replacement, 'o', 3 );
58+
var out = replaceAfter( 'boop baz boop', 'foo', 'o', 3 );
6359
// returns 'boop baz bofoo'
6460
```
6561

lib/node_modules/@stdlib/string/base/replace-after/lib/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@
2626
* @example
2727
* var replaceAfter = require( '@stdlib/string/base/replace-after' );
2828
*
29-
* var str = 'beep boop';
30-
* var replacement = 'foo';
31-
* var out = replaceAfter( str, replacement, 'o' );
29+
* var out = replaceAfter( 'beep boop', 'foo', 'o' );
3230
* // returns 'beep bofoo'
3331
*
34-
* out = replaceAfter( str, replacement, ' ' );
32+
* out = replaceAfter( 'beep boop', 'foo', ' ' );
3533
* // returns 'beep foo'
3634
*/
3735

lib/node_modules/@stdlib/string/base/replace-after/lib/main.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
* @param {string} replacement - replacement string
3030
* @param {string} search - search string
3131
* @param {integer} [fromIndex=0] - index at which to start the search
32-
* @throws {TypeError} first argument must be a string
33-
* @throws {TypeError} second argument must be a string
34-
* @throws {TypeError} third argument must be a string
35-
* @throws {TypeError} fourth argument must be an integer
3632
* @returns {string} substring
3733
*
3834
* @example

lib/node_modules/@stdlib/string/base/replace-after/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,3 @@
6666
"match"
6767
]
6868
}
69-

0 commit comments

Comments
 (0)