identify-youtube-shorts

1.0.2 • Public • Published

identify-youtube-shorts

Identify whether a youtube video is shorts or not

Install

npm install identify-youtube-shorts

Usage

checkIfYoutubeShorts(videoID) -> Promise(boolean)

Note: checkIfYoutubeShorts is an async function

Example

const checkIfYoutubeShorts = require('identify-youtube-shorts');
const videoID = "dQw4w9WgXcQ";
async function example(videoID){
    const ifShorts = await checkIfYoutubeShorts(videoID);
    console.log(ifShorts); // true or false according to the video
}
example(videoID)

Errors

The Function will raise a IdentifyYoutubeShortsError Error with the cause.

Package Sidebar

Install

npm i identify-youtube-shorts

Weekly Downloads

18

Version

1.0.2

License

MIT

Unpacked Size

3.12 kB

Total Files

4

Last publish

Collaborators

  • divyanshbyte