New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-date-add

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-date-add

Takes JSON data with date. Adds fields such as 'dayOfWeek'.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Overview

Sometimes you want to transform JSON data. This package parses data from standard in and creates a new object with year, month, dateOfMonth, dayOfWeek, hour, minute, and seconds fields.

The property of the incoming objects that contains the date field is specified with -d.

The expanded output object containing the above mentioned fields is in the form of datefield + _expanded. Assuming you have a date object named date, the added object would be date_expanded.

Installation

npm install -g simple-date-add

Usage

  Usage: simple-date-add [options]


  Options:

    -V, --version                output the version number
    -d, --datefield [datefield]  The property that contains the date object.
    -i, --ignore                 Ignore inputs that don't contain datefield; ( Don't die )
    -h, --help                   output usage information

Examples

Example: Take the output of ifstat-json and expand the output.

$ ifstat-json | simple-date-add -d date

Keywords

cli date es elasticsearch transform manipulate

FAQs

Package last updated on 23 Dec 2017

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