- Copying an interface for the purpose of providing a compatible implementation (what Google allegedly did - although of course part of the debate is whether they also copied any of the implementation)
- Copying parts of the implementation, not for the purpose of compatibility (what faker.js did - in this case, copying constants)
IIRC US copyright law gives very little protection to compilation of non-copyrightable data (look up copyright status of telephone directories). The argument is that it's just public domain factual information bundled together.
The faker libraries are all that -- compilations of mostly non-copyrightable facts.
I'm not saying faker.js did no wrong, just saying if hypothetically a purported copyright owner sued him, they would have a really hard time proving substantial infringement happened given the available precedents.
It’s a contentious topic, but last I heard people here tend to believe it isn’t (as long as it’s Google copying Oracle’s stuff)