File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
lib/node_modules/@stdlib/string/base/replace-after/lib Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change 20
20
21
21
// MODULES //
22
22
23
- var isString = require ( '@stdlib/assert/is-string' ) . isPrimitive ;
24
- var isInteger = require ( '@stdlib/assert/is-integer' ) . isPrimitive ;
25
- var format = require ( '@stdlib/string/format' ) ;
26
-
27
-
28
23
// MAIN //
29
24
30
25
/**
@@ -66,19 +61,7 @@ var format = require( '@stdlib/string/format' );
66
61
*/
67
62
function replaceAfter ( str , replacement , search , fromIndex ) {
68
63
var idx ;
69
- if ( ! isString ( str ) ) {
70
- throw new TypeError ( format ( 'invalid argument. First argument must be a string. Value: `%s`.' , str ) ) ;
71
- }
72
- if ( ! isString ( replacement ) ) {
73
- throw new TypeError ( format ( 'invalid argument. Second argument must be a string. Value: `%s`.' , replacement ) ) ;
74
- }
75
- if ( ! isString ( search ) ) {
76
- throw new TypeError ( format ( 'invalid argument. Third argument must be a string. Value: `%s`.' , search ) ) ;
77
- }
78
64
if ( arguments . length > 3 ) {
79
- if ( ! isInteger ( fromIndex ) ) {
80
- throw new TypeError ( format ( 'invalid argument. Fourth argument must be an integer. Value: `%s`.' , fromIndex ) ) ;
81
- }
82
65
idx = str . indexOf ( search , fromIndex ) ;
83
66
} else {
84
67
idx = str . indexOf ( search ) ;
You can’t perform that action at this time.
0 commit comments