source: trip-planner-front/node_modules/@yarnpkg/lockfile/README.md

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 408 bytes
Line 
1# yarn-lockfile
2
3Parse and/or write `yarn.lock` files
4
5## Usage Examples
6
7```js
8const fs = require('fs');
9const lockfile = require('@yarnpkg/lockfile');
10// or (es6)
11import fs from 'fs';
12import * as lockfile from '@yarnpkg/lockfile';
13
14let file = fs.readFileSync('yarn.lock', 'utf8');
15let json = lockfile.parse(file);
16
17console.log(json);
18
19let fileAgain = lockfile.stringify(json);
20
21console.log(fileAgain);
22```
Note: See TracBrowser for help on using the repository browser.