Created
December 18, 2015 20:06
-
-
Save tcoupin/2bb6b7e6f213efcd3866 to your computer and use it in GitHub Desktop.
JSON.parse allow comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Auteur : Thibault Coupin | |
| * Description : Surcharge de JSON.parse pour nettoyer les commentaires. | |
| */ | |
| var stripJsonComments = require('strip-json-comments'); | |
| (function(){ | |
| var proxied = JSON.parse; | |
| JSON.parse = function(str){ | |
| return proxied(stripJsonComments(str)); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment