Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score100%
Published2 years ago (0.1.4)

A collection of useful utilities for Byteminds PH

ByteMinds PH Utility Packages

Utility packages used in the development of ByteMinds PH web platform.

Installation

Use with npm:

npx jsr add @jhenbert/byteminds-util

Use with deno:

deno add @jhenbert/byteminds-util

Use with pnpm:

pnpm dlx jsr add @jhenbert/byteminds-util

Use with yarn:

yarn dlx jsr add @jhenbert/byteminds-util

Usage

import * as mod from "@jhenbert/byteminds-util";

Example

const sendEmail = async () => {
  const from = "sender@example.com";
  const to = "recipient@example.com";
  const subject = "Hello!";
  const body = "<p>This is a test email.</p>";

  const message = mod.composeMessage(from, to, subject, body);

  const host = "smtp.example.com";
  const port = 587;
  const secure = false;
  const service = "gmail";
  const email = "user@example.com";
  const password = "user_app_password";

  const transporter = mod.mailTransporter(
    host,
    port,
    secure,
    service,
    email,
    password
  );

  try {
    await transporter.sendMail(message);
  } catch (error) {
    console.error("Sending email failed", (error as Error).message);
  }
};
Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@jhenbert/byteminds-util

Import symbol

import * as byteminds_util from "@jhenbert/byteminds-util";
or

Import directly with a jsr specifier

import * as byteminds_util from "jsr:@jhenbert/byteminds-util";

Add Package

pnpm i jsr:@jhenbert/byteminds-util
or (using pnpm 10.8 or older)
pnpm dlx jsr add @jhenbert/byteminds-util

Import symbol

import * as byteminds_util from "@jhenbert/byteminds-util";

Add Package

yarn add jsr:@jhenbert/byteminds-util
or (using Yarn 4.8 or older)
yarn dlx jsr add @jhenbert/byteminds-util

Import symbol

import * as byteminds_util from "@jhenbert/byteminds-util";

Add Package

vlt install jsr:@jhenbert/byteminds-util

Import symbol

import * as byteminds_util from "@jhenbert/byteminds-util";

Add Package

npx jsr add @jhenbert/byteminds-util

Import symbol

import * as byteminds_util from "@jhenbert/byteminds-util";

Add Package

bunx jsr add @jhenbert/byteminds-util

Import symbol

import * as byteminds_util from "@jhenbert/byteminds-util";