@nxtedition/agent
Advanced tools
Comparing version 3.3.0 to 3.4.0
12
index.js
const objectHash = require('object-hash') | ||
const querystring = require('querystring') | ||
@@ -11,3 +12,3 @@ function hash (obj) { | ||
function get (query, prop) { | ||
function get (query, prop, options) { | ||
const ds = this | ||
@@ -22,3 +23,10 @@ query = JSON.parse(JSON.stringify(query)) | ||
ds.record.set(`${id}:agent.query`, query) | ||
return `${id}:agent${prop ? `.${prop}` : ``}` | ||
if (options && typeof options === 'object' && Object.keys(options).length > 0) { | ||
options = JSON.parse(JSON.stringify(args.shift())) | ||
} else { | ||
options = null | ||
} | ||
return `${id}:agent${prop ? `.${prop}` : ``}` + (options ? `?${querystring.stringify(options)}` : '') | ||
} | ||
@@ -25,0 +33,0 @@ |
{ | ||
"name": "@nxtedition/agent", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "author": "Robert Nagy <robert.nagy@boffins.se>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2713
48