The syntax could be a lot cleaner... the Universal Module Definition (UMD) pattern at the top makes it a bit quirky...  A lot of people have moved towards using CommonJS (cjs&#x2F;node-style) exports with tooling such as browserift&#x2F;webpack and&#x2F;or babel (for es6 modules) in order to clean up the source syntax.<p>What you&#x27;re looking at is a relatively poor example. In es6, that could be ...<p><pre><code>    exports default function...
</code></pre>
without all the cruft around it, also the module itself could be cleaner.  Similar to:<p><pre><code>    var cookies = parse();

    export function set({key, value, days=null}) {
      ...
    }

    export function get(key) {
      ...
    }

    export const remove = (key) =&gt; set({key, value:null});

    export function parse(values = document &amp;&amp; document.cookie || &#x27;&#x27;) {
       ...
    }</code></pre>