File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ export interface AnsiChain extends Chain<AnsiChain> {
1111 /** Get ansi escape sequence. */
1212 ( ) : string ;
1313
14- /** Get ansi escape sequence . */
14+ /** Get ansi escape sequences as string . */
1515 toString ( ) : string ;
1616
17- /** Get ansi escape sequence as Uint8Array . */
18- toBuffer ( ) : Uint8Array ;
17+ /** Get ansi escape sequences as bytes . */
18+ bytes ( ) : Uint8Array ;
1919}
2020
2121/** Create new `Ansi` instance. */
@@ -47,7 +47,7 @@ export type Ansi = AnsiFactory & AnsiChain;
4747 * import { ansi } from "./mod.ts";
4848 *
4949 * await Deno.stdout.write(
50- * ansi.cursorTo(0, 0).eraseScreen.toBuffer (),
50+ * ansi.cursorTo(0, 0).eraseScreen.bytes (),
5151 * );
5252 * ```
5353 */
@@ -89,7 +89,7 @@ function factory(): Ansi {
8989 return this . toArray ( ) . join ( "" ) ;
9090 } ;
9191
92- ansi . toBuffer = function ( ) : Uint8Array {
92+ ansi . bytes = function ( ) : Uint8Array {
9393 return encoder . encode ( this . toString ( ) ) ;
9494 } ;
9595
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ Deno.test({
3232 . text ( "FOO" )
3333 . eraseDown
3434 . cursorHide
35- . toBuffer ( ) ,
35+ . bytes ( ) ,
3636 ) ,
3737 "\x1B[2;3HFOO\x1B[0J\x1B[?25l" ,
3838 ) ;
You can’t perform that action at this time.
0 commit comments