-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from zvakanaka/esm
3.0.0 ESM
- Loading branch information
Showing
7 changed files
with
635 additions
and
3,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export type Options = { | ||
method?: string, | ||
headers?: object, | ||
body?: object | string | ||
}; | ||
|
||
export type CurlStringOptions = { | ||
colorJson: boolean, | ||
jsonIndentWidth: number, | ||
} | ||
|
||
/** | ||
* Builds a human readable cURL command and returns the string. | ||
* @param {string} url - JSON object to highlighter. | ||
* @param {Options} [options] - A map with the ANSI characters for each supported color. | ||
* @param {CurlStringOptions} [curlStringOptions] - An object to configure the coloring. | ||
* @returns {string} cURL command | ||
*/ | ||
export default function curlString( | ||
url: string, | ||
options?: Options, | ||
curlStringOptions?: CurlStringOptions, | ||
): string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.