File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -16,27 +16,27 @@ const run = async () => {
1616 let page1 = await getJson ( "google" , params ) ;
1717 console . log (
1818 "First page links" ,
19- extractLinks ( page1 . organic_results ) ,
19+ extractLinks ( page1 . organic_results )
2020 ) ;
2121 if ( page1 . next ) {
2222 let page2 = await page1 . next ( ) ;
2323 console . log (
2424 "Second page links" ,
25- extractLinks ( page2 . organic_results ) ,
25+ extractLinks ( page2 . organic_results )
2626 ) ;
2727 }
2828
2929 // Pagination (callback)
3030 getJson ( "google" , params , ( page1 ) => {
3131 console . log (
3232 "First page links" ,
33- extractLinks ( page1 . organic_results ) ,
33+ extractLinks ( page1 . organic_results )
3434 ) ;
3535 if ( page1 . next ) {
3636 page1 . next ( ( page2 ) => {
3737 console . log (
3838 "Second page links" ,
39- extractLinks ( page2 . organic_results ) ,
39+ extractLinks ( page2 . organic_results )
4040 ) ;
4141 } ) ;
4242 }
@@ -49,7 +49,7 @@ const run = async () => {
4949 page2 = await page1 . next ( ) ;
5050 console . log (
5151 "Second page links" ,
52- extractLinks ( page2 . organic_results ) ,
52+ extractLinks ( page2 . organic_results )
5353 ) ;
5454 }
5555
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ await emptyDir("./npm");
55
66await build ( {
77 test : false , // Turned off to avoid publishing tests
8+ typeCheck : false ,
89 entryPoints : [ "./mod.ts" ] ,
910 rootTestDir : "./tests" ,
1011 outDir : "./npm" ,
@@ -20,8 +21,8 @@ await build({
2021 } ,
2122 compilerOptions : {
2223 // https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
23- lib : [ "es2018 " ] ,
24- target : "ES2018 " ,
24+ lib : [ "es2017 " ] ,
25+ target : "ES2017 " ,
2526 } ,
2627 package : {
2728 name : "serpapi" ,
Original file line number Diff line number Diff line change 11import type { EngineName , EngineParameters } from "./types.ts" ;
22import { version } from "../version.ts" ;
33import fetch from "npm:cross-fetch@3.1.4" ;
4+ import core from "npm:core-js-pure@3.28.0" ;
5+ const { globalThis, URL , URLSearchParams } = core ;
46
57type UrlParameters = Record <
68 string ,
You can’t perform that action at this time.
0 commit comments