react-bootstrap / dom-helpers

tiny, extremely modular, DOM helper library for IE9+
MIT License
404 stars 65 forks source link

Adding new helper methods to the library #167

Closed marcospont closed 3 years ago

marcospont commented 3 years ago

Hello!

A while back, I've wrote you an email about my intentions to offer some contributions to this package.

This PR contains the helpers that I had in my extensions of the library that I personally consider to be more helpful. They can actually offer reusable features other than just adding an extra layer on the call stack.

Hope you can review these changes and give your inputs about them.

I know that size matters and the original goal was to keep this library as short as possible. Hoping this extension proposal doesn't exceed the acceptable size threshold.

Thanks!

jquense commented 3 years ago

yeah sorry. Comments like these: https://github.com/react-restart/hooks/blob/master/src/usePrevious.ts basically just a quick description on what it does and/or how to use it. These comments show up in intellisense overlays in text editors like vscode. I guess technically the standard is https://tsdoc.org/ but it's not important to be very thorough or use all the tags. It's basically jsdoc light

marcospont commented 3 years ago

Hey, @jquense

I have added doc comments to all the new methods and also for most of the existing nodes (except the ones I wasn't secure on how to document them). Also, I have renamed children to childElements and added a new helper to get or set element attributes.

Can u please review it again? Tks.