@clipboard-health/util-ts 5.7.4 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/strings/index.d.ts +1 -0
- package/src/lib/strings/index.js +1 -0
- package/src/lib/strings/index.js.map +1 -1
- package/src/lib/strings/isNonEmptyString.d.ts +7 -0
- package/src/lib/strings/isNonEmptyString.js +13 -0
- package/src/lib/strings/isNonEmptyString.js.map +1 -0
package/package.json
CHANGED
package/src/lib/strings/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./createDeterministicHash"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./isEmpty"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./isNonEmptyString"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./isString"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./stringify"), exports);
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util-ts/src/lib/strings/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oDAA0B;AAC1B,qDAA2B;AAC3B,sDAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util-ts/src/lib/strings/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oDAA0B;AAC1B,6DAAmC;AACnC,qDAA2B;AAC3B,sDAA4B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guard that checks if a value is a string with at least one character.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The value to check
|
|
5
|
+
* @returns `true` if the value is a non-empty string primitive, `false` otherwise
|
|
6
|
+
*/
|
|
7
|
+
export declare function isNonEmptyString(value: unknown): value is string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNonEmptyString = isNonEmptyString;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard that checks if a value is a string with at least one character.
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to check
|
|
8
|
+
* @returns `true` if the value is a non-empty string primitive, `false` otherwise
|
|
9
|
+
*/
|
|
10
|
+
function isNonEmptyString(value) {
|
|
11
|
+
return typeof value === "string" && value.length > 0;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=isNonEmptyString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNonEmptyString.js","sourceRoot":"","sources":["../../../../../../packages/util-ts/src/lib/strings/isNonEmptyString.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,0BAAiC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC"}
|