Interesting question, but it seems to me that some developers just take it by their own worldview.
It also depends on the project:
Some projects are built with smaller components, which are just little pieces of the main functionality: lib.
lib/independent-pieces.js
Other projects are monolithic, the components depend on each other: src.
src/this-is-all-for-this-project-and-depend-on-each-other.js
For third-party libraries, it’s common to use vendor.
vendor/bootstrap/
vendor/d3/