marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.03k stars 799 forks source link

crow_tech or crows? #344

Closed homerhanumat closed 6 years ago

homerhanumat commented 6 years ago

3rd Edition Chapter 11 mentions imports from a crow_tech module but the code for this chapter contains no such file. Is it crows.js?

marijnh commented 6 years ago

As it was, that module wasn't loadable in Node, so it'd be hard to use separately anyway. Attached patch improves this, and renames it to crow-tech to prevent confusion.

homerhanumat commented 6 years ago

Thanks. Perhaps include the polyfill for Object.values in the file as well, for the time being?

marijnh commented 6 years ago

What browser are you using that can handle the syntax from the book but doesn't have Object.values?

homerhanumat commented 6 years ago

I have been running code samples with node. But if assumed use is in browser then no worries, I'll make my own adjustments.

marijnh commented 6 years ago

It seems Node introduced Object.values in version 7, which has been stable for a while, so maybe upgrade?

homerhanumat commented 6 years ago

Ah, now I see: turns out VSCode was using the "system" node (v6.9.5).