0

给定以下枪支无序列表,如何从机器列表中删除机器?

let gun = new Gun();
let machineId = 'cool-machine';
let location = {
  lat: position.coords.latitude,
  lng: position.coords.longitude
};

let machines = gun.get('machines');

let machine = gun.get('machine/' + machineId);
machine.put({machineId, location});

4

1 回答 1

0

使用枪/未设置:

  • 在节点或浏览器中包含 gun/unset。它位于 lib 文件夹中。

machines.unset(machine);

于 2018-01-15T21:31:16.177 回答