@battis/typescript-tricks 0.8.1 → 0.8.2
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/CHANGELOG.md +7 -0
- package/dist/String.d.ts +3 -0
- package/dist/String.js +10 -0
- package/dist/TypeJuggling.d.ts +0 -1
- package/dist/TypeJuggling.js +0 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.8.2](https://github.com/battis/typescript-config/compare/typescript-tricks/0.8.1...typescript-tricks/0.8.2) (2026-03-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* isNonEmptyString() & NonEmptyString ([06cd18c](https://github.com/battis/typescript-config/commit/06cd18c4528e1efc1e9c78c60861fb8c9aef308f))
|
|
11
|
+
|
|
5
12
|
## [0.8.1](https://github.com/battis/typescript-config/compare/typescript-tricks/0.8.0...typescript-tricks/0.8.1) (2026-03-10)
|
|
6
13
|
|
|
7
14
|
|
package/dist/String.d.ts
ADDED
package/dist/String.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNonEmptyString = isNonEmptyString;
|
|
4
|
+
exports.isString = isString;
|
|
5
|
+
function isNonEmptyString(value) {
|
|
6
|
+
return !!value && typeof value === 'string' && value.length > 0;
|
|
7
|
+
}
|
|
8
|
+
function isString(obj) {
|
|
9
|
+
return typeof obj === 'string';
|
|
10
|
+
}
|
package/dist/TypeJuggling.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export type OneOf<T extends object[]> = {
|
|
|
8
8
|
[K in keyof T]: Expand<T[K] & Partial<Record<Exclude<UnionKeys<T[number]>, keyof T[K]>, never>>>;
|
|
9
9
|
}[number];
|
|
10
10
|
export declare function isUnknown(obj: unknown): obj is unknown;
|
|
11
|
-
export declare function isString(obj: unknown): obj is string;
|
|
12
11
|
/**
|
|
13
12
|
* Caution: if an object may be a generator (in which case obj.iterator returns
|
|
14
13
|
* `this`), it will be consumed
|
package/dist/TypeJuggling.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isUnknown = isUnknown;
|
|
4
|
-
exports.isString = isString;
|
|
5
4
|
exports.isIterable = isIterable;
|
|
6
5
|
function isUnknown(obj) {
|
|
7
6
|
return true;
|
|
8
7
|
}
|
|
9
|
-
function isString(obj) {
|
|
10
|
-
return typeof obj === 'string';
|
|
11
|
-
}
|
|
12
8
|
/**
|
|
13
9
|
* Caution: if an object may be a generator (in which case obj.iterator returns
|
|
14
10
|
* `this`), it will be consumed
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,5 +22,6 @@ __exportStar(require("./Methods"), exports);
|
|
|
22
22
|
__exportStar(require("./Object"), exports);
|
|
23
23
|
__exportStar(require("./Properties"), exports);
|
|
24
24
|
__exportStar(require("./Record"), exports);
|
|
25
|
+
__exportStar(require("./String"), exports);
|
|
25
26
|
__exportStar(require("./TypeJuggling"), exports);
|
|
26
27
|
__exportStar(require("./_Deprecated"), exports);
|
package/package.json
CHANGED