You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importfigures,{replaceSymbols,mainSymbols,fallbackSymbols}from'figures';console.log(figures.tick);// On terminals with Unicode symbols: ✔︎// On other terminals: √console.log(figures.mainSymbols.tick);// On all terminals: ✔︎console.log(figures.fallbackSymbols.tick);// On all terminals: √console.log(figures.replaceSymbols('✔︎ check'));// On terminals with Unicode symbols: ✔︎ check// On other terminals: √ check`
Report bug
PS C:\Users\shish\code\command-tools> node ./bin/index.js
✔
file:///C:/Users/shish/code/command-tools/bin/index.js:7
console.log(figures.mainSymbols.tick);
^
TypeError: Cannot read properties of undefined (reading 'tick')
at file:///C:/Users/shish/code/command-tools/bin/index.js:7:33
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) `
The text was updated successfully, but these errors were encountered:
Thanks a lot for pointing this out. Those are typos in the README.md. I have opened #96 to fix them.
replaceSymbols, mainSymbols, fallbackSymbols should use named imports, not the default import. The following should work:
importfigures,{replaceSymbols,mainSymbols,fallbackSymbols}from'figures';console.log(figures.tick);// On terminals with Unicode symbols: ✔︎// On other terminals: √console.log(mainSymbols.tick);// On all terminals: ✔︎console.log(fallbackSymbols.tick);// On all terminals: √console.log(replaceSymbols('✔︎ check'));// On terminals with Unicode symbols: ✔︎ check// On other terminals: √ check`
when I try to run example , it hanppen a bug.
Code
Report bug
The text was updated successfully, but these errors were encountered: