purdy.js
purdy.js copied to clipboard
errors with proto
TypeError: Cannot convert undefined or null to object
var p = require('purdy'); // eslint-disable-line
p(process.foo, { proto: true });
TypeError: Invalid property descriptor.
var p = require('purdy'); // eslint-disable-line
p(process.stdin, { proto: true });
TypeError: Illegal invocation
const libxmljs = require('libxmljs');
const thing = libxmljs.parseXmlString('<symbol xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60" class="poi-icon" id="poi-icon--4" typeId="-4"> \
<g fill="none" fill-rule="evenodd"> \
<circle cx="30" cy="30" r="30" fill="#7B8A9C" fill-rule="nonzero"/> \
</g> \
</symbol>', { noblanks: true });
var p = require('purdy'); // eslint-disable-line
p(thing.root().clone(), { proto: true });