FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-Templates/js/runtime.js at master · TeaEntityLab/JavaScript-Templates · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
TeaEntityLab
/
JavaScript-Templates
Public
forked from
blueimp/JavaScript-Templates
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript-Templates
/
js
/
runtime.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (45 loc) · 1 KB
Breadcrumbs
JavaScript-Templates
/
js
/
runtime.js
Copy path
File metadata and controls
47 lines (45 loc) · 1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*
* JavaScript Templates Runtime
* https://github.com/blueimp/JavaScript-Templates
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*/
/* global define */
;
(
function
(
$
)
{
'use strict'
var
tmpl
=
function
(
id
,
data
)
{
var
f
=
tmpl
.
cache
[
id
]
return
data
?
f
(
data
,
tmpl
)
:
function
(
data
)
{
return
f
(
data
,
tmpl
)
}
}
tmpl
.
cache
=
{
}
tmpl
.
encReg
=
/
[
<
>
&
"
'
\x00
]
/
g
// eslint-disable-line no-control-regex
tmpl
.
encMap
=
{
'<'
:
'<'
,
'>'
:
'>'
,
'&'
:
'&'
,
'"'
:
'"'
,
"'"
:
'''
}
tmpl
.
encode
=
function
(
s
)
{
return
(
s
==
null
?
''
:
''
+
s
)
.
replace
(
tmpl
.
encReg
,
function
(
c
)
{
return
tmpl
.
encMap
[
c
]
||
''
}
)
}
if
(
typeof
define
===
'function'
&&
define
.
amd
)
{
define
(
function
(
)
{
return
tmpl
}
)
}
else
if
(
typeof
module
===
'object'
&&
module
.
exports
)
{
module
.
exports
=
tmpl
}
else
{
$
.
tmpl
=
tmpl
}
}
)
(
this
)
Back
|
FazBrowse Home
|
New Git URL