Comparing version 0.0.0 to 0.0.1
@@ -13,3 +13,3 @@ module.exports = format; | ||
return String(text).replace(/\{?\{\{([^{}]+)}}}?/g, replace(context)); | ||
return String(text).replace(/\{?\{([^{}]+)}}?/g, replace(context)); | ||
}; | ||
@@ -21,4 +21,4 @@ | ||
if(tag.substring(0, 3) == '{{{' && tag.substring(tag.length - 3) == '}}}'){ | ||
return '{{' + name + '}}'; | ||
if(tag.substring(0, 2) == '{{' && tag.substring(tag.length - 2) == '}}'){ | ||
return '{' + name + '}'; | ||
} | ||
@@ -25,0 +25,0 @@ |
{ | ||
"name": "new-format", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "", | ||
@@ -13,7 +13,7 @@ "main": "index.js", | ||
"repository": { | ||
"url": "git@github.com:azer\/new-format.git", | ||
"url": "git@github.com:azer/new-format.git", | ||
"type": "git" | ||
}, | ||
"author": "Azer Ko\u00e7ulu <azer@kodfabrik.com>", | ||
"author": "Azer Koçulu <azer@kodfabrik.com>", | ||
"license": "BSD" | ||
} |
@@ -17,4 +17,6 @@ ## new-format | ||
format('Hello {0}. The weather is currently {1}°.', 'Kitty', '67') | ||
format('Hello {name}, The weather is currently {degree}°', { name:'Kitty', degree: 67 }) | ||
``` | ||
![](https://dl.dropbox.com/s/9q2p5mrqnajys22/npmel.jpg?token_hash=AAHqttN9DiGl63ma8KRw-G0cdalaiMzrvrOPGnOfDslDjw) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1466
16
22