msg,app,cb){varchatServers=app.getServersByType('chat');if(!chatServers||chatServers.length===0){cb(newError('can not find chat servers.'));return;}varres=dispatcher.dispatch(session.get('rid'),chatServers);cb(null,res.id);};
* (new Date()).pattern("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18*/Date.prototype.pattern=function(fmt) {varo ={"M+" :this.getMonth()+1,//月份"d+" :this.getDate(),//日"h+" :this.getHours()%12 == 0 ? 12 :this.getHours()%12,//小时"H+" :this.getHours(),/...
User record query by email with namespaced app_metadata roles as Auth0 requires custom JWT claims to be namespaced exportconstgetCurrentUser=async(decoded)=>{constcurrentUser=awaitdb.user.findUnique({where:{email:decoded.email},})return{...currentUser,roles:parseJWT({decoded:decoded,namespace:...
Optimized for JS and ESM delivery from npm and GitHub. Works with all web formats. Serving more than 150 billion requests per month.
get(url, {responseType: "arraybuffer"}); /* res.data is a Buffer */ const workbook = XLSX.read(res.data); /* DO SOMETHING WITH workbook HERE */ })(); Download files in an Electron app (click to show) The net module in the main process can make HTTP/HTTPS requests to external...
channels.get('my_push_channel'); // Subscribe the device to receive push notifcations for a channel... await channel.push.subscribeDevice(); // ...or subscribe all devices associated with the client's cliendId to receive notifcations from the channel await channel.push.subscribeClient(); ...
@zurmokeeper/exceljs is compatible with exceljs V4.3.0 and previous versions, so feel free to switch to it. Translations 中文文档 Installation npm install @zurmokeeper/exceljs New Features! Since V4.4.3, the detailed update of the new version can be accessed fromhere. ...
{x:0,y:0,width:10000,height:20000,firstSheet:0,activeTab:1,visibility:'visible'} ] 添加工作表⬆ constsheet = workbook.addWorksheet('My Sheet'); 使用addWorksheet函数的第二个参数来指定工作表的选项。 示例: // 创建带有红色标签颜色的工作表constsheet = workbook.addWorksheet('My Sheet', {pro...
所以我这边选用vue2,结合花裤衩大佬的vue-element-admin,前端这边就差不多了,后端这边用的是阿里开源的eggjs,因为它使用起来很方便。数据库用的是mysql。部署这边提供了两套方案,一套是传统的nginx、mysql、node、一个一个单独安装配置。另一种是docker部署的方式。
(0) -> DEBUG // get level of stream at index 0 log.levels("foo") // get level of stream with name "foo" log.levels(0, INFO) // set level of stream 0 to INFO log.levels(0, "info") // can use "info" et al aliases log.levels("foo", WARN) // set stream named "foo"...