Code Monkey home page Code Monkey logo

Comments (10)

Alorel avatar Alorel commented on June 14, 2024

Hey.

I know - I never had to use more than one parameter in the past so my mind just skipped it when I wrote this little lib and unfortunately I don't have time to update it due to other commitments. I'm very happy to merge any changes into master if you're willing to change a few lines in the code, though!

from console-log-html.

ulrichb avatar ulrichb commented on June 14, 2024

What should we do with the onlyConsole-parameter?

  • Should we drop it?
  • Should we add console.logOnlyToConsole()/infoOnlyToConsole()/... functions next to console.log()/info()/...? I think this would be OK because all callers, which call console.log() with onlyConsole=true already have to know about ConsoleLogHTML and then it's also OK that they call another function. Further it improves readability in contrast a an unnamed true-argument.
  • Another possibility is to use a "magic option" like console.log("a bool:", true, {_logOnlyToConsole: true}).

I would prefer option 1, and if we really need this feature option 2.

Note that this has to be a breaking change in any case because atm. console.log("str", true) is ambiguous.

from console-log-html.

Alorel avatar Alorel commented on June 14, 2024

Option 1 seems much less cluttered, so I would be in favour of using it as well and it's perfectly fine that changes are breaking; we would state this breaking change clearly in the changelog and release it as 2.0.

from console-log-html.

ulrichb avatar ulrichb commented on June 14, 2024

So you mean we should not drop it, and instead add logOnlyToConsole()/infoOnlyToConsole()/.... Is the name OK for you?

from console-log-html.

Alorel avatar Alorel commented on June 14, 2024

Yes, perfect. And thank you for taking the time to contribute.

from console-log-html.

ulrichb avatar ulrichb commented on June 14, 2024

Oh. Another option would be console.skipHtml.log()/.info()/...
I'm asking because it's a bit strange to say "OnlyToConsole" on an operation on console ...

from console-log-html.

Alorel avatar Alorel commented on June 14, 2024

This format sounds even better. In the end all that will need to be done is npm run dist and all the testing, minification & documentation will be generated.

from console-log-html.

ulrichb avatar ulrichb commented on June 14, 2024

OK. Let's see how console.skipHtml.log() works out ...

from console-log-html.

ulrichb avatar ulrichb commented on June 14, 2024

"skipHtml" to be discussed ...

from console-log-html.

Alorel avatar Alorel commented on June 14, 2024

Resolved as per #2 and #3

from console-log-html.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.