-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
114 lines (103 loc) · 2.87 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto&display=swap"
rel="stylesheet"
/>
<title>is-deprecated</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--background-color: #212121;
--font-color: #f5f5f5;
}
body {
font-family: "Roboto", sans-serif;
padding: 2em;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1em;
height: 100vh;
background-color: var(--background-color);
font-size: 18px;
}
.title {
display: flex;
align-items: center;
color: var(--font-color);
}
.banner {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
gap: 2em;
color: var(--font-color);
.logo {
max-width: 100%;
height: 128px;
width: 128px;
}
}
a {
color: var(--font-color);
}
</style>
</head>
<body>
<h1 class="title">is-deprecated</h1>
<section class="banner">
<img
alt="logo"
class="logo"
src="https://raw.githubusercontent.com/mtorre4580/is-deprecated/main/deprecated.png"
/>
<p>
A utility library designed to notify about deprecated functions or
methods within objects.
</p>
<p>
<a href="https://github.com/mtorre4580/is-deprecated">Readme</a>
</p>
</section>
<script type="module">
import deprecated from "./dist/is-deprecated.es.js";
// Function to add the deprecated helper
const myFunction = (arg1, arg2) => {};
// Basic config
const config = {
message:
"myFunction will be removed in the next release, please replace with this https://www.npmjs.com",
sendMetrics() {
setTimeout(() => {
const metric = {
name: 'deprecated_apis',
tags: {
method: 'myFunction',
app: 'frontend-checkout',
package: '@fake-ui/utils'
}
}
console.info("Sending metric like hot-shots", metric);
}, 1000);
},
};
// Create the wrapper to use
const deprecatedMyFunction = deprecated(myFunction, config);
// Call the wrapper function to see the warning
deprecatedMyFunction("", {});
</script>
</body>
</html>