Vouliez-vous dire, package. Vous pouvez l'utiliser sur le navigateur.
Exiger
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
Importer
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