-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
66 lines (63 loc) · 1.57 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>NPM download size API</title>
</head>
<body>
<h1>NPM download size API</h1>
<h2>Usage</h2>
<h3>GET <span id=href></span>package-name</h3>
<p>Gets information about package with name `package-name`.</p>
<h3>Example</h3>
<p><a><span id=href2></span>chalk</a> returns</p>
<p><pre><code>{
"name": "chalk",
"wanted": "latest",
"version": "2.4.2",
"tarballSize": 9865,
"totalDependencies": 6,
"size": 33022,
"prettySize": "32.25 KiB",
"dependencies": [
{
"name": "ansi-styles",
"wanted": "^3.2.1",
"version": "3.2.1",
"tarballSize": 3808,
"totalDependencies": 2,
"size": 16761,
"prettySize": "16.37 KiB"
},
{
"name": "escape-string-regexp",
"wanted": "^1.0.5",
"version": "1.0.5",
"tarballSize": 1578,
"totalDependencies": 0,
"size": 1578,
"prettySize": "1.54 KiB"
},
{
"name": "supports-color",
"wanted": "^5.3.0",
"version": "5.5.0",
"tarballSize": 3067,
"totalDependencies": 1,
"size": 4818,
"prettySize": "4.71 KiB"
}
],
"_id": "DHdJlsUk8PAzqLDm"
}</code></pre></p>
<script>
var href = location.href.replace(/([^\/])$/, '$1/');
['href', 'href2'].forEach(function (id) {
document.getElementById(id).innerText = href;
});
document.querySelector('a').href = href + 'chalk';
</script>
</body>
</html>