Created
October 1, 2016 18:33
-
-
Save sgithens/2fba2aab4879030939278dd061302b41 to your computer and use it in GitHub Desktop.
438:74 error Don't make functions within a loop no-loop-func
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // We are iterating through the array of specs by creating the dashed filenames. | |
| // e.g transformSpecRoute is ['A', 'B', 'C'] so we would look up spec files | |
| // 'A-B' and 'B-C' | |
| for (var i = 0; i < transformSpecRoute.length - 1; i++) { | |
| transformSpec = gpii.ontologyHandler.getTransformSpec(that.options.ontologyTransformSpecs, | |
| transformSpecRoute[i], transformSpecRoute[i + 1]); | |
| if (transformSpec === undefined) { | |
| return {}; | |
| } | |
| // copy values directly or transform - depending on key | |
| transformed.contexts = fluid.transform(transformed.contexts, function (context) { | |
| return fluid.transform(context, function (val, key) { | |
| var rule = gpii.ontologyHandler.contextBlocks[key]; | |
| return rule === null ? val : fluid.invokeGlobalFunction(rule, [val, transformSpec]); | |
| }); | |
| }); | |
| // translate the context independent metadata block: | |
| transformed.metadata = gpii.ontologyHandler.transformMetadata(transformed.metadata, transformSpec); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment