Skip to content

Instantly share code, notes, and snippets.

View WesTyler's full-sized avatar
:octocat:
.

Wes Tyler WesTyler

:octocat:
.
  • 21:47 (UTC -07:00)
View GitHub Profile
await server.register(plugin, registrationOptions);
server.register(plugin, registrationOptions, (err) => {
if (err) {
console.log('Plugin registration error. Deal with it.');
}
});
@WesTyler
WesTyler / index.js
Created February 17, 2017 21:28
JSON stringify bug with prototype conflict
'use strict';
// Observed in Node v4.5.0 and v5.0.0
// Does not appear to affect Node versions >= 6.x
const Thing = function(input) {
this.value = input;
Object.defineProperty(this, 'nonEnum', {value: 'this should not serialize'});
};
Thing.prototype.nonEnum = 'Overwrite the nonEnum to trigger the bug';