toJSON accepts replacer and spaces
Automatically rewritten for npm.