std icon indicating copy to clipboard operation
std copied to clipboard

Add .tap method

Open micheleriva opened this issue 3 years ago • 1 comments

(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"}

micheleriva avatar Dec 14 '21 07:12 micheleriva

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

AngyDev avatar Jan 14 '22 12:01 AngyDev