@paperbits/common
Version:
Paperbits common components.
18 lines (14 loc) • 349 B
text/typescript
interface String {
replaceAll(search: string, replacement: string): string;
hashCode(): number;
}
interface Array<T> {
remove(item: T): void;
}
Array.prototype.remove = function <T>(item: T): void {
const index = this.indexOf(item);
if (index < 0) {
return;
}
this.splice(index, 1);
};