New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

edge-library

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-library

Simplifying use of edge.js to wrap .NET libraries

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-64%
Maintainers
0
Weekly downloads
 
Created
Source

edge-library

Node module to simplify use of edge.js to wrap .NET libraries.

  1. Allows a group of .NET methods to be instantiated as a block
  2. Methods are lower-cased
  3. Methods are wrapped in $q promises
  4. Arguments are transformed to an array

Installation

npm install edge-library --save

Use

var EdgeLibrary = require('../lib/edge-library').EdgeLibrary;

var test_library_definition = {
    assemblyFile: require('path').join(__dirname, './cs/bin/Release/com.blackpear.edge.test.dll'),
    type: {
        name: 'com.blackpear.edge.test.Lib',
        method: [
            'GetString',
            {
                name: 'GetJsonString',
                return: 'json'
            },
            'Add'
        ]
    }
};

var lib = new EdgeLibrary(test_library_definition);

Method calls use $q promises in place of node.js callbacks:

lib.reflectstring('edge.js rocks!').then(
    function(value){
        console.log(value);
    },
    function(err){
        console.log('ERR:', err);
    }
);

Methods with more than one argument are transformed to an array:

lib.add(1, 2).then(
    function(value){
        console.log(value);
    },
    function(err){
        console.log('ERR:', err);
    }
);

Acknowledgements

Development supported by Black Pear Software Ltd

Keywords

FAQs

Package last updated on 02 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc