{"size": 1516, "ext": "js", "max_stars_repo_path": "nut-ioc-container-configurations/nut-ioc-common-configuration.js", "max_stars_repo_name": "nodejs-projects-kenanhancer/nut-ioc-basic-demo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "nut-ioc-container-configurations/nut-ioc-common-configuration.js", "max_issues_repo_name": "nodejs-projects-kenanhancer/nut-ioc-basic-demo", "max_issues_repo_issues_event_min_datetime": "2021-04-16T23:58:55.000Z", "max_issues_repo_issues_event_max_datetime": "2021-04-20T08:59:17.000Z", "max_forks_repo_path": "nut-ioc-container-configurations/nut-ioc-common-configuration.js", "max_forks_repo_name": "nodejs-projects-kenanhancer/nut-ioc-basic-demo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 33.6888888889, "max_line_length": 134, "alphanum_fraction": 0.5811345646}
require('dotenv').config();
const { capitalize } = require('nut-ioc/helpers/string-helper');

module.exports.use = ({ nutIocContainer }) => {

    nutIocContainer.useDependency({
        ServiceName: "authorBasicInfo",
        Namespace: undefined,
        Service: ({ firstName: "Kenan", lastName: "Hancer" })
    });

    nutIocContainer.useDependency({
        ServiceName: "authorWithContacts",
        Namespace: undefined,
        Service: ({ authorBasicInfo }) => ({ ...authorBasicInfo, city: "London", mail: "kenanhancer@gmail.com" })
    });

    nutIocContainer.useDependency({
        ServiceName: "appEnv",
        Namespace: undefined,
        Service: { ...process.env }
    });

    nutIocContainer.useDependency({
        ServiceName: "capitalize",
        Namespace: undefined,
        Service: ({ }) => capitalize
    });

    // nutIocContainer.useDependency({
    //     IsHook: true,
    //     ServiceName: "swaggerDownstreamDefinitionsUpdateHook",
    //     Namespace: undefined,
    //     Service: ({swaggerDefinitions, swaggerDownstreamDefinitions, appEnv}) => {
    //
    //         const swaggers = {...swaggerDefinitions, ...swaggerDownstreamDefinitions};
    //
    //         Object.entries(appEnv).filter(([key, value]) => key.includes('ds.') || key.includes('cs.')).forEach(([key, value]) => {
    //             const [group, serviceName, fieldName] = key.split('.');
    //
    //             swaggers[serviceName][fieldName] = value;
    //         });
    //     }
    // });
}