@iebh/polyglot 5.1.8 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -31,26 +31,26 @@ var _global = _interopRequireDefault(require("./modules/global.js"));
31
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
32
32
  var polyglot;
33
33
  var _default = polyglot = {
34
- /**
35
- * Translate the given query using the given engine ID
36
- * This is really just a wrapper for the parse() + engine[ENGINE].compile() pipeline
37
- * Output will be run via preProcess() + postProcess()
38
- * @param {string} query The query to translate
39
- * @param {string} engine The ID of the engine to use
40
- * @param {Object} options Optional options structure to pass to the engine
41
- * @return {string} The translated search query
34
+ /**
35
+ * Translate the given query using the given engine ID
36
+ * This is really just a wrapper for the parse() + engine[ENGINE].compile() pipeline
37
+ * Output will be run via preProcess() + postProcess()
38
+ * @param {string} query The query to translate
39
+ * @param {string} engine The ID of the engine to use
40
+ * @param {Object} options Optional options structure to pass to the engine
41
+ * @return {string} The translated search query
42
42
  */
43
43
  translate: function translate(query, engine, options) {
44
44
  var tree = (0, _parse.parse)(query, options);
45
45
  return polyglot.postProcess(_generic["default"].compile(_lodash["default"].cloneDeep(tree), options, engine), options);
46
46
  },
47
- /**
48
- * Translate the given query using all the supported engines
49
- * Calling this function instead of individual 'translate()' calls is much more efficient as the tree needs to be compiled only once
50
- * Output will be run via preProcess() + postProcess()
51
- * @param {string} query The query to translate
52
- * @param {Object} options Optional options structure to pass to each engine
53
- * @return {Object} The translated search query in each case where the engine ID is the key of the object and the value is the translated string
47
+ /**
48
+ * Translate the given query using all the supported engines
49
+ * Calling this function instead of individual 'translate()' calls is much more efficient as the tree needs to be compiled only once
50
+ * Output will be run via preProcess() + postProcess()
51
+ * @param {string} query The query to translate
52
+ * @param {Object} options Optional options structure to pass to each engine
53
+ * @return {Object} The translated search query in each case where the engine ID is the key of the object and the value is the translated string
54
54
  */
55
55
  translateAll: function translateAll(query, options) {
56
56
  var output = {};
@@ -62,12 +62,12 @@ var _default = polyglot = {
62
62
  output['lexicalTreeJSON'] = _engines["default"].lexicalTreeJSON.compile(tree, options), options;
63
63
  return output;
64
64
  },
65
- /**
66
- * Pre-proess the compile tree before it gets handed to each engines compile function
67
- * @param {Object} tree The tree to compile
68
- * @param {Object} [options] Additional options - these are provided downstream from the parent 'parse()' function
69
- * @return {Object} The mutated tree
70
- * @see parse()
65
+ /**
66
+ * Pre-proess the compile tree before it gets handed to each engines compile function
67
+ * @param {Object} tree The tree to compile
68
+ * @param {Object} [options] Additional options - these are provided downstream from the parent 'parse()' function
69
+ * @return {Object} The mutated tree
70
+ * @see parse()
71
71
  */
72
72
  preProcess: function preProcess(tree, options) {
73
73
  var settings = _lodash["default"].defaults(options, {});
@@ -76,18 +76,18 @@ var _default = polyglot = {
76
76
 
77
77
  return tree;
78
78
  },
79
- /**
80
- * Post process the data from an engine
81
- * This function applies the following behaviours:
82
- * - If HTML is true all `\n` characters are replaced with `<br/>`
83
- * - If HTML is false all <span> item wrappers are removed
84
- * @param {string} text The output from the engine - called from translate() / translateAll()
85
- * @param {Object} options Options provided during post-processing - these are provided downstream from the parent 'parse()' function
86
- * @param {boolean} [options.forceString] Force the output to be a string even if the module returns something unusual (e.g. mongodb driver returns an object)
87
- * @param {boolean} [options.html=true] Provide HTML output
88
- * @param {boolean} [options.trim=true] Trim all output lines
89
- * @returns {string} The post processed text
90
- * @see parse()
79
+ /**
80
+ * Post process the data from an engine
81
+ * This function applies the following behaviours:
82
+ * - If HTML is true all `\n` characters are replaced with `<br/>`
83
+ * - If HTML is false all <span> item wrappers are removed
84
+ * @param {string} text The output from the engine - called from translate() / translateAll()
85
+ * @param {Object} options Options provided during post-processing - these are provided downstream from the parent 'parse()' function
86
+ * @param {boolean} [options.forceString] Force the output to be a string even if the module returns something unusual (e.g. mongodb driver returns an object)
87
+ * @param {boolean} [options.html=true] Provide HTML output
88
+ * @param {boolean} [options.trim=true] Trim all output lines
89
+ * @returns {string} The post processed text
90
+ * @see parse()
91
91
  */
92
92
  postProcess: function postProcess(text, options) {
93
93
  var settings = _lodash["default"].defaults(options, {
@@ -27,12 +27,12 @@ var _default = {
27
27
  id: 'generic',
28
28
  title: 'generic',
29
29
  aliases: ['generic', 'g'],
30
- /**
31
- * Compile a tree structure to PubMed output
32
- * @param {array} tree The parsed tree to process
33
- * @param {Object} [options] Optional options to use when compiling
34
- * @param {boolean} [options.replaceWildcards=true] Whether to replace wildcard characters (usually '?' or '$') within phrase nodes with this engines equivelent
35
- * @return {string} The compiled output
30
+ /**
31
+ * Compile a tree structure to PubMed output
32
+ * @param {array} tree The parsed tree to process
33
+ * @param {Object} [options] Optional options to use when compiling
34
+ * @param {boolean} [options.replaceWildcards=true] Whether to replace wildcard characters (usually '?' or '$') within phrase nodes with this engines equivelent
35
+ * @return {string} The compiled output
36
36
  */
37
37
  compile: function compile(tree, options, engine) {
38
38
  var settings = _lodash["default"].defaults(options, {
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- /**
8
- * Collection of supported engines
9
- * Each engine should specify:
10
- * title - Human readable name of the engine
11
- * aliases - Alternative names for each engine
12
- * compile() - function that takes a parsed tree array and returns a string (string can contain HTML markup of the form <span class="black-underline" v-tooltip="message"> content </span>)
13
- * open() - optional function that takes a query and provides the direct searching method
14
- * debugging - optional boolean specifying that the engine is for debugging purposes only
15
- *
16
- * @var {array}
7
+ /**
8
+ * Collection of supported engines
9
+ * Each engine should specify:
10
+ * title - Human readable name of the engine
11
+ * aliases - Alternative names for each engine
12
+ * compile() - function that takes a parsed tree array and returns a string (string can contain HTML markup of the form <span class="black-underline" v-tooltip="message"> content </span>)
13
+ * open() - optional function that takes a query and provides the direct searching method
14
+ * debugging - optional boolean specifying that the engine is for debugging purposes only
15
+ *
16
+ * @var {array}
17
17
  */
18
18
  var _default = {
19
19
  // Lexical tree (JSON) {{{
@@ -24,11 +24,11 @@ var _default = {
24
24
  debugging: true,
25
25
  // Mark this module for debugging only
26
26
 
27
- /**
28
- * Compile a tree structure to JSON output
29
- * @param {array} tree The parsed tree to process
30
- * @param {Object} [options] Optional options to use when compiling
31
- * @return {string} The compiled output
27
+ /**
28
+ * Compile a tree structure to JSON output
29
+ * @param {array} tree The parsed tree to process
30
+ * @param {Object} [options] Optional options to use when compiling
31
+ * @return {string} The compiled output
32
32
  */
33
33
  compile: function compile(tree, options) {
34
34
  return tree;
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  // File contains global variables
8
8
  var _default = {
9
- /**
10
- * List of example search queries
11
- * See tests/examples.js for the outputs in each case
12
- * @var {array}
9
+ /**
10
+ * List of example search queries
11
+ * See tests/examples.js for the outputs in each case
12
+ * @var {array}
13
13
  */
14
14
  examples: [{
15
15
  title: 'Failure of antibiotic prescribing for bacterial infections',
@@ -35,13 +35,13 @@ var _default = {
35
35
  no_field_tag: [] // Stores offsets for phrases with no field tags (for replacement)
36
36
  },
37
37
 
38
- /**
39
- * List of templates
40
- * Each key is the (case insensitive; specify in lowercase) keyword used in angular brackets
41
- * Each value is an object containing 'name', 'description', 'debugging' and an engines object with an additional 'default' key
42
- * @var {Object}
43
- * @example
44
- * {rct: {engines: {default: 'foo', ovid: 'bar'}}} // `<rct>` => 'foo' in most databases and 'bar' in Ovid MEDLINE
38
+ /**
39
+ * List of templates
40
+ * Each key is the (case insensitive; specify in lowercase) keyword used in angular brackets
41
+ * Each value is an object containing 'name', 'description', 'debugging' and an engines object with an additional 'default' key
42
+ * @var {Object}
43
+ * @example
44
+ * {rct: {engines: {default: 'foo', ovid: 'bar'}}} // `<rct>` => 'foo' in most databases and 'bar' in Ovid MEDLINE
45
45
  */
46
46
  // TODO: Update templates to match new engines
47
47
  templates: {
@@ -17,17 +17,17 @@ function escapeRegExp(string) {
17
17
  return string.replace(/[.*+?^${}()[\]\\]/g, '\\$&'); // $& means the whole matched string
18
18
  }
19
19
 
20
- /**
21
- * Parse a given string into a lexical object tree
22
- * This tree can then be recompiled via each engines compile()
23
- * @param {string} query The query string to compile. This can be multiline
24
- * @param {Object} [options] Optional options to use when parsing
25
- * @param {boolean} [options.groupLines=false] Wrap lines inside their own groups (only applies if multiple lines are present)
26
- * @param {boolean} [options.groupLinesAlways=true] Group lines even if there is only one apparent line (i.e. enclose single line queries within brackets)
27
- * @param {boolean} [options.transposeLines=true] Insert all line references where needed (e.g. `1 - 3/OR`)
28
- * @param {boolean} [options.removeNumbering=true] Remove any number prefixes from lines - this is a classic copy/paste error from certain online search engines (e.g. `1. Term` -> `term`)
29
- * @param {boolean} [options.preserveNewlines=true] Preserve newlines in the output as 'raw' tree nodes
30
- * @return {array} Array representing the parsed tree nodes
20
+ /**
21
+ * Parse a given string into a lexical object tree
22
+ * This tree can then be recompiled via each engines compile()
23
+ * @param {string} query The query string to compile. This can be multiline
24
+ * @param {Object} [options] Optional options to use when parsing
25
+ * @param {boolean} [options.groupLines=false] Wrap lines inside their own groups (only applies if multiple lines are present)
26
+ * @param {boolean} [options.groupLinesAlways=true] Group lines even if there is only one apparent line (i.e. enclose single line queries within brackets)
27
+ * @param {boolean} [options.transposeLines=true] Insert all line references where needed (e.g. `1 - 3/OR`)
28
+ * @param {boolean} [options.removeNumbering=true] Remove any number prefixes from lines - this is a classic copy/paste error from certain online search engines (e.g. `1. Term` -> `term`)
29
+ * @param {boolean} [options.preserveNewlines=true] Preserve newlines in the output as 'raw' tree nodes
30
+ * @return {array} Array representing the parsed tree nodes
31
31
  */
32
32
  var parse = function parse(query, options) {
33
33
  var settings = _lodash["default"].defaults(options, {
@@ -81,9 +81,9 @@ var parse = function parse(query, options) {
81
81
  // }}}
82
82
 
83
83
  // Utility functions {{{
84
- /**
85
- * Trim previous leaf content if it has any text
86
- * The leaf will be removed completely if it is now blank
84
+ /**
85
+ * Trim previous leaf content if it has any text
86
+ * The leaf will be removed completely if it is now blank
87
87
  */
88
88
  function trimLastLeaf() {
89
89
  if (leaf && _lodash["default"].includes(['phrase', 'raw'], leaf.type) && / $/.test(leaf.content)) {
@@ -92,9 +92,9 @@ var parse = function parse(query, options) {
92
92
  }
93
93
  }
94
94
  ;
95
- /**
96
- * End the previous line branch and create a new one
97
- * this function is run every time a new raw node is inserted
95
+ /**
96
+ * End the previous line branch and create a new one
97
+ * this function is run every time a new raw node is inserted
98
98
  */
99
99
  function newLine(currentNumber) {
100
100
  lastGroup = branch;
@@ -7,19 +7,19 @@ exports["default"] = void 0;
7
7
  var _global = _interopRequireDefault(require("./global.js"));
8
8
  var _lodash = _interopRequireDefault(require("lodash"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- /**
11
- * Collection of utility functions to apply common behaviour to a compiled tree
12
- * @var {Object}
10
+ /**
11
+ * Collection of utility functions to apply common behaviour to a compiled tree
12
+ * @var {Object}
13
13
  */
14
14
  var tools = {
15
- /**
16
- * Visit the given node types within a deeply nested tree and run a function
17
- * This function may mutate the input tree depending on the actions of the callbacks
18
- * NOTE: If the return value of the callback is `"DEL"` the node is deleted
19
- * @param {array} tree The tree sturcture to operate on
20
- * @param {null|array} types Node filter to apply to (if falsy all are used)
21
- * @param {function} callback The callback to call with each node. Called as (node, path)
22
- * @return {array} The input tree
15
+ /**
16
+ * Visit the given node types within a deeply nested tree and run a function
17
+ * This function may mutate the input tree depending on the actions of the callbacks
18
+ * NOTE: If the return value of the callback is `"DEL"` the node is deleted
19
+ * @param {array} tree The tree sturcture to operate on
20
+ * @param {null|array} types Node filter to apply to (if falsy all are used)
21
+ * @param {function} callback The callback to call with each node. Called as (node, path)
22
+ * @return {array} The input tree
23
23
  */
24
24
  visit: function visit(tree, types, callback) {
25
25
  var removals = []; // Stack of removal paths we are performing when done
@@ -49,13 +49,13 @@ var tools = {
49
49
  });
50
50
  return tree;
51
51
  },
52
- /**
53
- * Apply a series of text replacements to every matching node object within a tree
54
- * This function mutates tree
55
- * @param {array} tree The tree sturcture to operate on
56
- * @param {null|array} types Type filter to apply. If falsy all are used
57
- * @param {array} replacements Array of replacements to apply. Each must be of the form `{subject: STRING|REGEXP, value: STRING|FUNCTION}`
58
- * @return {array} The input tree element with the replacements applied
52
+ /**
53
+ * Apply a series of text replacements to every matching node object within a tree
54
+ * This function mutates tree
55
+ * @param {array} tree The tree sturcture to operate on
56
+ * @param {null|array} types Type filter to apply. If falsy all are used
57
+ * @param {array} replacements Array of replacements to apply. Each must be of the form `{subject: STRING|REGEXP, value: STRING|FUNCTION}`
58
+ * @return {array} The input tree element with the replacements applied
59
59
  */
60
60
  replaceContent: function replaceContent(tree, types, replacements) {
61
61
  this.visit(tree, types, function (branch) {
@@ -83,12 +83,12 @@ var tools = {
83
83
  return text;
84
84
  }
85
85
  },
86
- /**
87
- * Retrieve the contents of a template by its ID
88
- * NOTE: If the specific engine definition is not found 'default' is used (and it will be pre-parsed via .translate())
89
- * @param {string} template The template to resolve
90
- * @param {string} engine The current engine (used to get the correct sub-templating string)
91
- * @return {string} The resolved template
86
+ /**
87
+ * Retrieve the contents of a template by its ID
88
+ * NOTE: If the specific engine definition is not found 'default' is used (and it will be pre-parsed via .translate())
89
+ * @param {string} template The template to resolve
90
+ * @param {string} engine The current engine (used to get the correct sub-templating string)
91
+ * @return {string} The resolved template
92
92
  */
93
93
  resolveTemplate: function resolveTemplate(template, engine) {
94
94
  if (!_global["default"].templates[template]) return 'UNKNOWN-TEMPLATE:' + template;
@@ -97,11 +97,11 @@ var tools = {
97
97
  if (!_global["default"].templates[template].engines[engine]) return "Template: \"".concat(template, "\" not found for engine: \"").concat(engine, "\"");
98
98
  return '';
99
99
  },
100
- /**
101
- * Structure the wild cards correctly for cochrane to ensure no wildcards appear inside quotation marks
102
- * @param {string} text The text to parse
103
- * @param {Boolean} highlighting Whether to assign custom fonts
104
- * @return {string} The parsed string seperated by NEXT
100
+ /**
101
+ * Structure the wild cards correctly for cochrane to ensure no wildcards appear inside quotation marks
102
+ * @param {string} text The text to parse
103
+ * @param {Boolean} highlighting Whether to assign custom fonts
104
+ * @return {string} The parsed string seperated by NEXT
105
105
  */
106
106
  wildCardCochrane: function wildCardCochrane(text, highlighting) {
107
107
  var wildcards = ["?", "$", "*"];
@@ -141,11 +141,11 @@ var tools = {
141
141
  }
142
142
  return foundMatch ? "(".concat(words.join(" "), ")") : words.join(" ");
143
143
  },
144
- /**
145
- * Print number in format defined by engine
146
- * @param {string} engine Engine to use
147
- * @param {string} ref Branch ref (e.g. 1)
148
- * @return {string} Formatted number
144
+ /**
145
+ * Print number in format defined by engine
146
+ * @param {string} engine Engine to use
147
+ * @param {string} ref Branch ref (e.g. 1)
148
+ * @return {string} Formatted number
149
149
  */
150
150
  printNumber: function printNumber(engine, ref) {
151
151
  // Get line number format for engine
@@ -179,12 +179,12 @@ var tools = {
179
179
  }
180
180
  return number;
181
181
  },
182
- /**
183
- * Determine if a phrase needs to be enclosed within speachmarks and return the result
184
- * @param {Object} branch Phrase branch to examine
185
- * @param {string} engine Optional engine ID to examine for other enclose methods
186
- * @param {boolean} highlighting Optional bool to determine if html color styling is added
187
- * @return {string} The phrase enclosed as needed
182
+ /**
183
+ * Determine if a phrase needs to be enclosed within speachmarks and return the result
184
+ * @param {Object} branch Phrase branch to examine
185
+ * @param {string} engine Optional engine ID to examine for other enclose methods
186
+ * @param {boolean} highlighting Optional bool to determine if html color styling is added
187
+ * @return {string} The phrase enclosed as needed
188
188
  */
189
189
  quotePhrase: function quotePhrase(branch, engine, settings) {
190
190
  var text = _lodash["default"].trimEnd(branch.content);
@@ -312,11 +312,11 @@ var tools = {
312
312
  }
313
313
  return engine == 'Embase (Elsevier)' ? space ? settings.highlighting ? "<font color='DarkBlue'>'" + text + "'</font>" : "'" + text + "'" : text : space ? settings.highlighting ? '<font color="DarkBlue">"' + text + '"</font>' : '"' + text + '"' : text;
314
314
  },
315
- /**
316
- * Convert the '$or' / '$and' nodes within a tree into a nested structure
317
- * This function will also flatten identical branches (i.e. run-on multiple $and / $or into one array)
318
- * @param {Object} tree The object tree to recombine
319
- * @returns {Object} The recombined tree
315
+ /**
316
+ * Convert the '$or' / '$and' nodes within a tree into a nested structure
317
+ * This function will also flatten identical branches (i.e. run-on multiple $and / $or into one array)
318
+ * @param {Object} tree The object tree to recombine
319
+ * @returns {Object} The recombined tree
320
320
  */
321
321
  renestConditions: function renestConditions(tree) {
322
322
  if (!_lodash["default"].isArray(tree)) return tree; // Not an array - skip
@@ -340,17 +340,17 @@ var tools = {
340
340
  return res;
341
341
  }, []);
342
342
  },
343
- /**
344
- * Combine multiple run-on $and / $or conditional branches into one branch
345
- * This function is a companion function to renestConditions and should be called directly afterwards if needed
346
- * @param {Object} tree The tree to traverse
347
- * @param {Object} [options] Additional options to accept
348
- * @param {number} [options.depth=10] The maximum depth to traverse before giving up, set to 0 to infinitely recurse
349
- * @return {Object} The collapsed tree
350
- * @example
351
- * {left, joinAnd, right} => {joinAnd: [left, right]}
352
- * @example
353
- * {foo, joinOr, bar, joinOr, baz} => {joinOr: [foo, bar, baz]}
343
+ /**
344
+ * Combine multiple run-on $and / $or conditional branches into one branch
345
+ * This function is a companion function to renestConditions and should be called directly afterwards if needed
346
+ * @param {Object} tree The tree to traverse
347
+ * @param {Object} [options] Additional options to accept
348
+ * @param {number} [options.depth=10] The maximum depth to traverse before giving up, set to 0 to infinitely recurse
349
+ * @return {Object} The collapsed tree
350
+ * @example
351
+ * {left, joinAnd, right} => {joinAnd: [left, right]}
352
+ * @example
353
+ * {foo, joinOr, bar, joinOr, baz} => {joinOr: [foo, bar, baz]}
354
354
  */
355
355
  combineConditions: function combineConditions(tree, options) {
356
356
  var settings = _lodash["default"].defaults(options, {
@@ -400,19 +400,19 @@ var tools = {
400
400
  });
401
401
  return tree;
402
402
  },
403
- /**
404
- * Create a tooltip with a specified message
405
- * @param {string} content Content to append tooltip to
406
- * @param {string} message Message to contain inside tooltip
407
- * @param {string} css CSS class to use
403
+ /**
404
+ * Create a tooltip with a specified message
405
+ * @param {string} content Content to append tooltip to
406
+ * @param {string} message Message to contain inside tooltip
407
+ * @param {string} css CSS class to use
408
408
  */
409
409
  createTooltip: function createTooltip(content, message, css) {
410
410
  css = typeof css !== 'undefined' ? css : "black-underline";
411
411
  return "<span class=\"" + css + '" v-tooltip="`' + message + '`">' + content + '</span>';
412
412
  },
413
- /**
414
- * Create a popover with options to replace empty field tags with specified field tag
415
- * @param {string} content Content to append popover to
413
+ /**
414
+ * Create a popover with options to replace empty field tags with specified field tag
415
+ * @param {string} content Content to append popover to
416
416
  */
417
417
  createPopover: function createPopover(content, offset) {
418
418
  return '<v-popover offset="8" placement="right">' + '<span class="blue-underline">' + content + '</span>' + '<template slot="popover">' + '<h3 class="popover-header">Add Field Tag</h3>' + '<input class="tooltip-content" v-model="customField" placeholder="Field tag" />' + '<div class="replace-all">' + '<input type="checkbox" id="checkbox" v-model="replaceAll">' + '<label for="checkbox">Replace All</label>' + '</div>' + '<div class="replace-buttons">' + '<button v-on:click="replaceFields(customField, replaceAll, ' + offset + ')" type="button" class="btn btn-primary">Replace</button>' + '<button v-close-popover type="button" class="btn btn-dark">Close</button>' + '</div>' + '</template>' + '</v-popover>';
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "@iebh/polyglot",
3
- "version": "5.1.8",
4
- "description": "IEBH-SRA tool to convert between different medical database search formats",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "test": "npm run prepare && mocha",
8
- "test:old": "npm run prepare && mocha './test/**/!(v4).js'",
9
- "test:new": "npm run prepare && mocha test/v4",
10
- "prepare": "babel src --out-dir lib",
11
- "preprocess": "cd ./data && node ./preprocess"
12
- },
13
- "babel": {
14
- "presets": [
15
- "@babel/preset-env"
16
- ]
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/IEBH/sra-polyglot.git"
21
- },
22
- "keywords": [
23
- "iebh",
24
- "sra",
25
- "search",
26
- "translation",
27
- "syntax",
28
- "conversion",
29
- "polyglot",
30
- "medical",
31
- "research"
32
- ],
33
- "author": [
34
- "Matt Carter <m@ttcarter.com> (https://github.com/hash-bang)",
35
- "Connor Forbes <cforbes.software@gmail.com> (https://github.com/connorf25)",
36
- "Justin Cark <jclark@bond.edu.au> (https://github.com/Justin-Clarc)",
37
- "Tian Liang <amethystoct2012@gmail.com> (https://github.com/Octian)",
38
- "Irene Priya Jose <irenepriyajose@gmail.com> (https://github.com/s5333384)"
39
- ],
40
- "license": "MIT",
41
- "bugs": {
42
- "url": "https://github.com/IEBH/sra-polyglot/issues"
43
- },
44
- "homepage": "https://github.com/IEBH/sra-polyglot#readme",
45
- "devDependencies": {
46
- "@babel/cli": "^7.0.0",
47
- "@babel/core": "^7.0.0",
48
- "@babel/plugin-syntax-dynamic-import": "^7.2.0",
49
- "@babel/preset-env": "^7.0.0",
50
- "chai": "^4.2.0",
51
- "mocha": "^8.4.0",
52
- "xlsx": "^0.16.9"
53
- },
54
- "dependencies": {
55
- "lodash": "^4.17.15"
56
- },
57
- "engines": {
58
- "node": ">=14.0.0"
59
- }
60
- }
1
+ {
2
+ "name": "@iebh/polyglot",
3
+ "version": "5.2.0",
4
+ "description": "IEBH-SRA tool to convert between different medical database search formats",
5
+ "main": "lib/index.js",
6
+ "scripts": {
7
+ "test": "npm run prepare && mocha",
8
+ "test:old": "npm run prepare && mocha './test/**/!(v4).js'",
9
+ "test:new": "npm run prepare && mocha test/v4",
10
+ "prepare": "babel src --out-dir lib",
11
+ "preprocess": "cd ./data && node ./preprocess"
12
+ },
13
+ "babel": {
14
+ "presets": [
15
+ "@babel/preset-env"
16
+ ]
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/IEBH/sra-polyglot.git"
21
+ },
22
+ "keywords": [
23
+ "iebh",
24
+ "sra",
25
+ "search",
26
+ "translation",
27
+ "syntax",
28
+ "conversion",
29
+ "polyglot",
30
+ "medical",
31
+ "research"
32
+ ],
33
+ "author": [
34
+ "Matt Carter <m@ttcarter.com> (https://github.com/hash-bang)",
35
+ "Connor Forbes <cforbes.software@gmail.com> (https://github.com/connorf25)",
36
+ "Justin Cark <jclark@bond.edu.au> (https://github.com/Justin-Clarc)",
37
+ "Tian Liang <amethystoct2012@gmail.com> (https://github.com/Octian)",
38
+ "Irene Priya Jose <irenepriyajose@gmail.com> (https://github.com/s5333384)"
39
+ ],
40
+ "license": "MIT",
41
+ "bugs": {
42
+ "url": "https://github.com/IEBH/sra-polyglot/issues"
43
+ },
44
+ "homepage": "https://github.com/IEBH/sra-polyglot#readme",
45
+ "devDependencies": {
46
+ "@babel/cli": "^7.0.0",
47
+ "@babel/core": "^7.0.0",
48
+ "@babel/plugin-syntax-dynamic-import": "^7.2.0",
49
+ "@babel/preset-env": "^7.0.0",
50
+ "chai": "^4.2.0",
51
+ "mocha": "^8.4.0",
52
+ "xlsx": "^0.16.9"
53
+ },
54
+ "dependencies": {
55
+ "lodash": "^4.17.15"
56
+ },
57
+ "engines": {
58
+ "node": ">=14.0.0"
59
+ }
60
+ }