syncano-node
syncano-node copied to clipboard
.uniqe() feature for listing data
For example: .uniqe('name') will take only first unique record (by 'name' field)
Hmm, maybe this should be part of collections feature?
let sockets = data.sockets.list().then(sockets =>
sockets.unique('name').sortBy('name')
)
data.sockets.list().then(sockets =>
sockets.filter(item => item.name === 'malgun').update({name: 'mailgun'})
)
https://github.com/ecrmnn/collect.js