EdgeJs 20.12.3

dotnet add package EdgeJs --version 20.12.3                
NuGet\Install-Package EdgeJs -Version 20.12.3                
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="EdgeJs" Version="20.12.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EdgeJs --version 20.12.3                
#r "nuget: EdgeJs, 20.12.3"                
#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.
// Install EdgeJs as a Cake Addin
#addin nuget:?package=EdgeJs&version=20.12.3

// Install EdgeJs as a Cake Tool
#tool nuget:?package=EdgeJs&version=20.12.3                

About

With Edge.js you can script Node.js in a .NET and .NET in Node.js.

Edge.js allows you to run Node.js and .NET code in one process. You can call Node.js functions from .NET and .NET functions from Node.js.
Edge.js takes care of marshaling data between CLR and V8. Edge.js also reconciles threading models of single-threaded V8 and multi-threaded CLR. Edge.js ensures correct lifetime of objects on V8 and CLR heaps.

Script CLR from Node.Js on Windows/Linux/macOS with .NET Framework, .Net Core and .NET Standard.

NOTE Scripting Node.Js from CLR is only supported on Windows .NET Framework 4.5

More documentation is available at Edge.Js GitHub page.

NuGet package compiled using Node.js v20.12.2.

How to use

using System;
using System.Threading.Tasks;
using EdgeJs;

class Program
{
    public static async Task Start()
    {
        var func = Edge.Func(@"
            return function (data, callback) {
                callback(null, 'Node.js welcomes ' + data);
            }
        ");

        Console.WriteLine(await func(".NET"));
    }

    static void Main(string[] args)
    {
        Start().Wait();
    }
}

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.

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
20.12.3 1,412 4/26/2024
20.12.2 1,115 4/26/2024
11.15.0 5,773 12/29/2020
11.3.3 79,792 6/2/2019
11.3.2 871 5/21/2019
9.3.4 68,916 2/22/2018
9.3.3 1,503 2/3/2018
9.3.2 6,773 12/23/2017
9.3.1 1,965 12/23/2017