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

@ezs/analytics

Package Overview
Dependencies
Maintainers
2
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ezs/analytics

Analytics statements for EZS

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
78
decreased by-34.45%
Maintainers
2
Weekly downloads
 
Created
Source

A collection of ezs analytics functions

npm version license

This package cannot be used alone. @ezs/core has to be installed

Usage

import ezs from '@ezs/core';
import analytics from '@ezs/analytics';

ezs.use(analytics);

process.stdin
    .pipe(ezs('STATEMENT_NAME', { STATEMENT_PARAMETERS })
    .pipe(process.stdout);

Statements

Table of Contents

count

Take Object object getting some fields with json path, and do ...

Parameters

Returns Object

distinct

Take Object object getting some fields with json path, and do ...

Parameters
  • path String path (optional, default "id")

Returns Object

distribute

Take Object like { id, value } and throw a serie of number value

Parameters
  • id String path to use for id (optional, default "id")
  • value String path to use for value (optional, default "value")
  • step String step between each valut (optional, default 1)
  • start Number first value to throw (optional, default minvalueinthestream)
  • size Number size of the distribution (optional, default (minvalue-maxvalue)inthestream)
  • default Number default value for missing object (optional, default 0)

Returns Object

drop

Take Object and throw the same object only if there the value of the select field is not equals than a value

Parameters
  • path String path of the field to compare (optional, default "value")
  • if Number value to compare (optional, default "")

Returns Object

exploding

Take Object and take values with [value] path (must be an array) and throw object of each value. The new object is build with [id] and eac value.

Parameters
  • id String path to use for id (optional, default "id")
  • value String path to use for value (optional, default "value")

Returns Object

filter

Take Object and throw the same object only if there the value of the select field is equals than a value

Parameters
  • path String path of the field to compare (optional, default "value")
  • if Number value to compare (optional, default "")

Returns Object

graph

Take Object object getting some fields with json path, and do ...

Parameters

Returns Object

greater

Take Object and throw the same object only if the value of the selected field is greater (or equal) than a value

Parameters
  • path String path of the field to compare (optional, default "value")
  • than Number value to compare (optional, default 0)
  • strict Boolean greater than but not equal (optional, default false)

Returns Object

groupingByEquality

Take Object like { id, value } and reduce all values with the same id in a single object

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

groupingByHamming

Take Object like { id, value } and reduce all value with id which have the same Hamming distance in a single object

Parameters
  • id String path to use for id (optional, default "id")
  • value String path to use for value (optional, default "value")

Returns Object

groupingByLevenshtein

Take Object like { id, value } and reduce all values with id which have the same Levenshtein distance in a single object

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)
  • distance Number minimal levenshtein distance to have a same id (optional, default 1)

Returns Object

groupingByModulo

Take Object like { id, value } and reduce all values with the same modulo computation in a ansingle object

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

keys

Take Object and throws all its keys

Parameters

Returns Object

less

Take Object and throw the same object only if the value of the selected field is less (or equal) than a value

Parameters
  • path String path of the field to compare (optional, default value)
  • than Number value to compare (optional, default 0)
  • strict Boolean less than but not equal (optional, default false)

Returns Object

maximizing

Take special Object like {id, value} and replace value with the max of values

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

merging

Take special Object like {id, value} and replace value with the merge of values

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

minimizing

Take special Object like {id, value} and replace value with the min of values

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

output

TO BE DESCRIBED

Parameters

pair

Take Object object getting some fields with json path, and do ...

Parameters

Returns Object

pluck

Take Object object getting value of fields (with json path) and throws an object for each value

Parameters
  • path String path to use form group by (optional, default id)

Returns Object

reducing

Take Object group value of { id, value } objectpath

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

segment

Take Object object getting some fields with json path, and throw segment of value. Ex: get [a,b,c] and throw [a,b], [b,c]

Parameters
  • path String path (optional, default value)
  • aggregate Boolean aggregate all values for all paths (or not) (optional, default true)

Returns Object

slice

Take Object and throw the same object only if it is in the section of the stream between start and start + size. stream is numbered from 1

Parameters
  • start Number start of the slice (optional, default 0)
  • size Number size of the slice (optional, default 10)

Returns Object

sort

Take all Object and sort them with dedicated key

Parameters
  • path String path to use for id (optional, default id)

Returns Object

summing

Take special Object like {id, value} and replace value with the sum of values

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

topics

Take Object and take values with [value] path (must be an array)

Parameters
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

tune

Take all Object and sort them with selected field

Parameters
  • path String path to use for the sort key (optional, default id)

Returns Object

value

Take Object object and getting the value field

Parameters
  • path String the pah of the value field (optional, default value)

Returns Object

Keywords

FAQs

Package last updated on 13 Sep 2019

Did you know?

Socket

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.

Install

Related posts

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