pub fn is_core(spec: &str) -> bool
Whether spec names a core module of any kind — a method namespace or a data module. This is what require.resolve answers with the bare specifier.
spec
require.resolve