Soenneker.JavaScript.Formatter 4.0.83

Prefix Reserved
dotnet add package Soenneker.JavaScript.Formatter --version 4.0.83
                    
NuGet\Install-Package Soenneker.JavaScript.Formatter -Version 4.0.83
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.JavaScript.Formatter" Version="4.0.83" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.JavaScript.Formatter" Version="4.0.83" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.JavaScript.Formatter" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.JavaScript.Formatter --version 4.0.83
                    
#r "nuget: Soenneker.JavaScript.Formatter, 4.0.83"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.JavaScript.Formatter@4.0.83
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.JavaScript.Formatter&version=4.0.83
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.JavaScript.Formatter&version=4.0.83
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.JavaScript.Formatter

Provides utilities for formatting, pretty-printing, normalizing, reading, and saving JavaScript content.

Install

dotnet add package Soenneker.JavaScript.Formatter

Quick start

using Soenneker.JavaScript.Formatter.Registrars;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
var result = services.AddJavaScriptFormatterAsSingleton();

Adds IJavaScriptFormatter as a singleton service.

What you get

  • IJavaScriptFormatter — Provides utilities for formatting, pretty-printing, normalizing, reading, and saving JavaScript content.
  • JavaScriptFormatterRegistrar — A utility library that formats and normalizes JavaScript strings and files.

API at a glance

API What it does Result / important behavior
IJavaScriptFormatter.PrettyPrint(javaScript, cancellationToken) Pretty-prints the specified JavaScript with indentation and readable formatting. The pretty-printed JavaScript.
IJavaScriptFormatter.Normalize(javaScript, cancellationToken) Normalizes the specified JavaScript into a consistent serialized form without pretty-print indentation. The normalized JavaScript.
IJavaScriptFormatter.PrettyPrintFile(filePath, log, cancellationToken) Reads JavaScript from the specified file and pretty-prints it. The pretty-printed JavaScript.
IJavaScriptFormatter.NormalizeFile(filePath, log, cancellationToken) Reads JavaScript from the specified file and normalizes it. The normalized JavaScript.
IJavaScriptFormatter.SavePrettyPrintedFile(sourcePath, destinationPath, log, cancellationToken) Reads JavaScript from the source file, pretty-prints it, and saves the result. A task representing the asynchronous save operation.
IJavaScriptFormatter.SaveNormalizedFile(sourcePath, destinationPath, log, cancellationToken) Reads JavaScript from the source file, normalizes it, and saves the result. A task representing the asynchronous save operation.
IJavaScriptFormatter.PrettyPrintDirectory(directoryPath, recursive, log, cancellationToken) Formats all JavaScript files in the specified directory and saves the results in place. A task representing the asynchronous formatting operation.
JavaScriptFormatterRegistrar.AddJavaScriptFormatterAsSingleton(services) Adds IJavaScriptFormatter as a singleton service. The same service collection, so additional registrations can be chained.
JavaScriptFormatterRegistrar.AddJavaScriptFormatterAsScoped(services) Adds IJavaScriptFormatter as a scoped service. The same service collection, so additional registrations can be chained.

Practical notes

  • Cancellation stops pending work; it does not undo work that has already completed.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.83 0 8/29/2026
4.0.82 0 8/29/2026
4.0.81 9 8/29/2026
4.0.80 70 8/26/2026
4.0.79 58 8/26/2026
4.0.78 68 8/26/2026
4.0.77 85 8/22/2026
4.0.76 80 8/22/2026
4.0.75 84 8/22/2026
4.0.74 81 8/22/2026
4.0.73 90 8/21/2026
4.0.72 89 8/18/2026
4.0.71 87 8/18/2026
4.0.70 96 8/12/2026
4.0.69 90 8/12/2026
4.0.68 93 8/12/2026
4.0.67 94 8/9/2026
4.0.66 99 8/8/2026
4.0.64 87 8/8/2026
4.0.63 93 8/8/2026
Loading failed