你的意思是,包裹。您可以在瀏覽器上使用它。
要求
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
進口
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