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

calendar-tiler

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calendar-tiler - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "calendar-tiler",
"version": "1.0.0",
"version": "1.0.1",
"description": "Algorithm for tiling a calendar filled with appointments",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,6 +27,9 @@ Calendar Tiler

=================
Using npm: (https://www.npmjs.com/package/calendar-tiler)
* `npm install calendar-tiler`
Please consult the example files to see the full process in action and to see how it could be used from start to finish.
There's only one public facing function, `window.calendarTiler.tileAppointments`, it can be called with two parameters,
* `appointments` [Required] (Type: Array[Object]) objects to be tiled, each appointment needs to include 2 properties,
There's only one public facing function, `calendarTiler.tileAppointments`, it can be called with two parameters,
* `appointments` (Required) (Type: array[object]) objects to be tiled, each appointment needs to include 2 properties,
1. `<START_VALUE>` (Type: number) specifying the start of the appointment

@@ -44,4 +47,4 @@ 2. `<END_VALUE>` (or `<DURATION_VALUE>`) (Type: number) specifying the end of the appointment (or the duration of the appointment), note that if you are not using durational units, then `<END_VALUE>` must be greater than `<START_VALUE>` and if you are using durational units then `<DURATION_VALUE>` must be greater than 0.

The output is a single object with 2 properties,
* `sortedAppointments` (Type: Array[Object]) containing the input appointments sorted into a new array by `start` ascending and `end` descending
* `positions` (Type: Array[Object]) in the same order as the `sortedAppointments` order, each member contains 4 properties
* `sortedAppointments` (Type: array[object]) containing the input appointments sorted into a new array by `start` ascending and `end` descending
* `positions` (Type: array[object]) in the same order as the `sortedAppointments` order, each member contains 4 properties
1. `x` (Type: number) the x-coordinate for where the sorted appointment should be placed on the x-axis

@@ -48,0 +51,0 @@ 2. `dx` (Type: number) the width for how wide the sorted appointment should be on the x-axis

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