-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
57 lines (53 loc) · 1.43 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* @file Main module of **YTMP3-JS** library providing useful APIs to download YouTube audios with ease.
*
* @requires audioconv
* @requires error
* @requires utils
* @requires ytmp3
* @author Ryuu Mitsuki <https://github.com/mitsuki31>
* @license MIT
* @since 0.1.0
*/
'use strict';
const {
defaultOptions: defaultAudioConvOptions,
checkFfmpeg,
convertAudio
} = require('./lib/audioconv');
const {
URLUtils,
FormatUtils,
ThumbnailUtils
} = require('./lib/utils');
const error = require('./lib/error');
const ytmp3 = require('./lib/ytmp3');
module.exports = Object.freeze({
// :: ytmp3 (Core)
name: ytmp3.NAME,
version: ytmp3.VERSION,
// eslint-disable-next-line camelcase
version_info: ytmp3.VERSION_INFO,
singleDownload: ytmp3.singleDownload,
batchDownload: ytmp3.batchDownload,
downloadFromID: ytmp3.downloadFromID,
getVideosInfo: ytmp3.getVideosInfo,
// :: URLUtils
YTURLUtils: URLUtils, // aliased to `YTURLUtils` for readability
extractVideoId: URLUtils.extractVideoId,
validateUrl: URLUtils.validateUrl,
validateId: URLUtils.validateId,
// :: FormatUtils
FormatUtils,
// :: ThumbnailUtils
ThumbnailUtils,
getAllThumbnails: ThumbnailUtils.getAllThumbnails,
getThumbnailByResolution: ThumbnailUtils.getThumbnailByResolution,
getThumbnail: ThumbnailUtils.getThumbnail,
// :: audioconv
defaultAudioConvOptions,
checkFfmpeg,
convertAudio,
// :: error
...error
});