<commit_before>var jsontr = require('./json-transform.js');

var items = require('./areas.json');
var transform = {
  "@context": "http://schema.org",
  nid: {
    newName: 'id',
    props: {value:String}
  },
  uuid: {
    props: {value:String}
  },
  changed: {
    props: {value:Number}
  },
  title: {
    newName: "title",
    props: {value: String}
  },
  body: {
    props: {value: String}
  },
  field_mygroup: {
    newName: "mygroup",
    props: {value: String}
  }
};

console.log( JSON.stringify( jsontr.transform(items,transform) ) );
<commit_msg>added manager to the area type<commit_after>var jsontr = require('./json-transform.js');

var items = require('./areas.json');
var transform = {
  "@context": "http://schema.org",
  nid: {
    newName: 'id',
    props: {value:String}
  },
  uuid: {
    props: {value:String}
  },
  changed: {
    props: {value:Number}
  },
  title: {
    newName: "title",
    props: {value: String}
  },
  body: {
    props: {value: String}
  },
  field_manager: {
    newName: "manager",
    props: {target_uuid: {type: String, newName: "uuid"}}
  },
  field_mygroup: {
    newName: "mygroup",
    props: {value: String}
  }
};

console.log( JSON.stringify( jsontr.transform(items,transform) ) );

{'fraction_non_alphanumeric': 0.18744971842316976, 'fraction_numerical': 0.0, 'mean_word_length': 3.132890365448505, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '4284221', 'n_tokens_mistral': 453, 'n_tokens_neox': 458, 'n_words': 94}