![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
esana-node-api
Advanced tools
$ npm install esana-node-api
$ yarn add esana-node-api
QUENSTIONS ?
const {esana_scrape, esana_latest_news_id, esana_scrape_from_id} = require("esana-node-api").esana_news;
//scrape latest news
const latest_news = await esana_scrape({ fetch: 'latest' })
console.log(latest_news)
Output:
{
news: {
helakuru: {
title: 'මුදල් රාජ්ය ඇමති සහ IMF නියෝජ්ය කළමනාකාර අධ්යක්ෂ අතර හමුවක්',
description: 'මුදල් රාජ්ය අමාත්ය ෂෙහාන් සේමසිංහ සහ ජාත්යන්තර මූල්ය අරමුදලේ නියෝජ්ය කළමනාකාර අධ්යක්ෂ කෙන්ජි ඔකමුරා සමඟ සාකච්ඡාවක් පවත්වා තිබෙනව
ා.\n' +
'\n' +
'එහිදී ආර්ථිකය ස්ථාවර කිරීම සඳහා ශ්රී ලංකාව විසින් ක්රියාත්මක කර ඇති ආර්ථික ප්රතිසංස්කරණවල ප්රගතිය පිළිබඳව සාකච්ඡා කළ බවයි Twitter පණිවිඩයක් න
ිකුත් කරමින් මුදල් රාජ්ය අමාත්ය ෂෙහාන් සේමසිංහ සඳහන් කළේ.\n' +
'\n' +
'ජාත්යන්තර මූල්ය අරමුදලේ සහ ලෝක බැංකුවේ වාර්ෂික සම්මේලනයට සහභාගී වී සිටින අතරතුර මෙම හමුව සිදුව තිබෙනවා.',
thumb: 'https://news.bhashalanka.com/image-library/shehan-okamura.jpg',
url: 'https://www.helakuru.lk/esana/news/93795',
data: '2022-10-16 16:02:40',
lang: 'Sinhala'
}
}
}
const {esana_scrape, esana_latest_news_id, esana_scrape_from_id} = require("esana-node-api").esana_news;
//scrape all esana news
const latest_news = await esana_scrape({ fetch: 'all' })
console.log(latest_news)
Output:
[
{
news_id: '93795',
title: 'මුදල් රාජ්ය ඇමති සහ IMF නියෝජ්ය කළමනාකාර අධ්යක්ෂ අතර හමුවක්',
thumb: 'https://news.bhashalanka.com/image-library/shehan-okamura.jpg'
},
{
news_id: '93794',
title: 'නාවලපිටියේ පොහොට්ටුවේ රැළියක් අතරතුර ඊට විරෝධතාවය දැක්වූ පිරිසක් අත්අඩංගුවට',
thumb: 'https://news.bhashalanka.com/image-library/nawalapitiya-protest.jpg'
},
{
news_id: '93790',
title: 'නැමීබියාවට ලකුණු 55 ක ජයක්',
thumb: 'https://news.bhashalanka.com/image-library/sl-vs-nambia.jpg'
},
{
news_id: '93786',
title: 'ශ්රී ලංකාවට ලකුණු 164 ක ඉලක්කයක්',
thumb: 'https://news.bhashalanka.com/image-library/sl-vs-nambia.jpg'
},
{
news_id: '93785',
title: 'අයහපත් කාලගුණයෙන් පුද්ගලයින් 55,000 ක් පමණ පීඩාවට පත්වෙයි',
thumb: 'https://news.bhashalanka.com/image-library/kelani-river-flood.jpg'
},
{
news_id: '93784',
title: 'කාසියේ වාසිය ශ්රී ලංකාවට',
thumb: 'https://news.bhashalanka.com/image-library/sl-vs-nambia.jpg'
},
{
news_id: '93782',
title: 'T20 ලෝක කුසලානය අරඹමින් ශ්රී ලංකාව සහ නැමීබියාව අද තරඟ බිමට',
thumb: 'https://news.bhashalanka.com/image-library/sl-vs-nambia.jpg'
}
]
const {esana_scrape, esana_latest_news_id, esana_scrape_from_id} = require("esana-node-api").esana_news;
//scrape Esana news Using News Id
const latest_news = await esana_scrape_from_id( { id: news_id } ) // example {id: '93782'}
console.log(latest_news)
Output:
{
news_from_id: {
helakuru: {
news_id: '93782',
title: 'T20 ලෝක කුසලානය අරඹමින් ශ්රී ලංකාව සහ නැමීබියාව අද තරඟ බිමට',
description: '2022 පන්දුවාර විස්සයි විස්ස ලෝක කුසලාන ක්රිකට් තරඟාවලිය අද (16) ඔස්ට්රේලියාවේ දී ආරම්භ වනවා.\n' +
'\n' +
'ඒ අනුව ශ්රී ලංකාව සහ නැමීබියාවට අතර තරඟය පෙරවරු 9.30 ට ජීලෝන්ග් හී දී ආරම්භ වීමට නියමිතයි.\n' +
'\n' +
'තරඟයේ සජීවී තොරතුරු එසැණ හරහා ඔබවෙත ගෙන ඒමට මේ වන විටත් සියලුම කටයුතු සූදානම් කර තිබෙනවා.',
thumb: 'https://news.bhashalanka.com/image-library/sl-vs-nambia.jpg',
url: 'https://www.helakuru.lk/esana/news/93782',
data: '2022-10-16 06:57:31',
lang: 'Sinhala'
}
}
}
FAQs
Esana News || Helakuru.lk - එසැණ News
The npm package esana-node-api receives a total of 66 weekly downloads. As such, esana-node-api popularity was classified as not popular.
We found that esana-node-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.