hjw 6c42b6a025 first commit 10 ماه پیش
..
README.md 6c42b6a025 first commit 10 ماه پیش
index.js 6c42b6a025 first commit 10 ماه پیش
package.json 6c42b6a025 first commit 10 ماه پیش

README.md

yarn-lockfile

Parse and/or write yarn.lock files

Usage Examples

const fs = require('fs');
const lockfile = require('@yarnpkg/lockfile');
// or (es6)
import fs from 'fs';
import * as lockfile from '@yarnpkg/lockfile';

let file = fs.readFileSync('yarn.lock', 'utf8');
let json = lockfile.parse(file);

console.log(json);

let fileAgain = lockfile.stringify(json);

console.log(fileAgain);