Skip to content

Fixed typo in master#30

Open
sghiassy wants to merge 2 commits intoazaslavsky:masterfrom
sghiassy:master
Open

Fixed typo in master#30
sghiassy wants to merge 2 commits intoazaslavsky:masterfrom
sghiassy:master

Conversation

@sghiassy
Copy link

Small bug in README.md cost me a couple mins; thought I'd post the update to help others.

Thanks for the project!

README.md Outdated
#### domJSON.toJSON(node, [opts]) ⇒ <code>Object</code> \| <code>string</code>
Take a DOM node and convert it to simple object literal (or JSON string) with no circular references and no functions or events

| Param | Type | Description |
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have my code editor to prettify on save - hope these changes don't bother.

screen shot 2018-08-12 at 11 05 15 am

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly did you change here? It just seems like you prettified the text and that's it, or am I missing something?

var someDOMElement = document.getElementById('sampleId');
var jsonOutput = domJSON.toJSON(myDiv);
let someDOMElement = document.getElementById('sampleId');
let jsonOutput = domJSON.toJSON(someDOMElement);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main change of the PR is just to change myDiv to someDOMElement.

Also, changed var to let to encourage "immutability by default". Perhaps too preachy??

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer to keep it var since the rest of the code is written in ES5 (this is an ooooold library ;)). But nice catch on the myDiv typo!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.349% when pulling 35db31f on sghiassy:master into 1ebdaf4 on azaslavsky:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants