repo
replacements.fyi

// package

is-decimal

type: "module"

// preferences

// replacements (1)

snippet::is-decimal

Simple or drop-in replacement

This package is no longer necessary. You can check if a character, or a character code, is a decimal digit by comparing its character code against the `0`-`9` range.

// example

const isDecimal = (character) => {
	const code =
		typeof character === 'string'
			? character.charCodeAt(0)
			: character;
	return code >= 48 && code <= 57;
};