@hygull/bibtex
Version:
Get details about BibTeX (.bib) syntax, available ENTRY types and many more using Node APIs.
24 lines (21 loc) • 689 B
JavaScript
const execFile = require("child_process").execFile;
/***********
execFile() should not be used in a case where the external application
generates a large amount of data.
***********/
// command: string, params: array, (error, stdout, stderr) => {}: function
const child = execFile('node', ['--version'], function(error, stdout, stderr){
if(error){
console.log('Error: ' + error);
} else {
// Standard output
if(stdout)
console.log("Statndard output: ", stdout);
console.log(stderr === null); // false
console.log(stderr === undefined); // false
console.log(stderr === ""); // true
// Standard error
if(stderr)
console.log("Standard error: ", stderr);
};
});