Skip to the content

Hikidashi引き出し

Era dates (和暦) and kanji numerals both ways, the dictionary forms of a conjugated word, a reading shared out over its kanji, words pulled from pasted text, and how hard a sentence is to read.

Hikidashi (引き出し) is a drawer: each tool is pulled out when it is wanted. About the name

Contents

Reference · Kanji numerals

LARGEST_JAPANESE_NUMBERconstant

The largest number this module will answer for: 9,007,199,254,740,991, JavaScript's largest safe integer.

JavaScript stops counting exactly above it, and a number the runtime cannot hold is worse than one that is not offered: it would answer, confidently, with a value a digit or two out.

Import it

import { LARGEST_JAPANESE_NUMBER } from "@johnmorrisdotca/hikidashi/numerals";

Also exported from: @johnmorrisdotca/hikidashi

Definition

const LARGEST_JAPANESE_NUMBER: number = Number.MAX_SAFE_INTEGER

Examples

import { LARGEST_JAPANESE_NUMBER, writeJapaneseNumber } from "@johnmorrisdotca/hikidashi/numerals";

console.log(LARGEST_JAPANESE_NUMBER, writeJapaneseNumber(LARGEST_JAPANESE_NUMBER));
console.log(writeJapaneseNumber(LARGEST_JAPANESE_NUMBER + 1));
9007199254740991 九千七兆千九百九十二億五千四百七十四万九百九十一
null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hikidashi 1.1.0.