MCPcopy Create free account
hub / github.com/Semporia/Scripts / requireConfig

Function requireConfig

jd_goodMorning.js:74–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74function requireConfig() {
75 return new Promise(resolve => {
76 notify = $.isNode() ? require('./sendNotify') : '';
77 const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
78 if ($.isNode()) {
79 Object.keys(jdCookieNode).forEach((item) => {
80 if (jdCookieNode[item]) {
81 cookiesArr.push(jdCookieNode[item])
82 }
83 })
84 if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
85 } else {
86 cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
87 }
88 console.log(`共${cookiesArr.length}个京东账号\n`)
89 resolve()
90 })
91}
92
93function TotalBean() {
94 return new Promise(async resolve => {

Callers 1

jd_goodMorning.jsFile · 0.70

Calls 4

jsonParseFunction · 0.70
isNodeMethod · 0.45
getdataMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected