Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/irandeno/interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
disizali committed Jul 13, 2020
2 parents 44075f0 + 1cb276a commit b09dbb3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/core/logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const encoder = new TextEncoder();

export function encode(input?: string): Uint8Array {
return encoder.encode(input);
}

export const decoder = new TextDecoder();

export function decode(input?: Uint8Array): string {
return decoder.decode(input);
}

export async function write(input: string): Promise<void> {
await Deno.stdout.write(encode(input));
}

0 comments on commit b09dbb3

Please sign in to comment.