Skip to main content
Module

x/fae/typ.ts>typ

A functional module for Deno inspired from Ramda.
Latest
function typ
import { typ } from "https://deno.land/x/fae@v1.1.1/typ.ts";

Gives a single-word string description of the (native) type of a value. The returned types are of type AllTypes

 Fae.typ({}); //=> "Object"
 Fae.typ(1); //=> "Number"
 Fae.typ(false); //=> "Boolean"
 Fae.typ('s'); //=> "String"
 Fae.typ(null); //=> "Null"
 Fae.typ([]); //=> "Array"
 Fae.typ(/[A-z]/); //=> "RegExp"
 Fae.typ(() => {}); //=> "Function"
 Fae.typ(undefined); //=> "Undefined"