Skip to main content
Home
This package has been archived, and as such it is read-only.

Built and signed on GitHub Actions

latest

A small, focused TypeScript library for safer code through functional patterns using natural language. Inspired by folktale.

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 Score
100%
Published
a month ago (0.5.0)
type alias Nothing

Represents the absence of a value.

Null or undefined effectively mean the same thing: nothing. This type provides a semantic alias for null | undefined and is used throughout folklore to represent empty or missing values.

Examples

Example 1

// Function that might return nothing
function findUser(id: string): User | Nothing {
  return users.get(id) ?? null
}

Definition

null | undefined

See

  • Nullable for creating optional value types

New Ticket: 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:@folklore/folklore

Import symbol

import { type Nothing } from "@folklore/folklore";
or

Import directly with a jsr specifier

import { type Nothing } from "jsr:@folklore/folklore";

Add Package

pnpm i jsr:@folklore/folklore
or (using pnpm 10.8 or older)
pnpm dlx jsr add @folklore/folklore

Import symbol

import { type Nothing } from "@folklore/folklore";

Add Package

yarn add jsr:@folklore/folklore
or (using Yarn 4.8 or older)
yarn dlx jsr add @folklore/folklore

Import symbol

import { type Nothing } from "@folklore/folklore";

Add Package

vlt install jsr:@folklore/folklore

Import symbol

import { type Nothing } from "@folklore/folklore";

Add Package

npx jsr add @folklore/folklore

Import symbol

import { type Nothing } from "@folklore/folklore";

Add Package

bunx jsr add @folklore/folklore

Import symbol

import { type Nothing } from "@folklore/folklore";