duck-duck-scrape
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -8,2 +8,5 @@ # Changelog | ||
## [Unreleased] | ||
## [2.0.1] - 2021-04-29 | ||
### Fixed: | ||
- Fixed no results parsing in `search()` | ||
## [2.0.0] - 2021-04-19 | ||
@@ -19,4 +22,5 @@ Complete rewrite of the package, read the [documentation](https://duck-duck-scrape.js.org/) before updating. | ||
[Unreleased]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.0.0...HEAD | ||
[Unreleased]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.0.1...HEAD | ||
[1.0.3]: https://github.com/Snazzah/duck-duck-scrape/releases/tag/v1.0.3 | ||
[2.0.0]: https://github.com/Snazzah/duck-duck-scrape/compare/v1.0.3...v2.0.0 | ||
[2.0.1]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.0.0...v2.0.1 |
@@ -63,4 +63,4 @@ "use strict"; | ||
// check for no results | ||
if (searchResults.length === 1 && !('n' in searchResults[1])) { | ||
const onlyResult = searchResults[1]; | ||
if (searchResults.length === 1 && !('n' in searchResults[0])) { | ||
const onlyResult = searchResults[0]; | ||
if ((!onlyResult.da && onlyResult.t === 'EOF') || !onlyResult.a || onlyResult.d === 'google.com search') | ||
@@ -67,0 +67,0 @@ return { |
{ | ||
"name": "duck-duck-scrape", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Search from DuckDuckGo and use it's spice APIs.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -5,3 +5,3 @@ <div align="center"> | ||
[![NPM version](https://img.shields.io/npm/v/duck-duck-scrape?maxAge=3600?&color=3498db)](https://www.npmjs.com/package/dexare) [![NPM downloads](https://img.shields.io/npm/dt/duck-duck-scrape?maxAge=3600&color=3498db)](https://www.npmjs.com/package/dexare) [![ESLint status](https://github.com/Snazzah/duck-duck-scrape/workflows/ESLint/badge.svg)](https://github.com/Dexare/Dexare/actions?query=workflow%3A%22ESLint%22) [![DeepScan grade](https://deepscan.io/api/teams/11596/projects/16764/branches/365136/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=11596&pid=16764&bid=365136) | ||
[![NPM version](https://img.shields.io/npm/v/duck-duck-scrape?maxAge=3600?&color=3498db)](https://www.npmjs.com/package/duck-duck-scrape) [![NPM downloads](https://img.shields.io/npm/dt/duck-duck-scrape?maxAge=3600&color=3498db)](https://www.npmjs.com/package/duck-duck-scrape) [![ESLint status](https://github.com/Snazzah/duck-duck-scrape/workflows/ESLint/badge.svg)](https://github.com/Snazzah/duck-duck-scrape/actions?query=workflow%3A%22ESLint%22) [![DeepScan grade](https://deepscan.io/api/teams/11596/projects/16764/branches/365136/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=11596&pid=16764&bid=365136) | ||
@@ -8,0 +8,0 @@ `npm install duck-duck-scrape` - `yarn add duck-duck-scrape` |
@@ -161,4 +161,4 @@ import needle, { NeedleOptions } from 'needle'; | ||
// check for no results | ||
if (searchResults.length === 1 && !('n' in searchResults[1])) { | ||
const onlyResult = searchResults[1] as CallbackSearchResult; | ||
if (searchResults.length === 1 && !('n' in searchResults[0])) { | ||
const onlyResult = searchResults[0] as CallbackSearchResult; | ||
if ((!onlyResult.da && onlyResult.t === 'EOF') || !onlyResult.a || onlyResult.d === 'google.com search') | ||
@@ -165,0 +165,0 @@ return { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
128934
0