在firebase-admin sdk中,没有人知道如何/为什么可以将admin.database
作为函数admin.database()
和属性/命名空间(即admin.database.ServerValue
吗?
In JavaScript, functions can have properties.
> function x() {}
undefined
> x
[Function: x]
> x.prop = 1
1
> x
{ [Function: x] prop: 1 }
>
Credit goes to Doug Stevenson for pointing it out to me on the firebase slack channel. Thanks Doug!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.