node-copy-paste
node-copy-paste copied to clipboard
copy function in Object is not working
const ncp = require('copy-paste') ncp.copy({ x: function(y){return y} })
expected: {x: function(y){return y}}
actual output: { x: [Function: x] }
hoping to fix it
This is because copy is using node's built in util.inspect to convert objects to strings. This bug is in the unfortunate "real, but non-trivial to fix and not commonly experienced" category, so I'm going to punt until more people ask for a fix or if someone provides a PR.