deno.land / x / rambda@v9.1.1 / source / type.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
export function type(input){ if (input === null){ return 'Null' } else if (input === undefined){ return 'Undefined' } else if (Number.isNaN(input)){ return 'NaN' } const typeResult = Object.prototype.toString.call(input).slice(8, -1)
return typeResult === 'AsyncFunction' ? 'Promise' : typeResult}
rambda

Version Info

Tagged at
2 months ago