Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

computron

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

computron

[![Build Status](https://travis-ci.org/Inist-CNRS/computron.svg?branch=master)](https://travis-ci.org/Inist-CNRS/computron)

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
increased by966.67%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

Computron

:warning: Still working in progress :warning:

Computron is a Node.js library for applying XSLT stylesheets to XML documents. It's also an C++ addon for nodejs which means it use pure C++ code whith the help of libxslt library.

Requirements

This version has been tested in Ubuntu 18.04 with NodeJS v10.

sudo apt install cmake g++ libxml2-dev libxslt1-dev

Install

npm install computron

Usage

const Computron = require('computron');
const transformer = new Computron();

transformer.loadStylesheet('path/to/my/file.xsl', error => {
  if (error) return console.log('dammit');
  
  transformer.apply('path/to/my/file.xml', (error, result) => {
    if (error) return console.log('bloody hell');
    // do something with the result
  });
});

Promises with the help of bluebird package

const Promise = require('bluebird');
const Computron = require('computron');
Promise.promisifyAll(Computron.prototype);
const transformer = new Computron();

transformer.loadStylesheetAsync('path/to/my/file.xsl')
  .then(() => transformer.applyAsync('path/to/my/file.xml'))
  .then(result => {
    // do something with the result
  })
  .catch(console.error)
});

FAQs

Package last updated on 10 Oct 2018

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