Features
Explore
About
Docs
Pricing
Log in
Sign up
Log in
Sign Up
karfau
/
debug
0 Likes
Code
Comments
Pull Requests
Forks
References
4
Readme
console.log (an optional message and) a value and return the value.
debug
Script
v3
Fork
1
2
3
4
export
function
debug
<
T
>
(
value
:
T
,
message
?
:
string
)
:
T
{
message
?
console
.
log
(
message
,
value
)
:
console
.
log
(
value
)
;
return
value
;
}
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.
Sign up for free
?