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.3 to 0.1.0

boom.js

2

colors-tmpl.js

@@ -42,2 +42,4 @@ /*!

module.exports = render
// old style:
module.exports.render = render

2

package.json

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

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

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

@@ -7,11 +7,11 @@ # colors-tmpl - Super-simple templating for [colors.js](https://github.com/Marak/colors.js)

// simple:
colorsTmpl.render('{red}this should be red{/red}')
colorsTmpl('{red}this should be red{/red}')
// same as → 'this should be red'.red
// fancy:
colorsTmpl.render('lotsa colours: {red}red{/red}, {green}green{/green}, {blue}blue{/blue}, yeehaw!')
colorsTmpl('lotsa colours: {red}red{/red}, {green}green{/green}, {blue}blue{/blue}, yeehaw!')
// same as → 'lotsa colours: ' + 'red'.red + ', ' + 'green'.green + ', ' + 'blue'.blue + ', ' + 'yeehaw!'
// fancier:
colorsTmpl.render(
colorsTmpl(
'{bold}colours {red}within {green}colours{/green} within {yellow}colours, {underline}oh my!{/underline}{/yellow}{/red} EEEK!{/bold}'

@@ -22,2 +22,2 @@ )

*Copyright (c) 2012 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))*
*Copyright (c) 2012 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))*

@@ -22,3 +22,3 @@ #!/usr/bin/env node

assert(
colorsTmpl.render(
colorsTmpl(
'{red}this should be red{/red}'

@@ -31,3 +31,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'{green}this should be green{/green}'

@@ -40,3 +40,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'{underline}this should be underlined{/underline}'

@@ -49,3 +49,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'partial {red}red{/red} string'

@@ -58,3 +58,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'partial {green}green{/green} string'

@@ -67,3 +67,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'unmatched {green} tag, leave it alone'

@@ -76,3 +76,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'nonsense {foobar} tag, leave it alone'

@@ -85,3 +85,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'nonsense, matched {foobar}tag{/foobar}, leave it alone'

@@ -94,3 +94,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'lotsa colours: {red}red{/red}, {green}green{/green}, {blue}blue{/blue}, yeehaw!'

@@ -103,3 +103,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'{bold}colours {red}within {green}colours{/green} within {yellow}colours, {underline}oh my!{/underline}{/yellow}{/red} EEEK!{/bold}'

@@ -112,3 +112,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'{red}red1{/red}, {red}red2{/red}, {red}red3{/red}'

@@ -121,3 +121,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'\n{red}red1{/red}\n{red}red2{/red}\n{red}red3{/red}\n'

@@ -130,3 +130,3 @@ )

assert(
colorsTmpl.render(
colorsTmpl(
'\n{red}red1\nred2\nred3{/red}\n'

@@ -133,0 +133,0 @@ )

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