File: function.expect.txt

package info (click to toggle)
highlight.js 9.18.5%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 6,672 kB
  • sloc: javascript: 40,928; python: 342; makefile: 160; sh: 11
file content (14 lines) | stat: -rw-r--r-- 1,024 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<span class="hljs-function"><span class="hljs-title">returnNull</span> = -&gt;</span> <span class="hljs-literal">null</span>
<span class="hljs-function"><span class="hljs-title">returnTrue</span> = <span class="hljs-params">()</span> -&gt;</span> <span class="hljs-literal">true</span>
<span class="hljs-function"><span class="hljs-title">square</span> = <span class="hljs-params">(x)</span> -&gt;</span> x * x

npmWishlist.sha256 = <span class="hljs-function"><span class="hljs-params">(str)</span> -&gt;</span>
    <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error()

str.split(<span class="hljs-string">" "</span>).map(<span class="hljs-function"><span class="hljs-params">(m)</span> -&gt;</span> m.charCodeAt(<span class="hljs-number">0</span>))

fs.readFile(<span class="hljs-string">"package.json"</span>, <span class="hljs-string">"utf-8"</span>, <span class="hljs-function"><span class="hljs-params">(err, content)</span> -&gt;</span>
  data = JSON.parse(content)

  data.version
)