MCPcopy
hub / github.com/gaotianliuyun/gao / init

Function init

cat/js/yiso_open.js:27–43  ·  view source on GitHub ↗
(cfg)

Source from the content-addressed store, hash-verified

25
26// cfg = {skey: siteKey, ext: extend}
27async function init(cfg) {
28 try {
29 siteKey = _.isEmpty(cfg.skey) ? '' : cfg.skey;
30 siteType = _.isEmpty(cfg.stype) ? '' : cfg.stype;
31 const ext = _.isEmpty(cfg.ext) ? '' : cfg.ext;
32 const configs = ext.split('$$$');
33 if (configs.length == 2) {
34 cookie = configs[1];
35 }
36 const token = {
37 ext: configs[0]
38 };
39 await initAli(token);
40 } catch (e) {
41 await log('init:' + e.message + ' line:' + e.lineNumber);
42 }
43}
44
45async function home(filter) {
46 return '{}';

Callers

nothing calls this directly

Calls 2

initAliFunction · 0.90
logFunction · 0.90

Tested by

no test coverage detected