Object.getOwnPropertyNames(obj).length === 0

模拟range

Array.apply(null, Array(5)).map(function (_, i) {return i;});
=> [0, 1, 2, 3, 4]

被vue观察后的object或array不再是空的

Object.getOwnPropertyNames(emptyObservedObject) == ['__ob__']

相关文章:

  • 2022-01-09
  • 2022-12-23
  • 2021-11-23
  • 2021-10-10
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
猜你喜欢
  • 2022-12-23
  • 2021-10-26
  • 2021-10-19
  • 2022-01-19
  • 2022-12-23
  • 2022-01-11
  • 2022-01-02
相关资源
相似解决方案