mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
docs(internal): add module docs (#4757)
This commit is contained in:
parent
a724d90685
commit
1eeb5f9a6f
@ -5,6 +5,35 @@
|
||||
*
|
||||
* Note: this module is for internal use only and should not be used directly.
|
||||
*
|
||||
* ```ts
|
||||
* import { diff, diffstr, buildMessage } from "@std/internal";
|
||||
* import { assertEquals } from "@std/assert/assert-equals";
|
||||
*
|
||||
* const a = [1, 2, 3];
|
||||
* const b = [1, 2, 4];
|
||||
*
|
||||
* assertEquals(diff(a, b), [
|
||||
* { type: "common", value: 1 },
|
||||
* { type: "common", value: 2 },
|
||||
* { type: "removed", value: 3 },
|
||||
* { type: "added", value: 4 },
|
||||
* ]);
|
||||
*
|
||||
* const diffResult = diffstr("Hello, world!", "Hello, world");
|
||||
*
|
||||
* console.log(buildMessage(diffResult));
|
||||
* // [
|
||||
* // "",
|
||||
* // "",
|
||||
* // " [Diff] Actual / Expected",
|
||||
* // "",
|
||||
* // "",
|
||||
* // "- Hello, world!",
|
||||
* // "+ Hello, world",
|
||||
* // "",
|
||||
* // ]
|
||||
* ```
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
export * from "./build_message.ts";
|
||||
|
Loading…
Reference in New Issue
Block a user