top | item 21060700

Show HN: A Tiny But Powerful Entity-Component-System on Node

3 points| mhammerc | 6 years ago |github.com

4 comments

order

Gehinnn|6 years ago

It would be awesome if you could provide an online demo!

Also, you should check out the JS formatting guide (I can recommend you prettier). Your code looks like being written by an C# developer :D

Gehinnn|6 years ago

Also, from C# dev to C# dev, you definitely should check out TypeScript. Checks like this:

if (parent !== null && !(parent instanceof Entity)) { throw new TypeError('parent must be an Entity instance or null'); }

will be as short as

constructor(parent: Entity | null, ...)

... and entirely checked during compile/design time.