Comments (10)
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.
What should we do with the onlyConsole
-parameter?
- Should we drop it?
- Should we add
console.logOnlyToConsole()/infoOnlyToConsole()/...
functions next toconsole.log()/info()/...
? I think this would be OK because all callers, which callconsole.log()
withonlyConsole=true
already have to know aboutConsoleLogHTML
and then it's also OK that they call another function. Further it improves readability in contrast a an unnamedtrue
-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.
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.
So you mean we should not drop it, and instead add logOnlyToConsole()/infoOnlyToConsole()/...
. Is the name OK for you?
from console-log-html.
Yes, perfect. And thank you for taking the time to contribute.
from console-log-html.
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.
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.
OK. Let's see how console.skipHtml.log()
works out ...
from console-log-html.
"skipHtml" to be discussed ...
from console-log-html.
from console-log-html.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from console-log-html.