RanvierMUD / core

Core engine code for Ranvier
https://ranviermud.com
MIT License
45 stars 40 forks source link

Add shortcut to find and returns first helpfile matching topics #44

Closed clagiordano closed 5 years ago

clagiordano commented 5 years ago

This PR adds an alternative method to search and returns first helpfile matching topic.

shawncplus commented 5 years ago

I'd prefer the return; to return null;. I try to reserve return; only for void methods but this method's return type is ?string. Also given that the docblock should be

/**
 * @param {string} search
 * @return {?string}
 */
shawncplus commented 5 years ago

Almost, the docblock isn't quite right :)

clagiordano commented 5 years ago

@shawncplus Do you want a docblock without description?

shawncplus commented 5 years ago

No, the description is fine. See this comment https://github.com/RanvierMUD/core/pull/44#issuecomment-461895287 The param type should be @param {string}, separately the return type should be @return {?string} but keep the description

clagiordano commented 5 years ago

Oh, sure I mixed params and return type, fine.

shawncplus commented 5 years ago

Excellent, thank you

clagiordano commented 5 years ago

Thanks to you, great work!