Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @module manifest-model
*/
const libxml = require( 'libxslt' ).libxmljs;
const url = require( 'url' );
const path = require( 'path' );
const fs = require( 'fs' );
const config = require( './config-model' ).server;
const client = require( 'redis' ).createClient( config.redis.cache.port, config.redis.cache.host, {
auth_pass: config.redis.cache.password
} );
const utils = require( '../lib/utils' );
const debug = require( 'debug' )( 'manifest-model' );
// in test environment, switch to different db
if ( process.env.NODE_ENV === 'test' ) {
client.select( 15 );
}
/**
import * as libxslt from 'libxslt';
import * as libxmljs from 'libxmljs';
const document: libxmljs.XMLDocument = libxslt.libxmljs.parseXmlString('');
let stylesheet: libxslt.Stylesheet;
stylesheet = libxslt.parse('');
stylesheet = libxslt.parse(document);
libxslt.parse('', (err, result) => {
if (err == null) {
stylesheet = result;
}
});
libxslt.parse(document, (err, result) => {
if (err == null) {
stylesheet = result;