diff --git a/README.md b/README.md index e86f180..760901b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_759 TILs and counting..._ +_760 TILs and counting..._ --- @@ -55,6 +55,7 @@ _759 TILs and counting..._ ### Chrome - [Access A Value Logged To The Console](chrome/access-a-value-logged-to-the-console.md) +- [Copy Some Data From The Console](chrome/copy-some-data-from-the-console.md) - [Duplicate The Current Tab](chrome/duplicate-the-current-tab.md) - [Easier Access To Network Throttling Controls](chrome/easier-access-to-network-throttling-controls.md) - [Pretty Print Tabular Data](chrome/pretty-print-tabular-data.md) diff --git a/chrome/copy-some-data-from-the-console.md b/chrome/copy-some-data-from-the-console.md new file mode 100644 index 0000000..f6dee4d --- /dev/null +++ b/chrome/copy-some-data-from-the-console.md @@ -0,0 +1,20 @@ +# Copy Some Data From The Console + +Sometimes you have some data that you are playing around with in the +console, something you logged from an API response. You then want to share +it, so you try to copy the whole thing into your system copy buffer. There +are a couple hacky ways of doing this, but Chrome supports a really smooth +way. + +Use the `copy` function. + +```javascript +characters +> (8) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}] +copy(characters[1]) +``` + +My system copy buffer now contains the entire object that makes up the +second entry in that list. I can then paste it into Slack or wherever. + +[source](https://twitter.com/addyosmani/status/1092686766375616517)