@doc.ai/simple-normalizer

0.0.1 • Public • Published

node-simple-normalizer

Node.js library that simplfies normalization of session data from importers into known targets.

Usage

import _ from 'lodash';
import Normalize from '@doc.ai/simple-normalizer';

const targets = Normalize({
    // Importer ID which can be retrieved from the package.json name of the importer 
    "ai.doc.neuron.app.selfie" : {
        // Target that can be fulfilled by this importer
        // This specific example will extract the latest result
        age: results => ({
            id: _.get(results, '0.id'),
            value: _.get(results, '0.result.age'),
            service_source: _.get(results, '0.app'),
            omics: _.get(results, '0.omics'),
            updatedAt: _.get(results, '0.updatedAt'),
        }),
    },
    "ai.doc.neuron.app.23andme": {
        riskOfCancer: results => (GetPredictionOfRiskFromModelService(results)),
    }
}, [{... result}])

Authors

See also the list of contributors who participated in this project.

Readme

Keywords

none

Package Sidebar

Install

npm i @doc.ai/simple-normalizer

Weekly Downloads

1

Version

0.0.1

License

Apache-2.0

Unpacked Size

339 kB

Total Files

12

Last publish

Collaborators

  • stuti-doc.ai
  • micheas
  • kartikdocai
  • doc-ai-bot
  • thesuperfly
  • alexzobi
  • ariav
  • marshall.cox
  • yuri_docai
  • even-steven
  • prashanth_doc_ai
  • jay-docai