diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2023-09-24 13:22:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 05:22:39 -0600 |
commit | 84613bab74600154cd39d7deead7ded27ac27d11 (patch) | |
tree | 52a9de9da099fd2d037eb26bced915811d601d79 /recipes/grape/index.js | |
parent | fix: featured json pointing to wrong google calendar recipe id (#427) (diff) | |
download | ferdium-recipes-84613bab74600154cd39d7deead7ded27ac27d11.tar.gz ferdium-recipes-84613bab74600154cd39d7deead7ded27ac27d11.tar.zst ferdium-recipes-84613bab74600154cd39d7deead7ded27ac27d11.zip |
chore: remove dead grape recipe (#428)
- remove recipes/grape folder
Diffstat (limited to 'recipes/grape/index.js')
-rw-r--r-- | recipes/grape/index.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/recipes/grape/index.js b/recipes/grape/index.js deleted file mode 100644 index 1e2a187..0000000 --- a/recipes/grape/index.js +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | function _asyncToGenerator(fn) { | ||
2 | return function () { | ||
3 | const gen = Reflect.apply(fn, this, arguments); | ||
4 | return new Promise((resolve, reject) => { | ||
5 | function step(key, arg) { | ||
6 | try { | ||
7 | var info = gen[key](arg); | ||
8 | var value = info.value; | ||
9 | } catch (error) { | ||
10 | reject(error); | ||
11 | return; | ||
12 | } | ||
13 | if (info.done) { | ||
14 | resolve(value); | ||
15 | } else { | ||
16 | // eslint-disable-next-line consistent-return | ||
17 | return Promise.resolve(value).then( | ||
18 | value => { | ||
19 | step('next', value); | ||
20 | }, | ||
21 | error => { | ||
22 | step('throw', error); | ||
23 | }, | ||
24 | ); | ||
25 | } | ||
26 | } | ||
27 | return step('next'); | ||
28 | }); | ||
29 | }; | ||
30 | } | ||
31 | |||
32 | module.exports = Ferdium => | ||
33 | class Grape extends Ferdium { | ||
34 | validateUrl(url) { | ||
35 | return _asyncToGenerator(function* () { | ||
36 | try { | ||
37 | const resp = yield window.fetch(url, { | ||
38 | method: 'GET', | ||
39 | }); | ||
40 | return resp.status === 200; | ||
41 | } catch (error) { | ||
42 | console.error(error); | ||
43 | } | ||
44 | |||
45 | return false; | ||
46 | })(); | ||
47 | } | ||
48 | }; | ||