Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colors-tmpl

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colors-tmpl - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

colors-tmpl.js

@@ -27,3 +27,3 @@ /*!

, translators = types.map(function (type) {
var re = new RegExp('\\{' + type + '\\}(.*)\\{/' + type + '\\}')
var re = new RegExp('\\{' + type + '\\}(.*?)\\{/' + type + '\\}', 'g')
return function (str) {

@@ -41,2 +41,2 @@ return str.replace(re, '$1'[type])

module.exports.render = render
module.exports.render = render

@@ -8,3 +8,3 @@ {

, "description": "Simple templating for applying colors.js to strings"
, "version": "0.0.1"
, "version": "0.0.2"
, "homepage": "https://github.com/rvagg/colors-tmpl"

@@ -23,2 +23,2 @@ , "keywords": [ "color", "colour", "colours", "colours", "colors.js", "templating", "templates" ]

}
}
}

@@ -100,1 +100,17 @@ #!/usr/bin/env node

)
assert(
colorsTmpl.render(
'{red}red1{/red}, {red}red2{/red}, {red}red3{/red}'
)
, 'red1'.red + ', ' + 'red2'.red + ', ' + 'red3'.red
, 'multiple occurances of a tag in a single string'
)
assert(
colorsTmpl.render(
'\n{red}red1{/red}\n{red}red2{/red}\n{red}red3{/red}\n'
)
, '\n' + 'red1'.red + '\n' + 'red2'.red + '\n' + 'red3'.red + '\n'
, 'multi-line strings'
)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc