Skip to content

Commit 10b02d2

Browse files
author
Sven Ulrich
committed
updatedeps: remove undefined from isNullOrWhiteSpace
1 parent dbb525b commit 10b02d2

File tree

3 files changed

+72
-3
lines changed

3 files changed

+72
-3
lines changed

index.d.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
export declare const empty = "";
2+
export declare function isNullOrWhiteSpace(value: string | null | undefined): boolean;
3+
export declare function join(delimiter: string, ...args: (string | object | Array<any>)[]): string;
4+
export declare function format(format: string, ...args: any[]): string;
5+
export declare class String {
6+
private static readonly regexNumber;
7+
private static readonly regexObject;
8+
static empty: string;
9+
/**
10+
* @deprecated The property should not be used, and will be removed in future versions! Use `String.empty` instead.
11+
*/
12+
static Empty: string;
13+
/**
14+
* @deprecated The method should not be used, and will be removed in future versions! Use `String.isNullOrWhiteSpace()` instead.
15+
*/
16+
static IsNullOrWhiteSpace(value: string | null | undefined): boolean;
17+
/**
18+
* @deprecated The method should not be used, and will be removed in future versions! Use `String.join()` instead.
19+
*/
20+
static Join(delimiter: string, ...args: (string | object | Array<any>)[]): string;
21+
/**
22+
* @deprecated The method should not be used, and will be removed in future version!s Use `String.format()` instead.
23+
*/
24+
static Format(format: string, ...args: any[]): string;
25+
static isNullOrWhiteSpace(value: string | null | undefined): boolean;
26+
static join(delimiter: string, ...args: (string | object | Array<any>)[]): string;
27+
static format(format: string, ...args: any[]): string;
28+
private static formatString;
29+
private static parsePattern;
30+
private static decimalToHexString;
31+
private static getDisplayDateFromString;
32+
private static getSortableDateFromString;
33+
private static formatNumber;
34+
private static joinString;
35+
}
36+
export declare class StringBuilder {
37+
Values: string[];
38+
constructor(value?: string);
39+
toString(): string;
40+
/**
41+
* @deprecated The method should not be used, and will be removed in future versions! Use `toString()` instead.
42+
*/
43+
ToString(): string;
44+
append(value: string): void;
45+
/**
46+
* @deprecated The method should not be used, and will be removed in future versions! Use `append()` instead.
47+
*/
48+
Append(value: string): void;
49+
appendLine(value: string): void;
50+
/**
51+
* @deprecated The method should not be used, and will be removed in future versions! Use `appendLine()` instead.
52+
*/
53+
AppendLine(value: string): void;
54+
appendFormat(format: string, ...args: any[]): void;
55+
/**
56+
* @deprecated The method should not be used, and will be removed in future versions! Use `appendFormat()` instead.
57+
*/
58+
AppendFormat(format: string, ...args: any[]): void;
59+
appendLineFormat(format: string, ...args: any[]): void;
60+
/**
61+
* @deprecated The method should not be used, and will be removed in future versions! Use `appendLineFormat()` instead.
62+
*/
63+
AppendLineFormat(format: string, ...args: any[]): void;
64+
clear(): void;
65+
/**
66+
* @deprecated The method should not be used, and will be removed in future versions! Use `clear()` instead.
67+
*/
68+
Clear(): void;
69+
}

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const EOL = '\r\n';
22

33
export const empty = '';
44

5-
export function isNullOrWhiteSpace(value: string | null | undefined): boolean {
5+
export function isNullOrWhiteSpace(value: string | null): boolean {
66
return String.isNullOrWhiteSpace(value);
77
}
88

@@ -44,7 +44,7 @@ export class String {
4444
return String.format(format, ...args);
4545
}
4646

47-
public static isNullOrWhiteSpace(value: string | null | undefined): boolean {
47+
public static isNullOrWhiteSpace(value: string | null): boolean {
4848
try {
4949
if (value == null || value == 'undefined') {
5050
return true;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-string-operations",
3-
"version": "1.5.0",
3+
"version": "1.5.0-rc.12",
44
"description": "Simple lightweight string operation library for Typescript, works with Angular",
55
"main": "dist/index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)