
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
cozy-stack-client
Advanced tools
const client = new CozyStackClient(options)
uri
: The Cozy instance URI ;token
: The token given by the stack.A collection is the set of all documents of a same doctype.
Selecting a collection is done by calling the collection()
method, passing it the doctype:
const todos = client.collection('io.cozy.todos')
const allTodos = await todos.all()
console.log(allTodos.data)
By default, the stack limits the number of query results to 100 documents. If
the limit causes some documents not to be returned, the response will have a
next: true
property.
By using the skip
and limit
options you can build your own pagination:
const firstPage = await todos.all({ limit: 100 })
if (firstPage.next) {
const secondPage = await todos.all({ skip: 100, limit: 100 })
}
You can also use the meta.count
property to know the total count of documents.
const allTodos = await todos.all()
console.log(`There are ${allTodos.meta.count} todos.`)
const doneTodos = await todos.find({ done: true })
console.log(allTodos.data)
FAQs
Unknown package
The npm package cozy-stack-client receives a total of 2,390 weekly downloads. As such, cozy-stack-client popularity was classified as popular.
We found that cozy-stack-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.