@types/should-format 3.0.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.
- should-format/LICENSE +21 -0
- should-format/README.md +86 -0
- should-format/index.d.ts +67 -0
- should-format/package.json +26 -0
should-format/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
should-format/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @types/should-format`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for should-format (https://github.com/shouldjs/format).
|
|
6
|
+
|
|
7
|
+
# Details
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/should-format.
|
|
9
|
+
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/should-format/index.d.ts)
|
|
10
|
+
````ts
|
|
11
|
+
/**
|
|
12
|
+
* Options for the Formatter.
|
|
13
|
+
*/
|
|
14
|
+
interface FormatterOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Custom function to get keys from an object.
|
|
17
|
+
*/
|
|
18
|
+
keysFunc?: (obj: object) => string[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* If false, uses Object.getOwnPropertyNames instead of Object.keys.
|
|
22
|
+
*/
|
|
23
|
+
keys?: boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Maximum line length before wrapping. Default: 60.
|
|
27
|
+
*/
|
|
28
|
+
maxLineLength?: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Property separator. Default: ','.
|
|
32
|
+
*/
|
|
33
|
+
propSep?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* If true, formats dates in UTC.
|
|
37
|
+
*/
|
|
38
|
+
isUTCdate?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Formatter class for converting values to string representations.
|
|
43
|
+
*/
|
|
44
|
+
declare class Formatter {
|
|
45
|
+
constructor(opts?: FormatterOptions);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Format a value to a string representation.
|
|
49
|
+
* @param value - The value to format
|
|
50
|
+
* @returns Formatted string representation
|
|
51
|
+
*/
|
|
52
|
+
format(value: unknown): string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Default format function that creates a Formatter and formats the value.
|
|
57
|
+
*
|
|
58
|
+
* @param value - The value to format
|
|
59
|
+
* @param opts - Optional formatter options
|
|
60
|
+
* @returns Formatted string representation
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```javascript
|
|
64
|
+
* const format = require('should-format');
|
|
65
|
+
*
|
|
66
|
+
* format({ a: 1, b: 2 }); // => "{ a: 1, b: 2 }"
|
|
67
|
+
* format([1, 2, 3]); // => "[ 1, 2, 3 ]"
|
|
68
|
+
* format(null); // => "null"
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
declare function format(value: unknown, opts?: FormatterOptions): string;
|
|
72
|
+
|
|
73
|
+
declare namespace format {
|
|
74
|
+
export { Formatter, FormatterOptions };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export = format;
|
|
78
|
+
|
|
79
|
+
````
|
|
80
|
+
|
|
81
|
+
### Additional Details
|
|
82
|
+
* Last updated: Thu, 05 Feb 2026 08:45:22 GMT
|
|
83
|
+
* Dependencies: none
|
|
84
|
+
|
|
85
|
+
# Credits
|
|
86
|
+
These definitions were written by [gaspard](https://github.com/gasp).
|
should-format/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for the Formatter.
|
|
3
|
+
*/
|
|
4
|
+
interface FormatterOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Custom function to get keys from an object.
|
|
7
|
+
*/
|
|
8
|
+
keysFunc?: (obj: object) => string[];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* If false, uses Object.getOwnPropertyNames instead of Object.keys.
|
|
12
|
+
*/
|
|
13
|
+
keys?: boolean;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Maximum line length before wrapping. Default: 60.
|
|
17
|
+
*/
|
|
18
|
+
maxLineLength?: number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Property separator. Default: ','.
|
|
22
|
+
*/
|
|
23
|
+
propSep?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* If true, formats dates in UTC.
|
|
27
|
+
*/
|
|
28
|
+
isUTCdate?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Formatter class for converting values to string representations.
|
|
33
|
+
*/
|
|
34
|
+
declare class Formatter {
|
|
35
|
+
constructor(opts?: FormatterOptions);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Format a value to a string representation.
|
|
39
|
+
* @param value - The value to format
|
|
40
|
+
* @returns Formatted string representation
|
|
41
|
+
*/
|
|
42
|
+
format(value: unknown): string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Default format function that creates a Formatter and formats the value.
|
|
47
|
+
*
|
|
48
|
+
* @param value - The value to format
|
|
49
|
+
* @param opts - Optional formatter options
|
|
50
|
+
* @returns Formatted string representation
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```javascript
|
|
54
|
+
* const format = require('should-format');
|
|
55
|
+
*
|
|
56
|
+
* format({ a: 1, b: 2 }); // => "{ a: 1, b: 2 }"
|
|
57
|
+
* format([1, 2, 3]); // => "[ 1, 2, 3 ]"
|
|
58
|
+
* format(null); // => "null"
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare function format(value: unknown, opts?: FormatterOptions): string;
|
|
62
|
+
|
|
63
|
+
declare namespace format {
|
|
64
|
+
export { Formatter, FormatterOptions };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export = format;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@types/should-format",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "TypeScript definitions for should-format",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/should-format",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "gaspard",
|
|
10
|
+
"githubUsername": "gasp",
|
|
11
|
+
"url": "https://github.com/gasp"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"main": "",
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
19
|
+
"directory": "types/should-format"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {},
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"peerDependencies": {},
|
|
24
|
+
"typesPublisherContentHash": "c7b22f2726766f11a11b016f528567787985a43a1474c1cda9e685fae109d5d0",
|
|
25
|
+
"typeScriptVersion": "5.2"
|
|
26
|
+
}
|