mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-21 05:24:45 +00:00
.
This commit is contained in:
parent
fc725ba36b
commit
422b9fdb15
7395 changed files with 1786235 additions and 3476 deletions
17
node_modules/tmpl/lib/tmpl.js
generated
vendored
Normal file
17
node_modules/tmpl/lib/tmpl.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
var INTERPOLATE = /{([\s\S]+?)}/g
|
||||
|
||||
module.exports = function(str, data) {
|
||||
var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
|
||||
'with(obj||{}){__p.push(\'' +
|
||||
str.replace(/\\/g, '\\\\')
|
||||
.replace(/'/g, "\\'")
|
||||
.replace(INTERPOLATE, function(match, code) {
|
||||
return "'," + code.replace(/\\'/g, "'") + ",'"
|
||||
})
|
||||
.replace(/\r/g, '\\r')
|
||||
.replace(/\n/g, '\\n')
|
||||
.replace(/\t/g, '\\t')
|
||||
+ "');}return __p.join('');"
|
||||
var func = new Function('obj', tmpl)
|
||||
return data ? func(data) : func
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue