kopia lustrzana https://github.com/robinmoisson/staticrypt
handle spaces in {tag} placeholders when rendering - closes #148
rodzic
158668677d
commit
4fa627980c
|
@ -7,7 +7,7 @@
|
|||
* @returns string
|
||||
*/
|
||||
function renderTemplate(templateString, data) {
|
||||
return templateString.replace(/{(.*?)}/g, function (_, key) {
|
||||
return templateString.replace(/{\s*(\w+)\s*}/g, function (_, key) {
|
||||
if (data && data[key] !== undefined) {
|
||||
return data[key];
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "staticrypt",
|
||||
"version": "2.3.3",
|
||||
"version": "2.3.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "staticrypt",
|
||||
"version": "2.3.3",
|
||||
"version": "2.3.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"crypto-js": "3.1.9-1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "staticrypt",
|
||||
"version": "2.3.3",
|
||||
"version": "2.3.4",
|
||||
"description": "Based on the [crypto-js](https://github.com/brix/crypto-js) library, StatiCrypt uses AES-256 to encrypt your input with your passphrase and put it in a HTML file with a password prompt that can decrypted in-browser (client side).",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
|
Ładowanie…
Reference in New Issue