@dereekb/util 13.10.0 → 13.10.1
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/fetch/index.cjs.js +4 -2
- package/fetch/index.esm.js +4 -2
- package/fetch/package.json +3 -3
- package/index.cjs.js +191 -60
- package/index.esm.js +189 -60
- package/package.json +5 -5
- package/src/lib/function/function.d.ts +1 -1
- package/src/lib/object/object.filter.pojo.d.ts +10 -0
- package/src/lib/string/mimetype.d.ts +1 -1
- package/src/lib/string/url.d.ts +3 -1
- package/test/index.cjs.js +1 -0
- package/test/index.esm.js +1 -0
- package/test/package.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/util",
|
|
3
|
-
"version": "13.10.
|
|
3
|
+
"version": "13.10.1",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./test": {
|
|
6
6
|
"module": "./test/index.esm.js",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"extra-set": "^3.
|
|
26
|
+
"extra-set": "^3.2.3",
|
|
27
27
|
"fast-content-type-parse": "^3.0.0",
|
|
28
|
-
"make-error": "^1.3.
|
|
29
|
-
"ts-essentials": "^10.
|
|
28
|
+
"make-error": "^1.3.6",
|
|
29
|
+
"ts-essentials": "^10.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"date-fns": "4.
|
|
32
|
+
"date-fns": "4.1.0"
|
|
33
33
|
},
|
|
34
34
|
"module": "./index.esm.js",
|
|
35
35
|
"main": "./index.cjs.js",
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { type ArrayOrValue } from './../array/array';
|
|
2
2
|
import { type Maybe } from '../value/maybe.type';
|
|
3
3
|
import { type FilterKeyValueTuplesInput, type KeyValueTuple, type KeyValueTupleFilter, KeyValueTypleValueFilter } from './object.filter.tuple';
|
|
4
|
+
/**
|
|
5
|
+
* Strips the input object. If the object has no keys after the filtering process, returns undefined.
|
|
6
|
+
*/
|
|
7
|
+
export type StripObjectFunction<T extends object> = (input: Maybe<T>, copy?: Maybe<boolean>) => T | undefined;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param input
|
|
11
|
+
*/
|
|
12
|
+
export declare function stripObjectFunction<T extends object>(filter: FilterKeyValueTuplesInput<T>, copy?: boolean): StripObjectFunction<T>;
|
|
13
|
+
export declare function stripObject<T extends object>(input: Maybe<T>, copy?: boolean): T | undefined;
|
|
4
14
|
/**
|
|
5
15
|
* Assigns all non-filtered values from one or more source objects into the target object.
|
|
6
16
|
*
|
|
@@ -223,4 +223,4 @@ export declare function fileExtensionForMimeType(mimeType: Maybe<MimeTypeWithout
|
|
|
223
223
|
*
|
|
224
224
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Disposition
|
|
225
225
|
*/
|
|
226
|
-
export type ContentDispositionString = 'inline' | 'attachment' | string;
|
|
226
|
+
export type ContentDispositionString = 'inline' | 'attachment' | (string & {});
|
package/src/lib/string/url.d.ts
CHANGED
|
@@ -46,7 +46,9 @@ export declare function isKnownHttpWebsiteProtocol(input: string): input is Know
|
|
|
46
46
|
*/
|
|
47
47
|
export type WebsiteDomain = string;
|
|
48
48
|
/**
|
|
49
|
-
* Simple website domain regex that looks for a period in the string between the domain and the tld
|
|
49
|
+
* Simple website domain regex that looks for a period in the string between the domain and the tld.
|
|
50
|
+
*
|
|
51
|
+
* Anchored character-class form prevents catastrophic backtracking on inputs without a period.
|
|
50
52
|
*/
|
|
51
53
|
export declare const HAS_WEBSITE_DOMAIN_NAME_REGEX: RegExp;
|
|
52
54
|
/**
|
package/test/index.cjs.js
CHANGED
|
@@ -937,6 +937,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
937
937
|
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
938
938
|
}
|
|
939
939
|
function _instanceof(left, right) {
|
|
940
|
+
"@swc/helpers - instanceof";
|
|
940
941
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
941
942
|
return !!right[Symbol.hasInstance](left);
|
|
942
943
|
} else {
|
package/test/index.esm.js
CHANGED
|
@@ -935,6 +935,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
935
935
|
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
936
936
|
}
|
|
937
937
|
function _instanceof(left, right) {
|
|
938
|
+
"@swc/helpers - instanceof";
|
|
938
939
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
939
940
|
return !!right[Symbol.hasInstance](left);
|
|
940
941
|
} else {
|
package/test/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/util/test",
|
|
3
|
-
"version": "13.10.
|
|
3
|
+
"version": "13.10.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/util": "13.10.
|
|
6
|
-
"make-error": "^1.3.
|
|
5
|
+
"@dereekb/util": "13.10.1",
|
|
6
|
+
"make-error": "^1.3.6"
|
|
7
7
|
},
|
|
8
8
|
"exports": {
|
|
9
9
|
"./package.json": "./package.json",
|