Sha256: 0cb4a3386c7d8d705efbf677cee6715089963a6957c9121dfb848dff0871fa43
Contents?: true
Size: 316 Bytes
Versions: 29
Compression:
Stored size: 316 Bytes
Contents
'use strict'; var indexOf = String.prototype.indexOf, slice = String.prototype.slice; module.exports = function (search, replace) { var index = indexOf.call(this, search); if (index === -1) return String(this); return slice.call(this, 0, index) + replace + slice.call(this, index + String(search).length); };
Version data entries
29 entries across 19 versions & 7 rubygems