说明:点火器
有条件地忽略异步/承诺函数中的错误,并返回默认值。
概要
import * as ignore from "ignor" ;
await got ( url ) . catch ( ignore . code ( "ECONNREFUSED" , "default value" ) ) ;
其他用途
// Ignore an error with a code and return undefined. Otherwise throw error.
ignore . code ( "EC
<weixin_42097189> 上传 | 大小:134kb