New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orchestrate

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orchestrate - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

34

lib/search.js

@@ -17,6 +17,6 @@ // Copyright 2013 Bowery Software, LLC

var util = require('util');
util.inherits(SearchBuilder, Builder)
require('util').inherits(SearchBuilder, Builder)
/**

@@ -78,9 +78,13 @@ * Set collection.

* @param {string} path
* @param {string} value
* @param {array} args
* @return {SearchBuilder}
*/
SearchBuilder.prototype.aggregate = function (type, path, value) {
SearchBuilder.prototype.aggregate = function (type, path, args) {
assert(type, 'type required');
assert(path, 'path required');
var _aggregate = [path, type, value].join(':');
var parts = [ path, type ];
if (typeof(args) === "string" || util.isArray(args)) {
parts = parts.concat(args);
}
var _aggregate = parts.join(':');
if (this._aggregate)

@@ -139,10 +143,22 @@ this._aggregate = [this._aggregate, _aggregate].join(',');

/**
* Add new 'time_series' aggregate parameter.
* Add new 'time_series' aggregate parameter. The 'time' param, which must be
* one of ('year', 'quarter', 'month', 'week', 'day', or 'hour'), determines
* the bucketing interval for the time-series. The optional timezone param,
* if present, must begin with a "+" or "-" character, followed by four digits
* representing the hours and minutes of offset, relative to UTC. For example,
* Eastern Standard Time (EST) would be represented as "-0500", since the time
* in EST is five hours behind that of UTC.
*
* @param {string} type
* @param {string} path
* @param {string} value
* @param {string} time
* @param {string} timezone
* @return {SearchBuilder}
*/
SearchBuilder.prototype.time_series = function (path, time) {
return this.aggregate('time_series', path, time);
SearchBuilder.prototype.time_series = function (path, time, timezone) {
if (typeof(timezone) === "undefined") {
return this.aggregate('time_series', path, time);
} else {
return this.aggregate('time_series', path, [ time, timezone ]);
}
}

@@ -149,0 +165,0 @@

@@ -28,3 +28,3 @@ {

},
"version": "0.4.0",
"version": "0.4.1",
"main": "index",

@@ -31,0 +31,0 @@ "tags": [

@@ -123,2 +123,3 @@ // Copyright 2014 Orchestrate, Inc.

.time_series('path', 'day')
.time_series('path', 'hour', '+0900')
.query('value.location:NEAR:{latitude:12.3 longitude:56.7 radius:100km}')

@@ -125,0 +126,0 @@ .then(function (res) {

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