ThePix / QuestJS

A major re-write of Quest that is written in JavaScript and will run in the browser.
MIT License
74 stars 16 forks source link

log and debuglog #43

Closed KVonGit closed 3 years ago

KVonGit commented 3 years ago

Hello.

Here's an easy one, and I believe you'll like the idea.

How about including a log and a debuglog (and maybe a parserlog, just to fit the rhyme scheme)?

const log = console.log
const debuglog = (s) => { if(settings.playMode === 'dev' || settings.playMode === 'meta'){ log(s)} }
const parserlog = (s) => { if(parser.debug){ log(s)} }

If not, that's cool, too. It wouldn't hurt my feelings at all.

ThePix commented 3 years ago

Done, because ~i got sick of typing console.log. Some JS purists will say we are polluting the name space, but so be it.