Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个接收 Meteor Collection 对象的函数(由 生成new Meteor.Collection("lol_cats"))
new Meteor.Collection("lol_cats")
我如何可靠地判断任何特定对象是否是这样的 Meteor Collection 对象?
使用 Javascript 的instanceof运算符:if (x instanceof Meteor.Collection).
instanceof
if (x instanceof Meteor.Collection)