feat: Add Be and tbd skill, also added Roadmap file

This commit is contained in:
2026-05-10 16:32:12 -04:00
parent 3500ade13f
commit 0bb8885802
29587 changed files with 10611695 additions and 0 deletions

34
Skills/@be/be/node_modules/prettyjson/.jshintrc generated vendored Normal file
View File

@@ -0,0 +1,34 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": false,
"maxlen": 80,
"maxdepth": 2,
"predef": [
"define",
"require",
"describe",
"it",
"xit",
"before",
"beforeEach",
"after",
"afterEach"
]
}

3
Skills/@be/be/node_modules/prettyjson/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
.DS_Store
node_modules/
coverage/

4
Skills/@be/be/node_modules/prettyjson/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
language: "node_js"
after_success: "npm run coveralls"
node_js:
- "0.10"

2
Skills/@be/be/node_modules/prettyjson/Authors.md generated vendored Normal file
View File

@@ -0,0 +1,2 @@
Go to the [https://github.com/rafeca/prettyjson/graphs/contributors](GitHub contributors graph page)
to see the list of contributors.

53
Skills/@be/be/node_modules/prettyjson/CONTRIBUTING.md generated vendored Normal file
View File

@@ -0,0 +1,53 @@
Good pull requests - patches, improvements, new features - are a fantastic
help.
If you've spotted any small, obvious errors and want to help out by patching it,
that will be much appreciated.
If your contribution involves a significant amount of work or substantial
changes to any part of the project, please open a "contribution enquiry" issue
first to check that the work is wanted or matches the goals of the project.
All pull requests should remain focused in scope and avoid containing unrelated
commits.
Please follow this process; it's the best way to get your work included in the
project:
1. [Fork](http://help.github.com/fork-a-repo/) the project.
2. Clone your fork (`git clone
git@github.com:<your-username>/<repo-name>.git`).
3. Add an `upstream` remote (`git remote add upstream
git://github.com/<upsteam-owner>/<repo-name>.git`).
4. Get the latest changes from upstream (e.g. `git pull upstream
<dev-branch>`).
5. Create a new topic branch to contain your feature, change, or fix (`git
checkout -b <topic-branch-name>`).
6. Create the needed tests to ensure that your contribution is not broken in the future.
If you are creating a small fix or patch to an existing feature, just a simple test
will do, if it is a brand new feature, make sure to create a new test suite.
7. Make sure that your changes adhere to the current coding conventions used
throughout the project - indentation, accurate comments, etc.
8. Commit your changes in logical chunks; use git's [interactive
rebase](https://help.github.com/articles/interactive-rebase) feature to tidy
up your commits before making them public. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your pull request is unlikely be merged into the main project.
9. Locally merge (or rebase) the upstream branch into your topic branch.
10. Push your topic branch up to your fork (`git push origin
<topic-branch-name>`).
11. [Open a Pull Request](http://help.github.com/send-pull-requests/) with a
clear title and description.
If you have any other questions about contributing, please feel free to contact
me.

2
Skills/@be/be/node_modules/prettyjson/History.md generated vendored Normal file
View File

@@ -0,0 +1,2 @@
Go to [GitHub releases page](https://github.com/rafeca/prettyjson/releases) to
see the history of releases.

23
Skills/@be/be/node_modules/prettyjson/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2011 Rafael de Oleza <rafeca@gmail.com>
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.

131
Skills/@be/be/node_modules/prettyjson/README.md generated vendored Normal file
View File

@@ -0,0 +1,131 @@
# prettyjson [![Build Status](https://secure.travis-ci.org/rafeca/prettyjson.png)](http://travis-ci.org/rafeca/prettyjson) [![NPM version](https://badge.fury.io/js/prettyjson.png)](http://badge.fury.io/js/prettyjson) [![Coverage Status](https://coveralls.io/repos/rafeca/prettyjson/badge.png?branch=master)](https://coveralls.io/r/rafeca/prettyjson?branch=master)
Package for formatting JSON data in a coloured YAML-style, perfect for CLI output.
## How to install
Just install it via NPM:
```bash
$ npm install prettyjson
```
## Using it (from the CLI)
This package installs a command line interface to render JSON data in a more
convenient way. You can use the CLI in three different ways:
**Decode a JSON file:** If you want to see the contents of a JSON file, just pass
it as the first argument to the CLI:
```bash
$ prettyjson package.json
```
![Example 1](https://raw.github.com/rafeca/prettyjson/master/images/example3.png)
**Decode the stdin:** You can also pipe the result of a command (for example an
HTTP request) to the CLI to see the JSON result in a clearer way:
```bash
$ curl https://api.github.com/users/rafeca | prettyjson
```
![Example 2](https://raw.github.com/rafeca/prettyjson/master/images/example4.png)
**Decode random strings:** if you call the CLI with no arguments, you'll get a
prompt where you can past JSON strings and they'll be automatically displayed in a clearer way:
![Example 3](https://raw.github.com/rafeca/prettyjson/master/images/example5.png)
If you install the package globally (with `npm install -g prettyjson`), the CLI
will be installed automatically in your PATH thanks to npm.
### Command line options
It's possible to customize the output through some command line options:
```bash
# Change colors
$ prettyjson --string=red --keys=blue --dash=yellow --number=green package.json
# Do not use colors
$ prettyjson --nocolor=1 package.json
# Change indentation
$ prettyjson --indent=4 package.json
```
**Deprecation Notice**: The old configuration through environment variables is
deprecated and it will be removed in the next major version (1.0.0).
## Using it (from Node.js)
It's pretty easy to use it. You just have to include it in your script and call
the `render()` method:
```javascript
var prettyjson = require('prettyjson');
var data = {
username: 'rafeca',
url: 'https://github.com/rafeca',
twitter_account: 'https://twitter.com/rafeca',
projects: ['prettyprint', 'connfu']
};
var options = {
noColors: true
};
console.log(prettyjson.render(data, options));
```
And will output:
![Example 4](https://raw.github.com/rafeca/prettyjson/master/images/example1.png)
You can also configure the colors of the hash keys and array dashes
(using [colors.js](https://github.com/Marak/colors.js) colors syntax):
```javascript
var prettyjson = require('prettyjson');
var data = {
username: 'rafeca',
url: 'https://github.com/rafeca',
twitter_account: 'https://twitter.com/rafeca',
projects: ['prettyprint', 'connfu']
};
console.log(prettyjson.render(data, {
keysColor: 'rainbow',
dashColor: 'magenta',
stringColor: 'white'
}));
```
Will output something like:
![Example 5](https://raw.github.com/rafeca/prettyjson/master/images/example2.png)
## Running Tests
To run the test suite first invoke the following command within the repo,
installing the development dependencies:
```bash
$ npm install
```
then run the tests:
```bash
$ npm test
```
On windows, you can run the tests with:
```cmd
C:\git\prettyjson> npm run-script testwin
```

47
Skills/@be/be/node_modules/prettyjson/bin/prettyjson generated vendored Normal file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env node
var prettyjson = require('../lib/prettyjson');
var fs=require('fs');
var argv = require('minimist')(process.argv.slice(2));
var options = {
keysColor: argv.keys || process.env.PRETTYJSON_KEYS,
dashColor: argv.dash || process.env.PRETTYJSON_DASH,
defaultIndentation: argv.indent || process.env.PRETTYJSON_INDENT,
stringColor: argv.string || process.env.PRETTYJSON_STRING,
numberColor: argv.number || process.env.PRETTYJSON_NUMBER,
noColor: argv['nocolor'] || process.env.PRETTYJSON_NOCOLOR
};
var renderInputJson = function(input){
console.log(prettyjson.renderString(input, options));
};
if (argv._.length) {
// First parameter is the file to read and parse
var filename = argv._[0];
try {
renderInputJson(fs.readFileSync(filename, 'utf8'));
} catch (e) {
console.error('Error: '.red + "File '" + filename + "' does not exist");
process.exit(1);
}
} else {
// Read input stream
var streamData = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
if (chunk === '\n') {
renderInputJson(streamData);
streamData = '';
return;
}
streamData += chunk;
});
process.stdin.on('end', function(){
renderInputJson(streamData);
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

201
Skills/@be/be/node_modules/prettyjson/lib/prettyjson.js generated vendored Normal file
View File

@@ -0,0 +1,201 @@
'use strict';
// ### Module dependencies
require('colors');
var Utils = require('./utils');
exports.version = require('../package.json').version;
// ### Render function
// *Parameters:*
//
// * **`data`**: Data to render
// * **`options`**: Hash with different options to configure the parser
// * **`indentation`**: Base indentation of the parsed output
//
// *Example of options hash:*
//
// {
// emptyArrayMsg: '(empty)', // Rendered message on empty strings
// keysColor: 'blue', // Color for keys in hashes
// dashColor: 'red', // Color for the dashes in arrays
// stringColor: 'grey', // Color for strings
// defaultIndentation: 2 // Indentation on nested objects
// }
exports.render = function render(data, options, indentation) {
// Default values
indentation = indentation || 0;
options = options || {};
options.emptyArrayMsg = options.emptyArrayMsg || '(empty array)';
options.keysColor = options.keysColor || 'green';
options.dashColor = options.dashColor || 'green';
options.numberColor = options.numberColor || 'blue';
options.defaultIndentation = options.defaultIndentation || 2;
options.noColor = !!options.noColor;
options.stringColor = options.stringColor || null;
var output = [];
// Helper function to detect if an object can be directly serializable
var isSerializable = function(input) {
if (typeof input === 'string' || typeof input === 'boolean' ||
typeof input === 'number' || input === null) {
return true;
}
return false;
};
var addColorToData = function(input) {
if (options.noColor) {
return input;
}
if (typeof input === 'string') {
// Print strings in regular terminal color
return options.stringColor ? input[options.stringColor] : input;
}
var sInput = input + '';
if (input === true) {
return sInput.green;
}
if (input === false) {
return sInput.red;
}
if (input === null) {
return sInput.grey;
}
if (typeof input === 'number') {
return sInput[options.numberColor];
}
return sInput;
};
// Render a string exactly equal
if (isSerializable(data)) {
output.push(Utils.indent(indentation) + addColorToData(data));
}
else if (Array.isArray(data)) {
// If the array is empty, render the `emptyArrayMsg`
if (data.length === 0) {
output.push(Utils.indent(indentation) + options.emptyArrayMsg);
} else {
data.forEach(function(element) {
// Prepend the dash at the begining of each array's element line
var line = ('- ');
if (!options.noColor) {
line = line[options.dashColor];
}
var line = Utils.indent(indentation) + line;
// If the element of the array is a string, bool, number, or null
// render it in the same line
if (isSerializable(element)) {
line += exports.render(element, options);
output.push(line);
// If the element is an array or object, render it in next line
} else {
output.push(line);
output.push(exports.render(
element, options, indentation + options.defaultIndentation
));
}
});
}
}
else if (typeof data === 'object') {
// Get the size of the longest index to align all the values
var maxIndexLength = Utils.getMaxIndexLength(data);
var key;
var isError = data instanceof Error;
Object.getOwnPropertyNames(data).forEach(function(i) {
// Prepend the index at the beginning of the line
key = (i + ': ');
if (!options.noColor) {
key = key[options.keysColor];
}
key = Utils.indent(indentation) + key;
// Skip `undefined`, it's not a valid JSON value.
if (data[i] === undefined) {
return;
}
// If the value is serializable, render it in the same line
if (isSerializable(data[i]) && (!isError || i !== 'stack')) {
key += exports.render(data[i], options, maxIndexLength - i.length);
output.push(key);
// If the index is an array or object, render it in next line
} else {
output.push(key);
output.push(
exports.render(
isError && i === 'stack' ? data[i].split('\n') : data[i],
options,
indentation + options.defaultIndentation
)
);
}
});
}
// Return all the lines as a string
return output.join('\n');
};
// ### Render from string function
// *Parameters:*
//
// * **`data`**: Data to render as a string
// * **`options`**: Hash with different options to configure the parser
// * **`indentation`**: Base indentation of the parsed output
//
// *Example of options hash:*
//
// {
// emptyArrayMsg: '(empty)', // Rendered message on empty strings
// keysColor: 'blue', // Color for keys in hashes
// dashColor: 'red', // Color for the dashes in arrays
// defaultIndentation: 2 // Indentation on nested objects
// }
exports.renderString = function renderString(data, options, indentation) {
var output = '';
var parsedData;
// If the input is not a string or if it's empty, just return an empty string
if (typeof data !== 'string' || data === '') {
return '';
}
// Remove non-JSON characters from the beginning string
if (data[0] !== '{' && data[0] !== '[') {
var beginingOfJson;
if (data.indexOf('{') === -1) {
beginingOfJson = data.indexOf('[');
} else if (data.indexOf('[') === -1) {
beginingOfJson = data.indexOf('{');
} else if (data.indexOf('{') < data.indexOf('[')) {
beginingOfJson = data.indexOf('{');
} else {
beginingOfJson = data.indexOf('[');
}
output += data.substr(0, beginingOfJson) + '\n';
data = data.substr(beginingOfJson);
}
try {
parsedData = JSON.parse(data);
} catch (e) {
// Return an error in case of an invalid JSON
return 'Error:'.red + ' Not valid JSON!';
}
// Call the real render() method
output += exports.render(parsedData, options, indentation);
return output;
};

20
Skills/@be/be/node_modules/prettyjson/lib/utils.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
/**
* Creates a string with the same length as `numSpaces` parameter
**/
exports.indent = function indent(numSpaces) {
return new Array(numSpaces+1).join(' ');
};
/**
* Gets the string length of the longer index in a hash
**/
exports.getMaxIndexLength = function(input) {
var maxWidth = 0;
Object.getOwnPropertyNames(input).forEach(function(key) {
maxWidth = Math.max(maxWidth, key.length);
});
return maxWidth;
};

45
Skills/@be/be/node_modules/prettyjson/package.json generated vendored Normal file
View File

@@ -0,0 +1,45 @@
{
"author": "Rafael de Oleza <rafeca@gmail.com> (https://github.com/rafeca)",
"name": "prettyjson",
"description": "Package for formatting JSON data in a coloured YAML-style, perfect for CLI output",
"version": "0.13.0",
"homepage": "http://rafeca.com/prettyjson",
"keywords": [
"json",
"cli",
"formatting",
"colors"
],
"repository": {
"type": "git",
"url": "https://github.com/rafeca/prettyjson.git"
},
"main": "./lib/prettyjson",
"scripts": {
"test": "mocha --reporter spec",
"testwin": "node ./node_modules/mocha/bin/mocha --reporter spec",
"jshint": "jshint lib/*.js",
"coverage": "istanbul cover _mocha --report lcovonly -- -R spec",
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"changelog": "git log $(git describe --tags --abbrev=0)..HEAD --pretty='* %s' --first-parent"
},
"bin": {
"prettyjson": "./bin/prettyjson"
},
"engines": {
"node": ">= 0.10.0 < 0.12.0"
},
"dependencies": {
"colors": "0.6.2",
"minimist": "0.0.8"
},
"devDependencies": {
"mocha": "1.8.1",
"should": "1.2.2",
"jshint": "~2.3.0",
"getversion": "~0.1.1",
"istanbul": "~0.2.4",
"coveralls": "~2.7.0",
"mocha-lcov-reporter": "0.0.1"
}
}

View File

@@ -0,0 +1,297 @@
var prettyjson = process.env.EXPRESS_COV ? require('../lib-cov/prettyjson') : require('../lib/prettyjson');
var should = require('should');
describe('prettyjson general tests', function() {
it("should output a string exactly equal as the input", function() {
var input = 'This is a string';
var output = prettyjson.render(input);
output.should.equal(input);
});
it("should output a string with indentation", function() {
var input = 'This is a string';
var output = prettyjson.render(input, {}, 4);
output.should.equal(' ' + input);
});
it("should output an array of strings", function() {
var input = ['first string', 'second string'];
var output = prettyjson.render(input);
output.should.equal([
'- '.green + input[0],
'- '.green + input[1]
].join('\n'));
});
it("should output an array of arrays", function() {
var input = ['first string', ['nested 1', 'nested 2'], 'second string'];
var output = prettyjson.render(input);
output.should.equal([
'- '.green + input[0],
'- '.green,
' ' + '- '.green + input[1][0],
' ' + '- '.green + input[1][1],
'- '.green + input[2]
].join('\n'));
});
it("should output a hash of strings", function() {
var input = {param1: 'first string', param2: 'second string'};
var output = prettyjson.render(input);
output.should.equal([
'param1: '.green + 'first string',
'param2: '.green + 'second string'
].join('\n'));
});
it("should output a hash of hashes", function() {
var input = {first_param: {subparam: 'first string', subparam2: 'another string'}, second_param: 'second string'};
var output = prettyjson.render(input);
output.should.equal([
'first_param: '.green,
' ' + 'subparam: '.green + ' first string',
' ' + 'subparam2: '.green + 'another string',
'second_param: '.green + 'second string'
].join('\n'));
});
it("should indent correctly the hashes keys", function() {
var input = {very_large_param: 'first string', param: 'second string'};
var output = prettyjson.render(input);
output.should.equal([
'very_large_param: '.green + 'first string',
'param: '.green + ' second string'
].join('\n'));
});
it("should output a really nested object", function() {
var input = {
first_param: {
subparam: 'first string',
subparam2: 'another string',
subparam3: ["different", "values", "in an array"]
},
second_param: 'second string',
an_array: [{
param3: 'value',
param10: 'other value'
}],
empty_array: []
};
var output = prettyjson.render(input);
output.should.equal([
'first_param: '.green,
' ' + 'subparam: '.green + ' first string',
' ' + 'subparam2: '.green + 'another string',
' ' + 'subparam3: '.green,
' ' + '- '.green + 'different',
' ' + '- '.green + 'values',
' ' + '- '.green + 'in an array',
'second_param: '.green + 'second string',
'an_array: '.green,
' ' + '- '.green,
' ' + 'param3: '.green + ' value',
' ' + 'param10: '.green + 'other value',
'empty_array: '.green,
' (empty array)'
].join('\n'));
});
it("should allow to configure colors for hash keys", function() {
var input = {param1: 'first string', param2: 'second string'};
var output = prettyjson.render(input, {keysColor: 'blue'});
output.should.equal([
'param1: '.blue + 'first string',
'param2: '.blue + 'second string'
].join('\n'));
});
it("should allow to configure colors for numbers", function() {
var input = {param1: 17, param2: 22.3};
var output = prettyjson.render(input, {numberColor: 'red'});
output.should.equal([
'param1: '.green + '17'.red,
'param2: '.green + '22.3'.red
].join('\n'));
});
it("should allow to configure rainbow as color", function() {
var input = {param_long: 'first string', param2: 'second string'};
var output = prettyjson.render(input, {keysColor: 'rainbow'});
output.should.equal([
'param_long: '.rainbow + 'first string',
'param2: '.rainbow + ' second string'
].join('\n'));
});
it("should allow to configure the default indentation", function() {
var input = {param: ['first string', "second string"]};
var output = prettyjson.render(input, {defaultIndentation: 4});
output.should.equal([
'param: '.green,
' ' + '- '.green + 'first string',
' ' + '- '.green + 'second string'
].join('\n'));
});
it("should allow to configure the empty message for arrays", function() {
var input = [];
var output = prettyjson.render(input, {emptyArrayMsg: '(empty)'});
output.should.equal([
'(empty)'
].join('\n'));
});
it("should allow to configure colors for strings", function() {
var input = {param1: 'first string', param2: 'second string'};
var output = prettyjson.render(input, {keysColor: 'blue', stringColor: 'red'});
output.should.equal([
'param1: '.blue + 'first string'.red,
'param2: '.blue + 'second string'.red
].join('\n'));
});
it("should allow to not use colors", function() {
var input = {param1: 'first string', param2: ['second string']};
var output = prettyjson.render(input, {noColor: true});
output.should.equal([
'param1: first string',
'param2: ',
' - second string'
].join('\n'));
});
it("should not print an object prototype", function() {
var Input = function() {
this.param1 = 'first string';
this.param2 = 'second string';
};
Input.prototype = {randomProperty: 'idontcare'};
var output = prettyjson.render(new Input);
output.should.equal([
'param1: '.green + 'first string',
'param2: '.green + 'second string'
].join('\n'));
});
});
describe('Printing numbers, booleans and other objects', function() {
it("should print numbers correctly ", function() {
var input = 12345;
var output = prettyjson.render(input, {}, 4);
output.should.equal(' ' + '12345'.blue);
});
it("should print booleans correctly ", function() {
var input = true;
var output = prettyjson.render(input, {}, 4);
output.should.equal(' ' + 'true'.green);
input = false;
output = prettyjson.render(input, {}, 4);
output.should.equal(' ' + 'false'.red);
});
it("should print a null object correctly ", function() {
var input = null;
var output = prettyjson.render(input, {}, 4);
output.should.equal(' ' + 'null'.grey);
});
it("should print an Error correctly ", function() {
Error.stackTraceLimit = 1;
var input = new Error('foo');
var stack = input.stack.split('\n');
var output = prettyjson.render(input, {}, 4);
output.should.equal([
' ' + 'stack: '.green,
' ' + '- '.green + stack[0],
' ' + '- '.green + stack[1],
' ' + 'message: '.green + ' foo'
].join('\n'));
});
it('should print serializable items in an array inline', function() {
var output = prettyjson.render([ 'a', 3, null, true, false ]);
output.should.equal([
'- '.green + 'a',
'- '.green + '3'.blue,
'- '.green + 'null'.grey,
'- '.green + 'true'.green,
'- '.green + 'false'.red
].join('\n'));
});
});
describe('prettyjson.renderString() method', function(){
it('should return an empty string if input is empty', function(){
var input = '';
var output = prettyjson.renderString(input);
output.should.equal('');
});
it('should return an empty string if input is not a string', function(){
var output = prettyjson.renderString({});
output.should.equal('');
});
it('should return an error message if the input is an invalid JSON string', function(){
var output = prettyjson.renderString('not valid!!');
output.should.equal('Error:'.red + ' Not valid JSON!');
});
it('should return the prettyfied string if it is a valid JSON string', function(){
var output = prettyjson.renderString('{"test": "OK"}');
output.should.equal('test: '.green + 'OK');
});
it('should dismiss trailing characters which are not JSON', function(){
var output = prettyjson.renderString('characters that are not JSON at all... {"test": "OK"}');
output.should.equal("characters that are not JSON at all... \n" + 'test: '.green + 'OK');
});
it('should dismiss trailing characters which are not JSON with an array', function(){
var output = prettyjson.renderString('characters that are not JSON at all... ["test"]');
output.should.equal("characters that are not JSON at all... \n" + '- '.green + 'test');
});
it('should be able to accept the options parameter', function(){
var output = prettyjson.renderString('{"test": "OK"}', {stringColor: 'red'});
output.should.equal('test: '.green + 'OK'.red);
});
});