1.0.2 • Published 6 years ago

feathers-findone v1.0.2

Weekly downloads
197
License
MIT
Repository
github
Last release
6 years ago

feathers-findone

npm version

Adds a .findOne() method to services in Feathers.js v3

Install

npm install feathers-findone --save

Configure on server and client:

const findOne = require('feathers-findone')

app.configure(findOne())

Use

app.service('messages').findOne({/* params */})

All it does is set query.$limit = 1 to the params and return the first result of .find()