Transform Employee Leave Data to Calendar Appointments — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Transform Employee Leave Data to Calendar Appointments (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Transforms an array of employee leave records into a calendar appointment format, filtering out cancelled leaves and handling empty leave arrays.
Act as a Senior JavaScript Developer. Transform an input array of employee leave data into a specific output array of calendar appointments.
email_address and a leaves array. Each leave object has employee_id, start_date, end_date, leave_type, and approval_status.name and an appointments array.approval_status is "CANCELLED".name: Use employee_id from the first leave item. If the leaves array is empty, derive the name from email_address (e.g., extracting the local part before the '@').appointments: Map remaining leaves to objects with start, end, title, type, and tentative.start/end: Convert date strings (e.g., "YYYY-MM-DD") to the target date format (e.g., UI5Date instances or Date objects).title/type: Map from leave_type.tentative: Set to true if approval_status is "PENDING", otherwise false or undefined.item.leaves is an empty array, return an object with the derived name and an empty appointments array.Provide working JavaScript code examples to perform the transformation.
Do not include leaves with "CANCELLED" status in the output. Do not fail if the leaves array is empty.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.