UNPKG

289 BJavaScriptView Raw
1'use strict'
2
3const fs = require('fs')
4const path = require
5
6class Utils {
7 static getPackageJson () {
8 return Utils.getJson(path.join(__dirname, 'package.json'))
9 }
10
11 static getJson (filePath) {
12 return JSON.parse(fs.readFileSync(filePath, 'utf8'))
13 }
14}
15
16module.exports = Utils