npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@devaloop/prettier-plugin-devalang

v0.0.7

Published

Prettier plugin for Devalang formatting

Downloads

33

Readme

TypeScript Node.js

NPM Version License

NPM Downloads

🦊 Prettier Plugin for Devalang

Devalang is a domain-specific language (DSL) for music makers, sound designers, and audio hackers. Compose loops, control samples, render and play audio — all in clean, readable text.

Whether you're building a track, shaping textures, or performing live, Devalang helps you think in rhythms. It’s designed to be simple, expressive, and fast — because your ideas shouldn’t wait.

From studio sketches to live sets, Devalang gives you rhythmic control — with the elegance of code.

📚 Quick Access

🚀 New in v0.0.7 (V2 Support)

🎯 Complete V2 statement support Now recognizes all Devalang V2 statements: pattern, for, automate, param, and keyframes

🎯 100% blank line preservation All blank lines are preserved exactly as written — no more lost spacing!

🎯 Optimized chain params Smart formatting for arrow calls (->) with intelligent line breaking for long chains

🎯 Guaranteed idempotence Second format is identical to first format — stable and predictable formatting

🎯 25+ statements supported Complete coverage of Devalang language features

✨ Features

🔹 Clean formatting for .deva files
Say goodbye to messy indentation and inconsistent spacing. Your Devalang code is auto-magically formatted with precision 🧹

🔸 Preserves blank lines & comments
Comments (# like this) and intentional spacing are respected — because context matters 💬

🔹 Smart indentation for blocks
Handles loop, group, and conditional if / else if / else blocks with proper indentation, just like you'd expect 🧠

🔸 Effect chaining
Automatically formats chained effects (->) for better readability and consistency.

🔹 Consistent formatting
Ensures that all Devalang code follows the same style guidelines, making it easier to read and maintain.

🔸 Seamless integration
Works out of the box in VS Code, Prettier, and any compatible editor 💻⚙️


🧩 Built with love to make your Devalang experience smoother and your files prettier!

Installation

To install the plugin, run the following command:

npm install --save-dev @devaloop/prettier-plugin-devalang

Usage

To use the plugin, you need to configure Prettier to recognize it. You can do this by adding the following configuration to your .prettierrc file:

{
  "plugins": ["@devaloop/prettier-plugin-devalang"]
}

You can also specify the plugin directly in the Prettier CLI command:

npx prettier --plugin=@devaloop/prettier-plugin-devalang --write your-file.deva

Example

Here's an example of how to format a Devalang file using the plugin:

# This is a comment

bank devaloop.808 as myBank

let mySynth = synth saw { attack: 0.01, release: 0.1, decay: 0.2, sustain: 0.8 }

mySynth -> note(C4) -> duration(1/4) -> drive({ amp: 0.5, color: 0.7 }) -> reverb({ mix: 0.3 })

loop 10:
        .myBank.kick 1/8
    .myBank.snare 1500
              .myBank.clap auto

After formatting with Prettier, it will look like this:

# This is a comment

bank devaloop.808 as myBank

let mySynth = synth saw {
    attack: 0.01,
    release: 0.1,
    decay: 0.2,
    sustain: 0.8,
}

mySynth -> note(C4) 
        -> duration(1/4) 
        -> drive({ amp: 0.5, color: 0.7 }) 
        -> reverb({ room_size: 0.3 })

loop 10:
    .myBank.kick 1/8
    .myBank.snare 1500
    .myBank.clap auto

The plugin automatically indents the code and ensures consistent formatting across your Devalang files.

Development

To contribute to the development of this plugin, you can clone the repository and run the following commands:

git clone https://github.com/devaloop-labs/prettier-plugin-devalang.git
cd prettier-plugin-devalang
npm install
npm run test

This will build the plugin and run the test file located in test/index.js.

NOTE: Prettier CLI is not used in this project, so you need to run the test file directly with Node.js.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

We welcome contributions to this project! If you find a bug or have a feature request, please open an issue on GitHub. You can also submit pull requests for any improvements or fixes.

Acknowledgements

  • Prettier for its amazing code formatting capabilities.
  • Devalang for providing the foundation for this plugin.

Contact

If you have any questions or need support, feel free to reach out to us: [email protected]