# ExYarn

This is a simple library for parsing [Yarn]( lockfiles. This is currently a mostly direct port of Yarn's [own parser](, so it's very imperative-like in many places. I do plan to improve this and make better use of Elixir and OTP's features and ecosystem in the future.

**Note on performance:** This library was built in part as a learning exercise and therefore does not necessarily apply the best possible practices and tools when it comes to code quality and performance. If performance is important to you, I recommend using Dorgan's library ([](, [Github](, which uses [NimbleParsec]( for better performance.

## Installation

The package can be installed by adding `ex_yarn` to your list of dependencies in `mix.exs`:

def deps do
    {:ex_yarn, "~> 0.4.0"}

## Documentation

Documentation is generated with [ExDoc]( and is published at [](

## TODOs

- [x] Write documentation.
- [x] Wrap the parser's output in a struct to make actual usage of the library easier.
- [x] Improve code quality (this will obviously be an ongoing goal, but credo should at least run without errors for this to be considered "completed").
- [ ] Consider using [NimbleParsec]( to replace the parser for better maintainability and performance.
- [x] Reorganize module structure (move ExYarn private functions to other modules)
- [x] Support version 2 of lockfiles