std
std copied to clipboard
Add .tap method
(any).tamp method should log the object and then return it. It should be applicable to all data types.
"string".tap() // => "string"
{foo: "bar"}.tap() // => {foo: "bar"}
Hi @micheleriva, I'm watching this issue, is there any documentation about it? I'm not able to find information on the web. Another question, this method should be applicable to all data types, is it correct to create a method for each type or is there a way to write the method only one time for all types? Thank you