<commit_before>let sharePool = {};

export class Chusha {
    constructor() {
        this.sharePool = {};
    }

    static get(Constructor) {
        if (Constructor.constructor.name === 'Object') {
            // You passed an already instantiated object and not a constructor.
            // Inject it directly.
            return Constructor;
        }
        if (sharePool[Constructor] || sharePool[Constructor.name]) {
            return sharePool[Constructor.name];
        }
        let dependencyConstructors = Constructor.inject ? (Constructor.inject() || []) : [];
        let dependencies = dependencyConstructors.map(el => Chusha.get(el));
        let obj = Object.create(Constructor.prototype);
        Constructor.apply(obj, dependencies);

        return obj;
    }

    static share(obj, hash = obj.constructor.name) {
        let illegalConstructors = ['Number', 'Boolean', 'String', 'Array', 'Function', 'Object'];<commit_msg>Take additional params to get, pass on to ctor.<commit_after>let sharePool = {};

export class Chusha {
    constructor() {
        this.sharePool = {};
    }

    static get(Constructor, ...args) {
        if (Constructor.constructor.name === 'Object') {
            // You passed an already instantiated object and not a constructor.
            // Inject it directly.
            return Constructor;
        }
        if (sharePool[Constructor] || sharePool[Constructor.name]) {
            return sharePool[Constructor.name];
        }
        let dependencyConstructors = Constructor.inject ? (Constructor.inject() || []) : [];
        let dependencies = dependencyConstructors.map(el => Chusha.get(el));
        let obj = Object.create(Constructor.prototype);
	let params = dependencies.concat(args);
        Constructor.apply(obj, params);

        return obj;
    }

    static share(obj, hash = obj.constructor.name) {
        let illegalConstructors = ['Number', 'Boolean', 'String', 'Array', 'Function', 'Object'];
{'fraction_non_alphanumeric': 0.12728194726166328, 'fraction_numerical': 0.0, 'mean_word_length': 2.5613718411552346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1622024', 'n_tokens_mistral': 509, 'n_tokens_neox': 498, 'n_words': 129}