public function addJsRequirement($js, LambdaHelper $helper = null)
    {
        $js  = trim($js);
        $key = md5($js);

        if (!isset(self::$jsRequirements[$key])) {
            if ($helper !== null) {
                $js = $helper->render($js);
            }

            self::$jsRequirements[$key] = $js;
        }
    }