botbuilder-stdlib
Advanced tools
Comparing version 4.13.6-internal.rc0 to 4.14.0-internal
@@ -244,2 +244,11 @@ import { NewableError } from './assertExt'; | ||
/** | ||
* Test if `val` is of type `string` with zero length or `Nil`. | ||
* | ||
* @remarks | ||
* Implementation of string.IsNullOrEmpty(): https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netcore-3.1 | ||
* @param {any} val value to test | ||
* @returns {boolean} true if `val` is of `string` with zero length or `Nil` | ||
*/ | ||
declare function isStringNullOrEmpty(val: unknown): val is Maybe<string>; | ||
/** | ||
* Assert that `val` is of type `string`. | ||
@@ -352,2 +361,3 @@ * | ||
isString: typeof isString; | ||
isStringNullOrEmpty: typeof isStringNullOrEmpty; | ||
isUnknown: typeof isUnknown; | ||
@@ -354,0 +364,0 @@ isError: typeof isError; |
@@ -244,2 +244,11 @@ import { NewableError } from './assertExt'; | ||
/** | ||
* Test if `val` is of type `string` with zero length or `Nil`. | ||
* | ||
* @remarks | ||
* Implementation of string.IsNullOrEmpty(): https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netcore-3.1 | ||
* @param {any} val value to test | ||
* @returns {boolean} true if `val` is of `string` with zero length or `Nil` | ||
*/ | ||
declare function isStringNullOrEmpty(val: unknown): val is Maybe<string>; | ||
/** | ||
* Assert that `val` is of type `string`. | ||
@@ -352,2 +361,3 @@ * | ||
isString: typeof isString; | ||
isStringNullOrEmpty: typeof isStringNullOrEmpty; | ||
isUnknown: typeof isUnknown; | ||
@@ -354,0 +364,0 @@ isError: typeof isError; |
@@ -340,2 +340,13 @@ "use strict"; | ||
/** | ||
* Test if `val` is of type `string` with zero length or `Nil`. | ||
* | ||
* @remarks | ||
* Implementation of string.IsNullOrEmpty(): https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netcore-3.1 | ||
* @param {any} val value to test | ||
* @returns {boolean} true if `val` is of `string` with zero length or `Nil` | ||
*/ | ||
function isStringNullOrEmpty(val) { | ||
return exports.tests.isNil(val) || (exports.tests.isString(val) && !val.length); | ||
} | ||
/** | ||
* Assert that `val` is of type `string`. | ||
@@ -491,2 +502,3 @@ * | ||
isString, | ||
isStringNullOrEmpty, | ||
isUnknown, | ||
@@ -493,0 +505,0 @@ isError, |
@@ -5,3 +5,3 @@ { | ||
"description": "BotBuilder shared libraries, internal only", | ||
"version": "4.13.6-internal.rc0", | ||
"version": "4.14.0-internal", | ||
"internal": true, | ||
@@ -20,2 +20,3 @@ "license": "MIT", | ||
"clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", | ||
"depcheck": "depcheck --config ../../.depcheckrc", | ||
"lint": "eslint . --ext .js,.ts", | ||
@@ -22,0 +23,0 @@ "postbuild": "downlevel-dts lib _ts3.4/lib", |
@@ -394,2 +394,14 @@ // Copyright (c) Microsoft Corporation. | ||
/** | ||
* Test if `val` is of type `string` with zero length or `Nil`. | ||
* | ||
* @remarks | ||
* Implementation of string.IsNullOrEmpty(): https://docs.microsoft.com/en-us/dotnet/api/system.string.isnullorempty?view=netcore-3.1 | ||
* @param {any} val value to test | ||
* @returns {boolean} true if `val` is of `string` with zero length or `Nil` | ||
*/ | ||
function isStringNullOrEmpty(val: unknown): val is Maybe<string> { | ||
return tests.isNil(val) || (tests.isString(val) && !val.length); | ||
} | ||
/** | ||
* Assert that `val` is of type `string`. | ||
@@ -557,2 +569,3 @@ * | ||
isString, | ||
isStringNullOrEmpty, | ||
isUnknown, | ||
@@ -559,0 +572,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
112818
2636