-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
45 lines (39 loc) · 1.38 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
export {};
import { githubApiGetProject, getGithubTopics } from 'github-api-get';
import { GITHUB_PROJECT_TOPICS } from './consts.js';
async function realdataTopicsWithPathExpression() {
const loginName = 'roebi';
const projectName = '01-01-vanilla-HTML5-starter-page';
const infoLog = true;
const isProd = true;
const githubTopics = githubApiGetProject(
loginName,
projectName,
GITHUB_PROJECT_TOPICS,
infoLog,
isProd
); // as Promise<string[]>;
const realGithubTopics = await githubTopics;
console.group(
'realGithubTopics, call of githubApiGetProject with constant GITHUB_PROJECT_TOPICS'
);
console.info('realGithubTopics');
console.info(realGithubTopics);
console.groupEnd();
}
async function getGithubTopicsfromgithub() {
const loginName = 'roebi';
const projectName = '01-01-vanilla-HTML5-starter-page';
const infoLog = true;
const isProd = true;
// this call is deprecated, use githubApiGetProject with constant GITHUB_PROJECT_TOPICS
const githubTopics = getGithubTopics(loginName, projectName, infoLog, isProd); // as Promise<string[]>;
const realGithubTopics = await githubTopics;
console.group('realGithubTopics, deprecated call getGithubTopics');
console.info('realGithubTopics');
console.info(realGithubTopics);
console.groupEnd();
}
await realdataTopicsWithPathExpression();
console.info();
await getGithubTopicsfromgithub();