文件名称:each-sync:同步迭代
文件大小:1.03MB
文件格式:ZIP
更新时间:2024-05-25 08:39:18
JavaScript
每个同步 同步迭代 安装 $ npm install --save each-sync 用法 var eachSync = require ( "each-sync" ) queries = [ "dogs" , "cats" , "birds" ] eachSync ( 0 , queries , function ( i , callback ) { request ( 'http://www.google.com?q=' + queries [ i ] , function ( error , response , body ) { if ( ! error && response . statusCode == 200 ) { console . log ( "Got page for query: " + queries [ i ] ) con