Comparing version 0.1.9 to 1.0.1
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
var LODASH, njs_fs, njs_path, njs_util, permute, rpr, validate_isa_number, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -22,3 +22,3 @@ njs_path = require('path'); | ||
var P, arity; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
@@ -80,3 +80,3 @@ /* TAINT `assert.deepEqual` is broken as of https://github.com/joyent/node/issues/7161 */ | ||
*/ | ||
var flags, _ref; | ||
var flags, ref; | ||
if (!((Object.prototype.toString.call(matcher === '[object RegExp]')) && matcher.global)) { | ||
@@ -96,3 +96,3 @@ flags = matcher.multiline ? 'gm' : 'g'; | ||
matcher.lastIndex = 0; | ||
return (_ref = text.match(matcher)) != null ? _ref : []; | ||
return (ref = text.match(matcher)) != null ? ref : []; | ||
}; | ||
@@ -150,3 +150,3 @@ | ||
this._shuffle = function(list, ratio, rnd, random_integer) { | ||
var that_idx, this_idx, _ref; | ||
var ref, that_idx, this_idx; | ||
if ((this_idx = list.length) < 2) { | ||
@@ -162,3 +162,3 @@ return list; | ||
that_idx = random_integer(0, this_idx); | ||
_ref = [list[this_idx], list[that_idx]], list[that_idx] = _ref[0], list[this_idx] = _ref[1]; | ||
ref = [list[this_idx], list[that_idx]], list[that_idx] = ref[0], list[this_idx] = ref[1]; | ||
} | ||
@@ -403,3 +403,3 @@ } | ||
this.get_caller_info_stack = function(delta, error, limit, include_source) { | ||
var R, call_sites, cs, entry, idx, _i, _len; | ||
var R, call_sites, cs, entry, i, idx, len; | ||
if (delta == null) { | ||
@@ -450,3 +450,3 @@ delta = 0; | ||
R = []; | ||
for (idx = _i = 0, _len = call_sites.length; _i < _len; idx = ++_i) { | ||
for (idx = i = 0, len = call_sites.length; i < len; idx = ++i) { | ||
cs = call_sites[idx]; | ||
@@ -522,9 +522,9 @@ if ((delta != null) && idx < delta) { | ||
return this.id_from_text(((function() { | ||
var _i, _len, _results; | ||
_results = []; | ||
for (_i = 0, _len = values.length; _i < _len; _i++) { | ||
value = values[_i]; | ||
_results.push(rpr(value)); | ||
var i, len, results; | ||
results = []; | ||
for (i = 0, len = values.length; i < len; i++) { | ||
value = values[i]; | ||
results.push(rpr(value)); | ||
} | ||
return _results; | ||
return results; | ||
})()).join('-'), length); | ||
@@ -650,3 +650,3 @@ }; | ||
this.get_app_home = function(routes) { | ||
var error, route, _i, _len; | ||
var error, i, len, route; | ||
if (routes == null) { | ||
@@ -673,4 +673,4 @@ routes = null; | ||
} | ||
for (_i = 0, _len = routes.length; _i < _len; _i++) { | ||
route = routes[_i]; | ||
for (i = 0, len = routes.length; i < len; i++) { | ||
route = routes[i]; | ||
try { | ||
@@ -745,8 +745,8 @@ if ((njs_fs.statSync(route)).isDirectory()) { | ||
this._size_of_container = function(x, seen) { | ||
var R, key, _i, _len, _ref; | ||
var R, i, key, len, ref; | ||
seen.set(x, 1); | ||
R = 0; | ||
_ref = Object.keys(x); | ||
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
key = _ref[_i]; | ||
ref = Object.keys(x); | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
key = ref[i]; | ||
R += this._size_of(x[key], seen); | ||
@@ -760,9 +760,9 @@ } | ||
/* thx to http://stackoverflow.com/a/10756441/256361 */ | ||
var R, description, interface_, _, _i, _len, _ref; | ||
var R, _, description, i, interface_, len, ref; | ||
R = []; | ||
_ref = (require('os')).networkInterfaces(); | ||
for (_ in _ref) { | ||
interface_ = _ref[_]; | ||
for (_i = 0, _len = interface_.length; _i < _len; _i++) { | ||
description = interface_[_i]; | ||
ref = (require('os')).networkInterfaces(); | ||
for (_ in ref) { | ||
interface_ = ref[_]; | ||
for (i = 0, len = interface_.length; i < len; i++) { | ||
description = interface_[i]; | ||
if (description['family'] === 'IPv4' && !description['internal']) { | ||
@@ -769,0 +769,0 @@ R.push(description['address']); |
@@ -1,4 +0,4 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
var method_count, module, name, njs_util, route, routes, rpr, value, _i, _len, _ref; | ||
var i, len, method_count, module, name, njs_util, ref, route, routes, rpr, value; | ||
@@ -17,7 +17,7 @@ njs_util = require('util'); | ||
for (_i = 0, _len = routes.length; _i < _len; _i++) { | ||
route = routes[_i]; | ||
_ref = module = require(route); | ||
for (name in _ref) { | ||
value = _ref[name]; | ||
for (i = 0, len = routes.length; i < len; i++) { | ||
route = routes[i]; | ||
ref = module = require(route); | ||
for (name in ref) { | ||
value = ref[name]; | ||
if (this[name] != null) { | ||
@@ -24,0 +24,0 @@ throw new Error("duplicate name " + (rpr(name))); |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
var BNP, TRM, alert, assert, badge, debug, echo, help, info, log, njs_path, praise, rpr, urge, warn, whisper, | ||
__slice = [].slice; | ||
slice = [].slice; | ||
@@ -55,4 +55,4 @@ njs_path = require('path'); | ||
return function() { | ||
var P, p, values, _i, _len; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
var P, i, len, p, values; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
@@ -65,4 +65,4 @@ /* Tests whether all arguments are pairwise and deeply equal. Uses CoffeeNode Bits'n'Pieces' `equal` | ||
values = []; | ||
for (_i = 0, _len = P.length; _i < _len; _i++) { | ||
p = P[_i]; | ||
for (i = 0, len = P.length; i < len; i++) { | ||
p = P[i]; | ||
_this["new"]._delete_grammar_references(p); | ||
@@ -69,0 +69,0 @@ values.push(rpr(p)); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ this.blink = "\x1b[5m"; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
@@ -278,3 +278,3 @@ var CND, ansi_vt100_cc_matcher, rgb_hex_by_vt100_colorcode; | ||
*/ | ||
var R, match, parameters, position, x, _i, _len, _ref; | ||
var R, i, len, match, parameters, position, ref, x; | ||
R = []; | ||
@@ -287,5 +287,5 @@ while (true) { | ||
parameters = [match[2]]; | ||
_ref = match[1].split(';'); | ||
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
x = _ref[_i]; | ||
ref = match[1].split(';'); | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
x = ref[i]; | ||
parameters.push(parseInt(x, 10)); | ||
@@ -310,3 +310,3 @@ } | ||
this._as_html = function(text, options) { | ||
var R, chunk, color_code, css_class, css_prefix, is_ansicode, n, open_span_count, vt100_clear, vt100_reset, _i, _j, _len, _ref; | ||
var R, chunk, color_code, css_class, css_prefix, i, is_ansicode, j, len, n, open_span_count, ref, ref1, vt100_clear, vt100_reset; | ||
is_ansicode = true; | ||
@@ -318,5 +318,5 @@ R = []; | ||
vt100_clear = css_prefix.concat('-K'); | ||
_ref = this.analyze(text); | ||
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
chunk = _ref[_i]; | ||
ref = this.analyze(text); | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
chunk = ref[i]; | ||
is_ansicode = !is_ansicode; | ||
@@ -341,3 +341,3 @@ if (is_ansicode) { | ||
if (open_span_count > 0 && ((options != null) && options['close-spans'])) { | ||
for (n = _j = 0; 0 <= open_span_count ? _j < open_span_count : _j > open_span_count; n = 0 <= open_span_count ? ++_j : --_j) { | ||
for (n = j = 0, ref1 = open_span_count; 0 <= ref1 ? j < ref1 : j > ref1; n = 0 <= ref1 ? ++j : --j) { | ||
R.push('</span>'); | ||
@@ -344,0 +344,0 @@ } |
126
lib/TRM.js
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
var TYPES, badge, color_code, color_name, effect_name, effect_names, effect_off, effect_on, isa_text, lines_from_stdout, rainbow_color_names, rainbow_idx, _fn, _fn1, _ref, _rpr, | ||
__slice = [].slice; | ||
var TYPES, _rpr, badge, color_code, color_name, effect_name, effect_names, effect_off, effect_on, fn, fn1, isa_text, lines_from_stdout, rainbow_color_names, rainbow_idx, ref, | ||
slice = [].slice; | ||
@@ -32,3 +32,3 @@ this.constants = require('./TRM-CONSTANTS'); | ||
var P; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return target.write(_this.pen.apply(_this, P)); | ||
@@ -41,3 +41,3 @@ }; | ||
var P; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
@@ -52,13 +52,13 @@ /* Given any number of arguments, return a text representing the arguments as seen fit for output | ||
var P, R, p; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
/* ... */ | ||
R = (function() { | ||
var _i, _len, _results; | ||
_results = []; | ||
for (_i = 0, _len = P.length; _i < _len; _i++) { | ||
p = P[_i]; | ||
_results.push(isa_text(p) ? p : this.rpr(p)); | ||
var i, len, results; | ||
results = []; | ||
for (i = 0, len = P.length; i < len; i++) { | ||
p = P[i]; | ||
results.push(isa_text(p) ? p : this.rpr(p)); | ||
} | ||
return _results; | ||
return results; | ||
}).call(this); | ||
@@ -214,10 +214,10 @@ return R.join(this.separator); | ||
_fn = (function(_this) { | ||
fn = (function(_this) { | ||
return function(effect_name, effect_on, effect_off) { | ||
return _this[effect_name] = function() { | ||
var P, R, idx, last_idx, p, _i, _len; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
var P, R, i, idx, last_idx, len, p; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
R = [effect_on]; | ||
last_idx = P.length - 1; | ||
for (idx = _i = 0, _len = P.length; _i < _len; idx = ++_i) { | ||
for (idx = i = 0, len = P.length; i < len; idx = ++i) { | ||
p = P[idx]; | ||
@@ -238,14 +238,14 @@ R.push(isa_text(p) ? p : _this.rpr(p)); | ||
effect_off = this.constants['no_' + effect_name]; | ||
_fn(effect_name, effect_on, effect_off); | ||
fn(effect_name, effect_on, effect_off); | ||
} | ||
_ref = this.constants['colors']; | ||
_fn1 = (function(_this) { | ||
ref = this.constants['colors']; | ||
fn1 = (function(_this) { | ||
return function(color_name, color_code) { | ||
return _this[color_name] = function() { | ||
var P, R, idx, last_idx, p, _i, _len; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
var P, R, i, idx, last_idx, len, p; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
R = [color_code]; | ||
last_idx = P.length - 1; | ||
for (idx = _i = 0, _len = P.length; _i < _len; idx = ++_i) { | ||
for (idx = i = 0, len = P.length; i < len; idx = ++i) { | ||
p = P[idx]; | ||
@@ -263,5 +263,5 @@ R.push(isa_text(p) ? p : _this.rpr(p)); | ||
})(this); | ||
for (color_name in _ref) { | ||
color_code = _ref[color_name]; | ||
_fn1(color_name, color_code); | ||
for (color_name in ref) { | ||
color_code = ref[color_name]; | ||
fn1(color_name, color_code); | ||
} | ||
@@ -281,3 +281,3 @@ | ||
var P; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
rainbow_idx = (rainbow_idx + 1) % rainbow_color_names.length; | ||
@@ -289,3 +289,3 @@ return this[rainbow_color_names[rainbow_idx]].apply(this, P); | ||
var P; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return this.lime(this.underline.apply(this, P)); | ||
@@ -296,11 +296,11 @@ }; | ||
var P, p; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return ((function() { | ||
var _i, _len, _results; | ||
_results = []; | ||
for (_i = 0, _len = P.length; _i < _len; _i++) { | ||
p = P[_i]; | ||
_results.push(p ? this.green("✔ " + (this._pen(p))) : this.red("✗ " + (this._pen(p)))); | ||
var i, len, results; | ||
results = []; | ||
for (i = 0, len = P.length; i < len; i++) { | ||
p = P[i]; | ||
results.push(p ? this.green("✔ " + (this._pen(p))) : this.red("✗ " + (this._pen(p)))); | ||
} | ||
return _results; | ||
return results; | ||
}).call(this)).join(''); | ||
@@ -359,3 +359,3 @@ }; | ||
var P; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return _this.log(prefix, colorize.apply(null, P)); | ||
@@ -368,4 +368,4 @@ }; | ||
var P; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
return _this.log.apply(_this, [prefix].concat(__slice.call(P))); | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return _this.log.apply(_this, [prefix].concat(slice.call(P))); | ||
}; | ||
@@ -385,12 +385,12 @@ })(this); | ||
return ((function() { | ||
var _i, _len, _ref1, _results; | ||
_ref1 = this.analyze(text); | ||
_results = []; | ||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) { | ||
chunk = _ref1[_i]; | ||
var i, len, ref1, results; | ||
ref1 = this.analyze(text); | ||
results = []; | ||
for (i = 0, len = ref1.length; i < len; i++) { | ||
chunk = ref1[i]; | ||
if ((is_ansicode = !is_ansicode)) { | ||
_results.push(chunk); | ||
results.push(chunk); | ||
} | ||
} | ||
return _results; | ||
return results; | ||
}).call(this)).join(''); | ||
@@ -411,4 +411,4 @@ }; | ||
this.dir = function() { | ||
var P, arity, idx, p, r, width, x, _i, _len; | ||
P = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
var P, arity, i, idx, len, p, r, width, x; | ||
P = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
switch (arity = P.length) { | ||
@@ -423,3 +423,3 @@ case 0: | ||
x = P[P.length - 1]; | ||
for (idx = _i = 0, _len = P.length; _i < _len; idx = ++_i) { | ||
for (idx = i = 0, len = P.length; i < len; idx = ++i) { | ||
p = P[idx]; | ||
@@ -440,11 +440,11 @@ if (idx < P.length - 1) { | ||
this._dir = function(x) { | ||
var R, marker, name, names, p, role, type, _i, _j, _len, _len1, _ref1, _ref2; | ||
var R, i, j, len, len1, marker, name, names, p, ref1, ref2, role, type; | ||
R = []; | ||
_ref1 = this._get_prototypes_types_and_property_names(x, []); | ||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) { | ||
_ref2 = _ref1[_i], role = _ref2[0], p = _ref2[1], type = _ref2[2], names = _ref2[3]; | ||
ref1 = this._get_prototypes_types_and_property_names(x, []); | ||
for (i = 0, len = ref1.length; i < len; i++) { | ||
ref2 = ref1[i], role = ref2[0], p = ref2[1], type = ref2[2], names = ref2[3]; | ||
R.push(this.grey('('.concat(role, ')'))); | ||
R.push(this.orange(type)); | ||
for (_j = 0, _len1 = names.length; _j < _len1; _j++) { | ||
name = names[_j]; | ||
for (j = 0, len1 = names.length; j < len1; j++) { | ||
name = names[j]; | ||
marker = this._marker_from_type(TYPES.type_of((Object.getOwnPropertyDescriptor(p, name))['value'])); | ||
@@ -458,12 +458,12 @@ R.push((this.cyan(name)).concat(this.grey(marker))); | ||
this._is_list_idx = function(idx_txt, length) { | ||
var _ref1; | ||
var ref1; | ||
if (!/^[0-9]+$/.test(idx_txt)) { | ||
return false; | ||
} | ||
return (0 <= (_ref1 = parseInt(idx_txt)) && _ref1 < length); | ||
return (0 <= (ref1 = parseInt(idx_txt)) && ref1 < length); | ||
}; | ||
this._marker_from_type = function(type) { | ||
var _ref1; | ||
return (_ref1 = this._marker_by_type[type]) != null ? _ref1 : '|'.concat(type); | ||
var ref1; | ||
return (ref1 = this._marker_by_type[type]) != null ? ref1 : '|'.concat(type); | ||
}; | ||
@@ -494,11 +494,11 @@ | ||
names = (function() { | ||
var _i, _len, _results; | ||
_results = []; | ||
for (_i = 0, _len = names.length; _i < _len; _i++) { | ||
name = names[_i]; | ||
var i, len, results; | ||
results = []; | ||
for (i = 0, len = names.length; i < len; i++) { | ||
name = names[i]; | ||
if (!this._is_list_idx(name, x.length)) { | ||
_results.push(name); | ||
results.push(name); | ||
} | ||
} | ||
return _results; | ||
return results; | ||
}).call(this); | ||
@@ -505,0 +505,0 @@ } |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.9.0 | ||
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
var isBuffer, js_type_of, log, njs_util, rpr, _ref, | ||
__slice = [].slice; | ||
var isBuffer, js_type_of, log, njs_util, ref, rpr, | ||
slice = [].slice; | ||
@@ -21,3 +21,3 @@ log = console.log; | ||
isBuffer = (_ref = Buffer.isBuffer) != null ? _ref : njs_util.isBuffer; | ||
isBuffer = (ref = Buffer.isBuffer) != null ? ref : njs_util.isBuffer; | ||
@@ -220,4 +220,4 @@ this._coffeenode_type_by_js_type = { | ||
this.validate_isa = function() { | ||
var message, probe_type, type, types, x, _i, _len; | ||
x = arguments[0], types = 2 <= arguments.length ? __slice.call(arguments, 1) : []; | ||
var i, len, message, probe_type, type, types, x; | ||
x = arguments[0], types = 2 <= arguments.length ? slice.call(arguments, 1) : []; | ||
if (types.length === 0) { | ||
@@ -227,4 +227,4 @@ throw new Error("expected one or more types, got none"); | ||
probe_type = this.type_of(x); | ||
for (_i = 0, _len = types.length; _i < _len; _i++) { | ||
type = types[_i]; | ||
for (i = 0, len = types.length; i < len; i++) { | ||
type = types[i]; | ||
if (type === probe_type) { | ||
@@ -245,4 +245,4 @@ return null; | ||
return (function() { | ||
var match, name, type, _results; | ||
_results = []; | ||
var match, name, results, type; | ||
results = []; | ||
for (name in _this) { | ||
@@ -254,3 +254,3 @@ match = name.match(/^isa_(.+)/); | ||
type = match[1]; | ||
_results.push((function(name, type) { | ||
results.push((function(name, type) { | ||
return _this["validate_" + name] = function(x) { | ||
@@ -264,3 +264,3 @@ if (this[name](x)) { | ||
} | ||
return _results; | ||
return results; | ||
}); | ||
@@ -267,0 +267,0 @@ })(this)(); |
{ | ||
"name": "cnd", | ||
"version": "0.1.9", | ||
"version": "1.0.1", | ||
"description": "a grab-bag NodeJS package mainly for functionalities that used to live in coffeenode-trm, coffeenode-bitsnpieces, and coffeenode-types", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
147180