From f71b291b52289e959556b26e1b468c543681ff52 Mon Sep 17 00:00:00 2001 From: faissaloux Date: Sat, 30 Mar 2024 01:00:14 +0000 Subject: [PATCH] documentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 6da06b5..20c5783 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,18 @@ composer require std-library/type-guard ## Usage +- [`asNumeric()`](#asnumeric) - [`asInt()`](#asint) - [`asString()`](#asstring) +### `asNumeric()` + +Asserts and narrows down the type of the given variable to a numeric. + +```php +$variable = type($variable)->asNumeric(); +``` + ### `asInt()` Asserts and narrows down the type of the given variable to an integer.