NET-Web-API-w-Angular/my-app/node_modules/@yarnpkg/lockfile/README.md

23 lines
408 B
Markdown
Raw Normal View History

2024-02-09 00:38:41 +00:00
# yarn-lockfile
Parse and/or write `yarn.lock` files
## Usage Examples
```js
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);
```