15 lines
391 B
TypeScript
15 lines
391 B
TypeScript
![]() |
export const StringExtensions = () => {
|
||
|
if ("".isEmpty === undefined) {
|
||
|
// eslint-disable-next-line no-extend-native
|
||
|
String.prototype.isEmpty = function () {
|
||
|
return this.length === 0;
|
||
|
};
|
||
|
}
|
||
|
if ("".isNotEmpty === undefined) {
|
||
|
// eslint-disable-next-line no-extend-native
|
||
|
String.prototype.isNotEmpty = function () {
|
||
|
return this.length !== 0;
|
||
|
};
|
||
|
}
|
||
|
};
|