Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
teddi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
teddi
Commits
6bbce7a5
Commit
6bbce7a5
authored
Nov 12, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
103999a2
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
6 deletions
+40
-6
index.d.ts
dist/utils/index.d.ts
+2
-1
index.js
dist/utils/index.js
+4
-1
localCache.d.ts
dist/utils/localCache.d.ts
+2
-0
localCache.js
dist/utils/localCache.js
+15
-0
package.json
package.json
+1
-1
index.ts
src/utils/index.ts
+2
-3
localCache.ts
src/utils/localCache.ts
+14
-0
No files found.
dist/utils/index.d.ts
View file @
6bbce7a5
import
{
getLocalCache
,
setLocalCache
}
from
"./localCache"
;
import
wait
from
"./wait"
;
export
{
wait
};
export
{
wait
,
getLocalCache
,
setLocalCache
};
dist/utils/index.js
View file @
6bbce7a5
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
wait
=
void
0
;
exports
.
setLocalCache
=
exports
.
getLocalCache
=
exports
.
wait
=
void
0
;
var
localCache_1
=
require
(
"./localCache"
);
Object
.
defineProperty
(
exports
,
"getLocalCache"
,
{
enumerable
:
true
,
get
:
function
()
{
return
localCache_1
.
getLocalCache
;
}
});
Object
.
defineProperty
(
exports
,
"setLocalCache"
,
{
enumerable
:
true
,
get
:
function
()
{
return
localCache_1
.
setLocalCache
;
}
});
var
wait_1
=
require
(
"./wait"
);
exports
.
wait
=
wait_1
.
default
;
dist/utils/localCache.d.ts
0 → 100644
View file @
6bbce7a5
export
declare
const
getLocalCache
:
(
key
:
any
)
=>
boolean
;
export
declare
const
setLocalCache
:
(
key
:
any
)
=>
boolean
;
dist/utils/localCache.js
0 → 100644
View file @
6bbce7a5
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
setLocalCache
=
exports
.
getLocalCache
=
void
0
;
exports
.
getLocalCache
=
function
(
key
)
{
if
(
localStorage
&&
localStorage
.
getItem
)
return
localStorage
.
getItem
(
key
)
===
'1'
;
return
false
;
};
exports
.
setLocalCache
=
function
(
key
)
{
if
(
localStorage
&&
localStorage
.
setItem
)
{
localStorage
.
setItem
(
key
,
'1'
);
return
true
;
}
return
false
;
};
package.json
View file @
6bbce7a5
{
"name"
:
"teddi"
,
"version"
:
"1.0.
7
"
,
"version"
:
"1.0.
8
"
,
"description"
:
""
,
"main"
:
"dist/index.js"
,
"types"
:
"dist/index.d.ts"
,
...
...
src/utils/index.ts
View file @
6bbce7a5
import
{
getLocalCache
,
setLocalCache
}
from
"./localCache"
;
import
wait
from
"./wait"
;
export
{
wait
}
\ No newline at end of file
export
{
wait
,
getLocalCache
,
setLocalCache
};
src/utils/localCache.ts
0 → 100644
View file @
6bbce7a5
export
const
getLocalCache
=
(
key
)
=>
{
if
(
localStorage
&&
localStorage
.
getItem
)
return
localStorage
.
getItem
(
key
)
===
'1'
return
false
;
}
export
const
setLocalCache
=
(
key
)
=>
{
if
(
localStorage
&&
localStorage
.
setItem
)
{
localStorage
.
setItem
(
key
,
'1'
);
return
true
;
}
return
false
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment