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.1.1 to 1.0.0

LICENSE.md

43

colors-tmpl.js

@@ -1,23 +0,4 @@

/*!
* The MIT License (MIT)
*
* Copyright (c) 2012 Rod Vagg <rod@vagg.org> @rvagg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
var colors = require('colors/safe')
var colors = require('colors')
, types = Object.keys(colors).filter(function (k) {
, types = Object.getOwnPropertyNames(colors).filter(function (k) {
return /^[a-z]+$/.test(k) && typeof colors[k] == 'function'

@@ -30,3 +11,3 @@ })

return str.replace(re, function (_, s) {
return s[type]
return colors[type](s)
})

@@ -36,11 +17,11 @@ }

, render = function (str) {
return translators.reduce(
function (str, fn) { return fn(str) }
, str
)
}
module.exports = render
// old style:
module.exports.render = render
function render (str) {
return translators.reduce(
function (str, fn) { return fn(str) }
, str
)
}
module.exports = render

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

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

@@ -18,3 +18,4 @@ "keywords": [

"templating",
"templates"
"templates",
"goatscale"
],

@@ -30,4 +31,4 @@ "repository": {

"dependencies": {
"colors": "~0.6.2"
"colors": "~1.0.2"
}
}

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

*Copyright (c) 2012 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))*
## License
**colors-tmpl** is Copyright (c) 2014 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
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