svizzle
svizzle copied to clipboard
/utils: add all missing `String` generics
-
investigate which functions of [1] are not covered by functions accepting iterables in
lamb
or@svizzle/utils
-
for those having a correspondent function in
@svizzle/utils
[2], make sure they have@see
pointing to the correspondentString
method -
provide the missing ones as generics (
e.g. toLowerCase
) with tests as usual so that we can see how they work
-
-
for all of them, make sure their name explicitly refer to a string input (e.g.
split
seems too generic)
(if needed, split this task in 2+ PRs)
[1] Possibly missing String
generics
String.prototype.charAt()
String.prototype.charCodeAt()
String.prototype.codePointAt()
String.prototype.concat()
String.fromCharCode()
String.fromCodePoint()
String.prototype.includes()
String.prototype.indexOf()
String.prototype.lastIndexOf()
String.prototype.localeCompare()
String.prototype.match()
String.prototype.matchAll()
String.prototype.normalize()
String.prototype.padEnd()
String.prototype.padStart()
String.raw()
String.prototype.repeat()
String.prototype.replace()
String.prototype.replaceAll()
String.prototype.search()
String.prototype.slice()
String.prototype.substring()
String.prototype.toLocaleLowerCase()
String.prototype.toLocaleUpperCase()
String.prototype.toLowerCase()
String.prototype.toString()
String.prototype.toUpperCase()
String.prototype.trimEnd()
String.prototype.trimStart()
String.prototype.valueOf()
[2] Existing String
generics
method | current name | new name |
---|---|---|
String.prototype.endsWith | endsWith | stringEndsWith |
String.prototype.slice | slice | sliceString |
String.prototype.split | split | splitString |
String.prototype.startsWith | startsWith | stringStartsWith |
String.prototype.trim | trim | trimString |