<commit_before>const nativejsx = require('./source/nativejsx');

// Asynchronous, ideal for bulk operations.
nativejsx.parse('./test/jsx/test.jsx').then((byPromise) => {
  // ==>
  console.log(byPromise);
});

// OR Synchronous, for callback and promise naysayers :).
const bySync = nativejsx.parseSync('./test/jsx/node-expressions.jsx', {prototypes: 'inline'});
// ==>
console.log(bySync);

// OR We must go deeper.
const byString = nativejsx.transpile('var something = <div></div>;');
// ==>
console.log(byString);<commit_msg>Adds a .catch to the promise example.<commit_after>const nativejsx = require('./source/nativejsx');

// Asynchronous, ideal for bulk operations.
nativejsx.parse('./test/jsx/test.jsx').
  then((byPromise) => {
    // ==>
    console.log(byPromise);
  }).
  catch((error) => {
    console.error(error);
  });

// OR Synchronous, for callback and promise naysayers :).
const bySync = nativejsx.parseSync('./test/jsx/node-expressions.jsx', {prototypes: 'inline'});
// ==>
console.log(bySync);

// OR We must go deeper.
const byString = nativejsx.transpile('var something = <div></div>;');
// ==>
console.log(byString);
{'fraction_non_alphanumeric': 0.19702276707530647, 'fraction_numerical': 0.0, 'mean_word_length': 4.171945701357466, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3565580', 'n_tokens_mistral': 385, 'n_tokens_neox': 384, 'n_words': 76}