conditional
Version:
A preconditions package based on Google's Preconditions library
115 lines (78 loc) • 3.46 kB
HTML
<html>
<head>
<title>debug_wrapper.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To …</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="debug_wrapper.html">
debug_wrapper.coffee
</a>
<a class="source" href="main.html">
main.coffee
</a>
<a class="source" href="util.html">
util.coffee
</a>
<a class="source" href="argument_test.html">
argument_test.coffee
</a>
<a class="source" href="common_test.html">
common_test.coffee
</a>
<a class="source" href="contains_test.html">
contains_test.coffee
</a>
<a class="source" href="defined_test.html">
defined_test.coffee
</a>
<a class="source" href="equals_test.html">
equals_test.coffee
</a>
<a class="source" href="not_empty_test.html">
not_empty_test.coffee
</a>
<a class="source" href="not_null_test.html">
not_null_test.coffee
</a>
<a class="source" href="number_type_test.html">
number_type_test.coffee
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>debug_wrapper.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">¶</a>
</div>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">try</span>
debug = <span class="hljs-built_in">require</span>(<span class="hljs-string">'debug'</span>)
<span class="hljs-keyword">catch</span> e
<span class="hljs-function"> <span class="hljs-title">debug</span> =
<span class="hljs-params">(name)</span> -></span>
(message) ->
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"<span class="hljs-subst">#{name}</span> :: <span class="hljs-subst">#{message}</span>"</span>
<span class="hljs-built_in">module</span>.exports = debug <span class="hljs-string">'conditional'</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>