Skip to content

Updated ReadMe.MD to have better commenting on the usage.#14

Open
cahilltr wants to merge 1 commit intoSage:masterfrom
cahilltr:updateDocumentationToClearifyCreatingAStringVsAnObject
Open

Updated ReadMe.MD to have better commenting on the usage.#14
cahilltr wants to merge 1 commit intoSage:masterfrom
cahilltr:updateDocumentationToClearifyCreatingAStringVsAnObject

Conversation

@cahilltr
Copy link

Added comments to the usage examples to help a user understand what each function does. Figuring this out took me a little longer than it should have (due to my unfamiliarity with JavaScript conventions and it being early for me).

The first comment describes what the stringify() produces.
//Creates a String like '(name'John*20Doeage42children('Mary'Bill))'
str = JSURL.stringify(obj);

The second comment describes what the parse() produces.
//Creates an Object like '{"name":"John Doe","age":42,"children":["Mary","Bill"]}'
obj = JSURL.parse(str);

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant