Você quis dizer pacote. Você pode usá-lo no navegador.
Exigir
var didYouMean = require ( "./lib/didUMean" ) ;
didYouMean ( "j2trappy" , [
"j2.trappy" ,
"j3.trappy"
] ) . then ( console . log ) ; // j2.trappy
console . log ( didYouMean . sync ( "j2trappy" , [
"j2.trappy" ,
"j3.trappy"
] ) ) ; // j2.trappy
Importar
import didYouMean from "./lib/didUMean" ;
didYouMean ( "j2trappy" , [
"j2.trappy" ,
"j3.trappy"
] ) . then ( console . log ) ; // j2.trappy
console . log ( didYouMean . sync ( "j2trappy" , [
"j2.trappy" ,
"j3.trappy"
] ) ) ; // j2.trappy