Socket
Socket
Sign inDemoInstall

kranus-test

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    kranus-test

Original Kranus test


Version published
Weekly downloads
1
Maintainers
1
Install size
3.02 kB
Created
Weekly downloads
 

Readme

Source

Schizomatrix

Original kranus test
npm install kranus-test

Usage

The module returns a function that takes a date in form of string, instance of Date or plain object with day, month and year properties.

var test = require('kranus-test');
test('1990-10-05') 
// => {error: false, color: 'yellow', matrix: [0,3,1,0,0,3,1,1,0,2]}

// we could also call test(new Date('1990-10-05')) or test({day: 5, month: 10, year: 1990})
// matrix[1] holds the number of "1"-s in matrix; matrix[0] is a dummy value for convinience

error is true when given date makes no sense.

Credits

Original concept by Kranus.

Keywords

FAQs

Last updated on 04 Sep 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc