I have normally seen JS replace() with 2 parameters
The replace method you've seen was probably the string's one.
My educated guess is that records is not a string, then.
So, you should check what's records actually is. The method is not part of JS language, so it's either records an Object defined by the dev, or is extending the prototype of some built-in type (brrr).
To me, it looks like this method shared similarity with array's splice
If records is an array, on an array-like object, the developer could actually added replace as alias of splice, maybe because it seemed to him more clear about what it does (again, I'm just guessing, I don't have enough data).
If my guess is correct, this line would replace in the records array / array-like, 1 element, at the index pointed by index, with the value returned by this.get(…).
str.replace(regexp|substr, newSubstr|function)records?records? String? Array? Something completely different? Give us come context, without more information this is difficult to answer.replacemethod by default. What libraries/frameworks are you using?