@robinpath/calendar
Advanced tools
+96
| # @robinpath/calendar | ||
| > iCal (.ics) calendar parsing, generation, event management, and date range queries | ||
|     | ||
| ## Why use this module? | ||
| The `calendar` module lets you: | ||
| - Create an iCal event object | ||
| - Create iCal string from events | ||
| - Parse iCal string | ||
| - Parse .ics file | ||
| - Write iCal to file | ||
| All functions are callable directly from RobinPath scripts with a simple, consistent API. | ||
| ## Installation | ||
| ```bash | ||
| npm install @robinpath/calendar | ||
| ``` | ||
| ## Quick Start | ||
| No credentials needed — start using it right away: | ||
| ```robinpath | ||
| calendar.createCalendar [$event1, $event2] {"name": "My Calendar"} | ||
| ``` | ||
| ## Available Functions | ||
| | Function | Description | | ||
| |----------|-------------| | ||
| | `calendar.createEvent` | Create an iCal event object | | ||
| | `calendar.createCalendar` | Create iCal string from events | | ||
| | `calendar.parse` | Parse iCal string | | ||
| | `calendar.parseFile` | Parse .ics file | | ||
| | `calendar.writeFile` | Write iCal to file | | ||
| | `calendar.addEvent` | Add event to iCal string | | ||
| | `calendar.removeEvent` | Remove event by UID | | ||
| | `calendar.findEvents` | Find events in date range | | ||
| | `calendar.today` | Get today's events | | ||
| | `calendar.upcoming` | Get upcoming events | | ||
| | `calendar.toJson` | Convert iCal to JSON | | ||
| | `calendar.formatDate` | Format ISO to iCal date | | ||
| | `calendar.parseDate` | Parse iCal date to ISO | | ||
| ## Examples | ||
| ### Create iCal string from events | ||
| ```robinpath | ||
| calendar.createCalendar [$event1, $event2] {"name": "My Calendar"} | ||
| ``` | ||
| ### Parse iCal string | ||
| ```robinpath | ||
| calendar.parse $icsContent | ||
| ``` | ||
| ### Parse .ics file | ||
| ```robinpath | ||
| calendar.parseFile "./events.ics" | ||
| ``` | ||
| ## Integration with RobinPath | ||
| ```typescript | ||
| import { RobinPath } from "@wiredwp/robinpath"; | ||
| import Module from "@robinpath/calendar"; | ||
| const rp = new RobinPath(); | ||
| rp.registerModule(Module.name, Module.functions); | ||
| rp.registerModuleMeta(Module.name, Module.functionMetadata); | ||
| const result = await rp.executeScript(` | ||
| calendar.createCalendar [$event1, $event2] {"name": "My Calendar"} | ||
| `); | ||
| ``` | ||
| ## Full API Reference | ||
| See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples. | ||
| ## Related Modules | ||
| - [`@robinpath/json`](../json) — JSON module for complementary functionality | ||
| ## License | ||
| MIT |
+25
-7
| { | ||
| "name": "@robinpath/calendar", | ||
| "version": "0.1.0", | ||
| "publishConfig": { "access": "public" }, | ||
| "version": "0.1.1", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "type": "module", | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "exports": { ".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" } }, | ||
| "files": ["dist"], | ||
| "scripts": { "build": "tsc", "test": "node --import tsx --test tests/*.test.ts" }, | ||
| "peerDependencies": { "@wiredwp/robinpath": ">=0.20.0" }, | ||
| "devDependencies": { "@wiredwp/robinpath": "^0.30.1", "tsx": "^4.19.0", "typescript": "^5.6.0" } | ||
| "exports": { | ||
| ".": { | ||
| "import": "./dist/index.js", | ||
| "types": "./dist/index.d.ts" | ||
| } | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "test": "node --import tsx --test tests/*.test.ts" | ||
| }, | ||
| "peerDependencies": { | ||
| "@wiredwp/robinpath": ">=0.20.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@wiredwp/robinpath": "^0.30.1", | ||
| "tsx": "^4.19.0", | ||
| "typescript": "^5.6.0" | ||
| } | ||
| } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
35936
7.72%10
11.11%0
-100%97
Infinity%1
Infinity%