New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@magmacomputing/tempo-fns

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

@magmacomputing/tempo-fns

Tree-shakeable functional utilities for the Temporal API

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
8
33.33%
Maintainers
1
Weekly downloads
 
Created
Source
@magmacomputing/tempo-fns

@magmacomputing/tempo-fns

The "date-fns" of the Temporal Era

A library of highly granular, fully tree-shakeable utility functions built directly on top of the JavaScript Temporal API.

This package provides a bridge for developers transitioning from legacy date wrappers (like Moment or date-fns) into the modern Temporal API.

Why tempo-fns?

  • Tree-shakeable: Import exactly what you need. import { isFirstDayOfMonth } from '@magmacomputing/tempo-fns' pulls in zero extra bloat.
  • Native Temporal: Functions accept native Temporal.ZonedDateTime and Temporal.PlainDate objects. You don't have to use the Tempo class.
  • Synergy: If you do use the Tempo class wrapper, tempo-fns provides advanced business-intelligence utilities that inherently understand Tempo's Terms engine (e.g., isSameFiscalQuarter).

Usage (NPM / Modern Bundlers)

import { Tempo } from '@magmacomputing/tempo';
import { isFirstDayOfMonth, isSameFiscalQuarter } from '@magmacomputing/tempo-fns';

const today = new Tempo();

if (isFirstDayOfMonth(today)) {
  console.log('Rent is due!');
}

Usage (Static CDN / Browser Global)

If you aren't using a bundler (like Vite, Webpack, or Rollup), we provide a pre-bundled script that exposes a Functions global object.

<script src="https://cdn.jsdelivr.net/npm/@magmacomputing/tempo-fns/dist/tempo-fns.global.js"></script>
<script>
  // Access functions via the Functions global
  Functions.isFirstDayOfMonth(Temporal.Now.plainDateISO());
</script>

Keywords

temporal

FAQs

Package last updated on 22 Jul 2026

Related posts