Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
function primitiveParseX
import { primitiveParseX } from "https://deno.land/x/simple_utility@v1.6.0/mod.universal.ts";

Convert from dirty text to specified type. If cannot be parsed, use default (def) value. Convert to same type as default value.

Examples

Example 1

const value = primitiveParseX("123", 0);

Type Parameters

T extends string | number | boolean