We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8fbae4 commit 1db0ee1Copy full SHA for 1db0ee1
lib/helpers/refCount.js
@@ -1,19 +1,19 @@
1
-const modals = [];
+var modals = [];
2
3
-export function add (element) {
4
- if (modals.indexOf(element) === -1) {
5
- modals.push(element);
+module.exports = {
+ add (element) {
+ if (modals.indexOf(element) === -1) {
6
+ modals.push(element);
7
+ }
8
+ },
9
+ remove (element) {
10
+ const index = modals.indexOf(element);
11
+ if (index === -1) {
12
+ return;
13
14
+ modals.splice(index, 1);
15
16
+ count () {
17
+ return modals.length;
18
}
-}
-
-export function remove (element) {
- const index = modals.indexOf(element);
- if (index === -1) {
- return;
- }
- modals.splice(index, 1);
-export function count () {
- return modals.length;
19
+};
0 commit comments