run a scan once every second and get the signal and mac of the around and save it to the device.
Just call http://www.espruino.com/Reference#l_NRF_findDevices and it'll call back with the devices that are found.
It's worth supplying a filter though as if you run it somewhere busy you can potentially get so many BLE devices it uses up your available memory :)
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just call http://www.espruino.com/Reference#l_NRF_findDevices and it'll call back with the devices that are found.
It's worth supplying a filter though as if you run it somewhere busy you can potentially get so many BLE devices it uses up your available memory :)