source: imaps-frontend/node_modules/json5/lib/register.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 374 bytes
Line 
1const fs = require('fs')
2const JSON5 = require('./')
3
4// eslint-disable-next-line node/no-deprecated-api
5require.extensions['.json5'] = function (module, filename) {
6 const content = fs.readFileSync(filename, 'utf8')
7 try {
8 module.exports = JSON5.parse(content)
9 } catch (err) {
10 err.message = filename + ': ' + err.message
11 throw err
12 }
13}
Note: See TracBrowser for help on using the repository browser.