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

crontalk-moment

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crontalk-moment

A generator-based interpreter for Crontalk.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

crontalk-moment v0.0.2

A generator-based interpreter for Crontalk.

Installation

npm install --save crontalk-moment

Why?

Crontalk is a library and an NPM module implementing a DSL that allows you to express Cron-like (and more) repeated-events expressions in a human readable syntax. However, Crontalk is only a parser and just translates natural language strings of text into a custom JSON format.

Crontalk-moment implements the next step, taking Crontalk's JSON output as input and processing it to generate the timestamps of the repeating events. As the name suggests, this implementation uses the Moment.js library to compute the timestamps.

Features / Usage

Generator-based interface

const ctm = require('crontalk-moment');
const gen = ctm('every 3 hours');

console.log(gen.next());

Supported features

This module currently only supports the basic Cron features (regular increments in years, months, weeks, days, hours adn/or minutes) with optional start/stop dates.

Roadmap

  • extend to cover a bigger subset of Crontalk's features (eventually all of them)
  • implement an event-emitter version to actually generate events at the correct times

Licensing

This package is released under the MIT License

FAQs

Package last updated on 09 Apr 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

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