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

json-calendar

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-calendar - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

.circleci/config.yml

3

index.js

@@ -99,5 +99,6 @@ "use strict";

week = [];
var { firstDayOfWeek } = this.options;
// Loop through the day index (0..6) for each week.
for (var d = 0; d < 7; d++) {
for (var d = firstDayOfWeek; d < firstDayOfWeek + 7; d++) {
classNames = [];

@@ -104,0 +105,0 @@ day = {};

{
"name": "json-calendar",
"version": "1.4.0",
"version": "1.5.0",
"description": "A data model for displaying dates and date ranges on a calendar interface.",

@@ -29,7 +29,7 @@ "keywords": [

"devDependencies": {
"eslint": "^5.5.0",
"eslint-config-prettier": "^3.0.1",
"eslint-plugin-prettier": "^2.6.2",
"eslint": "^5.13.0",
"eslint-config-prettier": "^3.6.0",
"eslint-plugin-prettier": "^3.0.0",
"jest": "^23.6.0",
"prettier": "^1.14.2"
"prettier": "^1.16.4"
},

@@ -50,5 +50,6 @@ "eslintConfig": {

"expect": true,
"test": true
"test": true,
"describe": true
}
}
}
# json-calendar
[![Greenkeeper badge](https://badges.greenkeeper.io/rxgx/json-calendar.svg)](https://greenkeeper.io/)
A (JSON) data model for displaying dates and date ranges on a calendar interface.

@@ -10,2 +12,5 @@

var data = new Calendar();
// with custom today date
var = new Calendar({ today: new Date(1971, 0, 1) });
```

@@ -12,0 +17,0 @@

@@ -74,1 +74,29 @@ var JsonCalendar = require("./");

});
test("accepts change month", () => {
const calendar = new JsonCalendar();
calendar.changeMonth(2019, 3);
expect(calendar.options.monthIndex).toBe(3);
expect(calendar.options.year).toBe(2019);
});
describe("uses firstDayOfWeek param", () => {
test("month starts on correct day when firstDayOfWeek is 0", () => {
const calendar = new JsonCalendar({
year: 2019,
monthIndex: 1,
firstDayOfWeek: 0
});
expect(calendar.weeks[0][0].day).toBe(27);
});
test("month starts on correct day when firstDayOfWeek is 1", () => {
const calendar = new JsonCalendar({
year: 2019,
monthIndex: 1,
firstDayOfWeek: 1
});
expect(calendar.weeks[0][0].day).toBe(28);
});
});

Sorry, the diff of this file is too big to display

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