HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/www/french-american.org/current/node_modules/@frctl/fractal/src/core/mixins/mix.js
'use strict';

const _ = require('lodash');
const mix = require('mixwith').mix;

class Base {

    constructor() {
        Object.defineProperty(this, '_mixedIn', {
            enumerable: false,
            configurable: false,
            writable: true,
            value: [],
        });
    }

    hasMixedIn(name) {
        return _.includes(this._mixedIn, name);
    }

    addMixedIn(name) {
        this._mixedIn.push(name);
        this._mixedIn = _.uniq(this._mixedIn);
    }

}

module.exports = function () {
    const mixer = mix(Base);
    return mixer.with.apply(mixer, Array.from(arguments));
};