Skip to content
/ std Public

Date conversion to Julian Days, Google Sheets date, and toISOLocaleString, plus a duration formatter.

License

Notifications You must be signed in to change notification settings

epdoc/std

Repository files navigation

@epdoc/std

A collection of standard library modules for Deno and TypeScript, providing robust and reusable utilities for common programming tasks.

Workspaces

This repository is organized into several workspaces, each focusing on a specific domain:

Workspace Description
daterange Utilities for creating and managing date ranges.
datetime Tools for working with dates and times.
duration Functions for handling time durations and formatting.
fs A library for advanced filesystem operations.
response Helpers for creating consistent and safe API responses.
string A collection of advanced string manipulation utilities.
type A set of type guards and utilities for runtime type safety.

Usage

You can add a package to your project using the deno add command, which will add the package to your deno.json file. It is recommended to pin to a specific version for stability.

deno add @epdoc/type

Note: Please replace 0.1.0 with the desired version tag.

Then, you can import and use the modules in your code.

// Example: Using the isString type guard from the 'type' module
import { isString } from '@epdoc/type';

const value: unknown = 'hello world';

if (isString(value)) {
  console.log(value.toUpperCase()); // HELLO WORLD
}

Direct URL Imports

Alternatively, you can import a module directly from its URL without adding it to your deno.json.

// Example: Using the isString type guard from the 'type' module
import { isString } from 'https://deno.land/x/epdoc_std@v0.1.0/type/mod.ts';

const value: unknown = 'hello world';

if (isString(value)) {
  console.log(value.toUpperCase()); // HELLO WORLD
}

Note: Please replace v0.1.0 with the desired version tag.

Development

Running Tests

To run all tests for all workspaces, execute the following command from the root of the repository:

deno test

To run tests for a specific workspace, navigate to its directory:

cd type
deno task test

Formatting

This project uses deno fmt for code formatting.

deno fmt

License

This project is licensed under the terms of the MIT License.

About

Date conversion to Julian Days, Google Sheets date, and toISOLocaleString, plus a duration formatter.

Resources

License

Stars

Watchers

Forks

Packages

No packages published