Skip to content

Commit

Permalink
func -> function
Browse files Browse the repository at this point in the history
  • Loading branch information
Reverier-Xu committed Mar 16, 2023
1 parent dd07b1f commit 21e49f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -10,7 +10,7 @@ const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'u

const isTerminalApp = isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';
const isWindows = isBrowser && process.platform === 'win32';
const cwdFunc = isBrowser ? () => {
const cwdFunction = isBrowser ? () => {
throw new Error('`process.cwd()` only works in Node.js, not the browser.');
} : process.cwd;

Expand Down Expand Up @@ -133,7 +133,7 @@ ansiEscapes.image = (buffer, options = {}) => {
};

ansiEscapes.iTerm = {
setCwd: (cwd = cwdFunc()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,

annotation(message, options = {}) {
let returnValue = `${OSC}1337;`;
Expand Down

0 comments on commit 21e49f7

Please sign in to comment.