Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dadi/api-wrapper

Package Overview
Dependencies
Maintainers
7
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dadi/api-wrapper - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

core/package-lock.json

13

core/lib/filters.js

@@ -111,2 +111,15 @@ 'use strict'

/**
* Set the search query
*
* @param {String} query
* @return API
* @api public
*/
APIWrapper.prototype.setSearchQuery = function(query) {
this.searchQuery = query
return this
}
/**
* Select a field to sort on and the sort direction

@@ -113,0 +126,0 @@ *

@@ -118,2 +118,6 @@ 'use strict'

if (this.searchQuery) {
url += '/search'
}
if (options.id) {

@@ -154,2 +158,6 @@ url += '/' + options.id

if (this.searchQuery) {
params.q = this.searchQuery
}
if (this.sort) {

@@ -156,0 +164,0 @@ params.sort = JSON.stringify(this.sort)

2

package.json
{
"name": "@dadi/api-wrapper",
"version": "4.1.0",
"version": "4.2.0",
"description": "A high-level library for interacting with DADI API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -255,2 +255,14 @@ # DADI API wrapper

#### `.setSearchQuery(query)`
Sets the query to use for a collection search.
```js
// Example
api
.in('users')
.setSearchQuery('John')
.find()
```
#### `.sortBy(field, order)`

@@ -257,0 +269,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc