Comparing version 2.0.3 to 2.0.4
// Generated by CoffeeScript 1.9.3 | ||
var AnsiPainter, object, styles, tags, tools, | ||
var AnsiPainter, styles, tags, tools, | ||
hasProp = {}.hasOwnProperty, | ||
@@ -12,4 +12,2 @@ slice = [].slice; | ||
object = require('utila').object; | ||
module.exports = AnsiPainter = (function() { | ||
@@ -16,0 +14,0 @@ var self; |
// Generated by CoffeeScript 1.9.3 | ||
var Block, Layout, SpecialString, fn, i, len, object, prop, ref, terminalWidth; | ||
var Block, Layout, SpecialString, cloneAndMergeDeep, fn, i, len, prop, ref, terminalWidth; | ||
Block = require('./layout/Block'); | ||
object = require('utila').object; | ||
cloneAndMergeDeep = require('./tools').cloneAndMergeDeep; | ||
@@ -54,4 +54,4 @@ SpecialString = require('./layout/SpecialString'); | ||
this._activeBlock = null; | ||
this._config = object.append(self._defaultConfig, config); | ||
rootConfig = object.append(self._rootBlockDefaultConfig, rootBlockConfig); | ||
this._config = cloneAndMergeDeep(self._defaultConfig, config); | ||
rootConfig = cloneAndMergeDeep(self._rootBlockDefaultConfig, rootBlockConfig); | ||
this._root = new Block(this, null, rootConfig, '__root'); | ||
@@ -58,0 +58,0 @@ this._root._open(); |
// Generated by CoffeeScript 1.9.3 | ||
var Block, SpecialString, object, terminalWidth; | ||
var Block, SpecialString, cloneAndMergeDeep, terminalWidth; | ||
SpecialString = require('./SpecialString'); | ||
object = require('utila').object; | ||
terminalWidth = require('../tools').getCols(); | ||
cloneAndMergeDeep = require('../tools').cloneAndMergeDeep; | ||
module.exports = Block = (function() { | ||
@@ -58,3 +58,3 @@ var self; | ||
this._name = _name != null ? _name : ''; | ||
this._config = object.append(self.defaultConfig, config); | ||
this._config = cloneAndMergeDeep(self.defaultConfig, config); | ||
this._closed = false; | ||
@@ -61,0 +61,0 @@ this._wasOpenOnce = false; |
// Generated by CoffeeScript 1.9.3 | ||
var AnsiPainter, Layout, RenderKid, Styles, blockStyleApplier, inlineStyleApplier, object, stripAnsi, terminalWidth, tools; | ||
var AnsiPainter, Layout, RenderKid, Styles, blockStyleApplier, cloneAndMergeDeep, inlineStyleApplier, isPlainObject, stripAnsi, terminalWidth, tools; | ||
@@ -8,2 +8,6 @@ inlineStyleApplier = require('./renderKid/styleApplier/inline'); | ||
isPlainObject = require('lodash/isPlainObject'); | ||
cloneAndMergeDeep = require('./tools').cloneAndMergeDeep; | ||
AnsiPainter = require('./AnsiPainter'); | ||
@@ -17,4 +21,2 @@ | ||
object = require('utila').object; | ||
stripAnsi = require('strip-ansi'); | ||
@@ -48,3 +50,3 @@ | ||
this.tools = self.tools; | ||
this._config = object.append(self._defaultConfig, config); | ||
this._config = cloneAndMergeDeep(self._defaultConfig, config); | ||
this._initStyles(); | ||
@@ -75,3 +77,3 @@ } | ||
return this._parse(input); | ||
} else if (object.isBareObject(input) || Array.isArray(input)) { | ||
} else if (isPlainObject(input) || Array.isArray(input)) { | ||
return this._objToDom(input); | ||
@@ -78,0 +80,0 @@ } else { |
// Generated by CoffeeScript 1.9.3 | ||
var _common, blockStyleApplier, object, self; | ||
var _common, blockStyleApplier, merge, self; | ||
_common = require('./_common'); | ||
object = require('utila').object; | ||
merge = require('lodash/merge'); | ||
@@ -20,3 +20,3 @@ module.exports = blockStyleApplier = self = { | ||
if (style.marginLeft != null) { | ||
object.appendOnto(config, { | ||
merge(config, { | ||
linePrependor: { | ||
@@ -30,3 +30,3 @@ options: { | ||
if (style.marginRight != null) { | ||
object.appendOnto(config, { | ||
merge(config, { | ||
lineAppendor: { | ||
@@ -40,3 +40,3 @@ options: { | ||
if (style.marginTop != null) { | ||
object.appendOnto(config, { | ||
merge(config, { | ||
blockPrependor: { | ||
@@ -50,3 +50,3 @@ options: { | ||
if (style.marginBottom != null) { | ||
object.appendOnto(config, { | ||
merge(config, { | ||
blockAppendor: { | ||
@@ -71,3 +71,3 @@ options: { | ||
conf.char = before + bullet.char + after; | ||
object.appendOnto(config, { | ||
merge(config, { | ||
linePrependor: { | ||
@@ -74,0 +74,0 @@ options: { |
// Generated by CoffeeScript 1.9.3 | ||
var htmlparser, object, objectToDom, self; | ||
var cloneDeep, htmlparser, isPlainObject, merge, objectToDom, self; | ||
htmlparser = require('htmlparser2'); | ||
object = require('utila').object; | ||
objectToDom = require('dom-converter').objectToDom; | ||
merge = require('lodash/merge'); | ||
cloneDeep = require('lodash/cloneDeep'); | ||
isPlainObject = require('lodash/isPlainObject'); | ||
module.exports = self = { | ||
@@ -19,6 +23,9 @@ repeatString: function(str, times) { | ||
}, | ||
cloneAndMergeDeep: function(base, toAppend) { | ||
return merge(cloneDeep(base), toAppend); | ||
}, | ||
toDom: function(subject) { | ||
if (typeof subject === 'string') { | ||
return self.stringToDom(subject); | ||
} else if (object.isBareObject(subject)) { | ||
} else if (isPlainObject(subject)) { | ||
return self._objectToDom(subject); | ||
@@ -55,3 +62,3 @@ } else { | ||
if (!Array.isArray(o)) { | ||
if (!object.isBareObject(o)) { | ||
if (!isPlainObject(o)) { | ||
throw Error("objectToDom() only accepts a bare object or an array"); | ||
@@ -58,0 +65,0 @@ } |
{ | ||
"name": "renderkid", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Stylish console.log for node", | ||
@@ -10,4 +10,4 @@ "main": "lib/RenderKid.js", | ||
"htmlparser2": "^3.3.0", | ||
"strip-ansi": "^3.0.0", | ||
"utila": "^0.4.0" | ||
"lodash": "^4.17.20", | ||
"strip-ansi": "^3.0.0" | ||
}, | ||
@@ -14,0 +14,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
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
108508
1932
+ Addedlodash@^4.17.20
+ Addedlodash@4.17.21(transitive)
- Removedutila@^0.4.0