doc: 'constructor' implies use of new keyword · nodejs/node@889986a · GitHub
Skip to content

Commit 889986a

Browse files
CameronMooreheadgibfahn
authored andcommitted
doc: 'constructor' implies use of new keyword
The square module is described as exporting a constructor, which would mean it would need to be invoked with the new keyword in bar.js after requiring it. Otherwise it's technically a factory function, not a constructor. PR-URL: #17364 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
1 parent 94d9f20 commit 889986a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

doc/api/modules.md

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)