| Crates.io | yarn-lock-parser |
| lib.rs | yarn-lock-parser |
| version | 0.12.0 |
| created_at | 2021-02-20 23:38:14.842153+00 |
| updated_at | 2025-09-11 09:46:48.169175+00 |
| description | yarn.lock parser |
| homepage | |
| repository | https://github.com/robertohuertasm/yarn-lock-parser |
| max_upload_size | |
| id | 358239 |
| size | 56,243 |
Easily parse yarn-lock files (v1 and v2).
use std::{error::Error, fs};
use yarn_lock_parser::{parse_str, Entry};
fn main() -> Result<(), Box<dyn Error>> {
let yarn_lock_text = fs::read_to_string("yarn.lock")?;
let entries: Vec<Entry> = parse_str(&yarn_lock_text)?;
println!("{:?}", entries);
Ok(())
}
Visit https://docs.rs/yarn-lock-parser/
You will need cargo, the Rust package manager.
cargo build
cargo test