utilitas 2001.1.111 → 2001.1.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/manifest.mjs +1 -1
- package/lib/web.mjs +2 -0
- package/package.json +1 -1
package/lib/manifest.mjs
CHANGED
package/lib/web.mjs
CHANGED
|
@@ -195,6 +195,8 @@ const search = async (query, options = {}) => {
|
|
|
195
195
|
+ `&q=${encodeURIComponent(query)}&num=${num}&start=${start}`
|
|
196
196
|
+ (options?.image ? `&searchType=image` : '');
|
|
197
197
|
var resp = await get(url, { encode: _JSON, ...options || {} });
|
|
198
|
+
assert(!resp?.content?.error?.message, resp?.content?.error?.message
|
|
199
|
+
|| 'Failed to use Google Search API.');
|
|
198
200
|
return options?.raw ? resp.content : {
|
|
199
201
|
totalResults: resp?.content?.searchInformation?.totalResults || 0,
|
|
200
202
|
startIndex: resp?.content?.queries?.request?.[0]?.startIndex || 1,
|