UNPKG

synp

Version:

Convert yarn.lock to package-lock.json and vice versa

12 lines (8 loc) 227 B
'use strict' const { readFileSync } = require('fs') module.exports = { read (path, skipParse) { const contents = readFileSync(path).toString('utf-8') return skipParse ? contents : JSON.parse(contents.trim()) } }