Skip to content

Commit 53c2b3d

Browse files
committed
Make clipboard directions explicit
1 parent 2ab8fb5 commit 53c2b3d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pipeline.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { format } from "prettier";
33

44
import { Language, Parser, Preferences } from "./types";
55

6-
const readClipboard = async (): Promise<string> => (await Clipboard.readText()) || "";
6+
const readFromClipboard = async (): Promise<string> => (await Clipboard.readText()) || "";
77

88
const formatCode = (parser: Parser) => {
99
const preferences = getPreferenceValues<Preferences>();
@@ -12,7 +12,7 @@ const formatCode = (parser: Parser) => {
1212
return async (query: string): Promise<string> => format(query, { parser, printWidth });
1313
};
1414

15-
const copyClipboard = async (code: string): Promise<string> => {
15+
const copyToClipboard = async (code: string): Promise<string> => {
1616
await Clipboard.copy(code);
1717
return code;
1818
};
@@ -22,5 +22,5 @@ const wrapWithCodeblock = (language: Language) => {
2222
};
2323

2424
export const pipeline = async (language: Language, parser: Parser): Promise<string> => {
25-
return readClipboard().then(formatCode(parser)).then(copyClipboard).then(wrapWithCodeblock(language));
25+
return readFromClipboard().then(formatCode(parser)).then(copyToClipboard).then(wrapWithCodeblock(language));
2626
};

0 commit comments

Comments
 (0)