packages/warriorjs-core/src/loadLevel.js
function loadEffects(unit, effects = {}) {
  Object.entries(effects).forEach(([effectName, effectCreator]) => {
    const effect = effectCreator(unit);
    unit.addEffect(effectName, effect);
  });
}
function loadEffects(unit, effects = {}) {
  Object.entries(effects).forEach(([effectName, effectCreator]) => {
    const effect = effectCreator(unit);
    unit.addEffect(effectName, effect);
  });
}
function loadEffects ( unit , effects = { } ) { Object . entries ( effects ) . forEach ( ( [ effectName , effectCreator ] ) => { const effect = effectCreator ( unit ) ; unit . addEffect ( effectName , effect ) ; } ) ; }
Loads the effects onto the unit.

@param {Unit} unit The unit.
@param {Object} effects The effects to load.
Loads the effects onto the unit .