.toString()?
See original GitHub issuePerhaps it would be cool to include a proper .toString()
method - I’ve found it quite useful when debugging in other packages. Right now it has the following behavior:
const bel = require('bel')
const tree = bel`<div>hello world</div>`
console.log(tree.toString())
// => <div></div>
Thanks!
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Object.prototype.toString() - JavaScript - MDN Web Docs
The toString() method returns a string representing the object. This method is meant to be overridden by derived objects for custom type ...
Read more >JavaScript String toString() Method - W3Schools
The toString() method returns a string as a string. The toString() method does not change the original string. The toString() method can be...
Read more >How to use the toString() in Java - Educative.io
A toString() is an in-built method in Java that returns the value given to it in string format. Hence, any object that this...
Read more >Understanding toString() method - Javatpoint
If you want to represent any object as a string, toString() method comes into existence. The toString() method returns the String representation of...
Read more >JavaScript Number toString() Method - GeeksforGeeks
The JavaScript Number toString() Method in Javascript is used with a number and converts the number to a string.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🎉
Re: child node traversal, I noticed this afternoon that text nodes weren’t working and did some digging. The issue there is that bel expects text nodes to have a
nodeName
set, which in browsers is'#text'
, but in min-document this is currently unset.I’ve opened a pull request on min-document to add this: https://github.com/Raynos/min-document/pull/37