Function url is incorrect
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Function Core.getHtmlOfUrl returns promise. So you need return this promise to a caller.
export function url(externalUrl, language = '', format = 'default', options = {
lengthLow: LENGTH_LOW_DEFAULT,
lengthHigh: LENGTH_HIGH_DEFAULT,
stopwordsLow: STOPWORDS_LOW_DEFAULT,
stopwordsHigh: STOPWORDS_HIGH_DEFAULT,
maxLinkDensity: MAX_LINK_DENSITY_DEFAULT,
maxHeadingDistance: MAX_HEADING_DISTANCE_DEFAULT,
noHeadings: NO_HEADINGS_DEFAULT,
}) {
return Core.getHtmlOfUrl(externalUrl).then((response) => {
const htmlText = response.data;
return rawHtml(htmlText, language, format, options);
}).catch((error) => {
throw error;
});
}
And justext.url(url, language, 'detailed', options).then((data)=>console.log(data));
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the exported url function and inspect how Core.getHtmlOfUrl and rawHtml are connected. Verify the promise returned by justext.url with the usage shown in the issue, then confirm the resolved data is passed through and errors remain observable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100