Update index.js

JSON.stringify ignore herited properties by default