'Create a CustomJSFilter instance from CoffeeScript snippets.
The function bodies are translated to JavaScript functions using node
and therefore require return statements.
The ``code`` function namespace will contain the variable ``source``
at render time. This will be the data source associated with the CDSView
that this filter is added to.'

@classmethod
def from_coffeescript(cls, code, args={}):

    compiled = nodejs_compile(code, lang='coffeescript', file='???')
    if ('error' in compiled):
        raise CompilationError(compiled.error)
    else:
        return cls(code=compiled.code, args=args)
