Bar graph added.

This commit is contained in:
prabhatdev
2020-07-28 00:48:25 +05:30
parent d0a6e2667d
commit 194b41124d
3468 changed files with 640611 additions and 169 deletions

View File

@@ -0,0 +1,45 @@
### Version 2.0.0 (2019-02-02)
- Removed: The `margins` option. Check out
[@aitodotai/json-stringify-pretty-compact] if you miss it. This package is now
purely a combination of `JSON.stringify(obj)` and
`JSON.stringify(obj, null, 2)` with no additional formatting features on top
of that.
- Added: Support for the [replacer] argument.
- Changed: Passing `undefined` to options now result in the default value being
used. This is to align with how destructuring defaults work in ES2015.
### Version 1.2.0 (2018-04-22)
- Added: TypeScript definition. Thanks to @domoritz!
### Version 1.1.0 (2018-01-12)
- Added: The `margins` option. Thanks to @randallsquared!
### Version 1.0.4 (2017-04-29)
- Fixed: String contents are no longer accidentally modified in some cases.
Thanks to @powellquiring!
### Version 1.0.3 (2017-03-30)
- No code changes. Just trying to get the readme to show on npmjs.com.
### Version 1.0.2 (2016-09-08)
- Improved: Limited npm package contents for a smaller download.
### Version 1.0.1 (2014-11-03)
- Fixed: Commas are now accounted for when calculating the available length of a
line, so that they do not appear outside `options.maxLength`.
### Version 1.0.0 (2014-11-01)
- Initial release.
<!-- prettier-ignore-start -->
[@aitodotai/json-stringify-pretty-compact]: https://www.npmjs.com/package/@aitodotai/json-stringify-pretty-compact
[replacer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter
<!-- prettier-ignore-end -->

21
node_modules/json-stringify-pretty-compact/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014, 2016, 2017, 2019 Simon Lydell
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.

88
node_modules/json-stringify-pretty-compact/README.md generated vendored Normal file
View File

@@ -0,0 +1,88 @@
# json-stringify-pretty-compact [![Build Status][travis-badge]][travis-link]
The output of [JSON.stringify] comes in two flavors: _compact_ and _pretty._ The
former is usually too compact to be read by humans, while the latter sometimes
is too spacious. This module trades performance for a compromise between the
two. The result is a _pretty_ compact string, where “pretty” means both “kind
of” and “nice”.
<!-- prettier-ignore -->
```json
{
"bool": true,
"short array": [1, 2, 3],
"long array": [
{"x": 1, "y": 2},
{"x": 2, "y": 1},
{"x": 1, "y": 1},
{"x": 2, "y": 2}
]
}
```
While the “pretty” mode of [JSON.stringify] puts every item of arrays and
objects on its own line, this module puts the whole array or object on a single
line, unless the line becomes too long (the default maximum is 80 characters).
Making arrays and objects multi-line is the only attempt made to enforce the
maximum line length; if that doesnt help then so be it.
## Installation
```
npm install json-stringify-pretty-compact
```
```js
const stringify = require("json-stringify-pretty-compact");
```
## `stringify(obj, options = {})`
Its like `JSON.stringify(obj, options.replacer, options.indent)`, except that
objects and arrays are on one line if they fit (according to
`options.maxLength`).
`options`:
- indent: Defaults to 2. Works exactly like the third parameter of
[JSON.stringify].
- maxLength: Defaults to 80. Lines will be tried to be kept at maximum this many
characters long.
- replacer: Defaults to undefined. Works exactly like the second parameter of
[JSON.stringify].
`stringify(obj, {maxLength: 0, indent: indent})` gives the exact same result as
`JSON.stringify(obj, null, indent)`. (However, if you use a `replacer`, integer
keys might be moved first.)
`stringify(obj, {maxLength: Infinity})` gives the exact same result as
`JSON.stringify(obj)`, except that there are spaces after colons and commas.
**Want more options?** Check out [@aitodotai/json-stringify-pretty-compact]!
## Development
You need Node.js 10 and npm 6.
### npm scripts
- `npm run eslint`: Run [ESLint] \(including [Prettier]).
- `npm run eslint:fix`: Autofix [ESLint] errors.
- `npm run prettier`: Run [Prettier] for files other than JS.
- `npm run jest`: Run unit tests. During development, `npm run jest -- --watch`
is nice.
- `npm run coverage`: Run unit tests with code coverage.
- `npm test`: Check that everything works.
## License
[MIT](LICENSE).
<!-- prettier-ignore-start -->
[@aitodotai/json-stringify-pretty-compact]: https://www.npmjs.com/package/@aitodotai/json-stringify-pretty-compact
[eslint]: https://eslint.org/
[json.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
[prettier]: https://prettier.io/
[travis-badge]: https://travis-ci.org/lydell/json-stringify-pretty-compact.svg?branch=master
[travis-link]: https://travis-ci.org/lydell/json-stringify-pretty-compact
<!-- prettier-ignore-end -->

14
node_modules/json-stringify-pretty-compact/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
declare module "json-stringify-pretty-compact" {
const stringify: (
object: any,
options?: {
indent?: number | string;
maxLength?: number;
replacer?:
| ((key: string, value: any) => any)
| (number | string)[]
| null;
}
) => string;
export = stringify;
}

99
node_modules/json-stringify-pretty-compact/index.js generated vendored Normal file
View File

@@ -0,0 +1,99 @@
"use strict";
// Note: This regex matches even invalid JSON strings, but since were
// working on the output of `JSON.stringify` we know that only valid strings
// are present (unless the user supplied a weird `options.indent` but in
// that case we dont care since the output would be invalid anyway).
var stringOrChar = /("(?:[^\\"]|\\.)*")|[:,]/g;
module.exports = function stringify(passedObj, options) {
var indent, maxLength, replacer;
options = options || {};
indent = JSON.stringify(
[1],
undefined,
options.indent === undefined ? 2 : options.indent
).slice(2, -3);
maxLength =
indent === ""
? Infinity
: options.maxLength === undefined
? 80
: options.maxLength;
replacer = options.replacer;
return (function _stringify(obj, currentIndent, reserved) {
// prettier-ignore
var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;
if (obj && typeof obj.toJSON === "function") {
obj = obj.toJSON();
}
string = JSON.stringify(obj, replacer);
if (string === undefined) {
return string;
}
length = maxLength - currentIndent.length - reserved;
if (string.length <= length) {
prettified = string.replace(stringOrChar, function(match, stringLiteral) {
return stringLiteral || match + " ";
});
if (prettified.length <= length) {
return prettified;
}
}
if (replacer != null) {
obj = JSON.parse(string);
replacer = undefined;
}
if (typeof obj === "object" && obj !== null) {
nextIndent = currentIndent + indent;
items = [];
index = 0;
if (Array.isArray(obj)) {
start = "[";
end = "]";
length = obj.length;
for (; index < length; index++) {
items.push(
_stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||
"null"
);
}
} else {
start = "{";
end = "}";
keys = Object.keys(obj);
length = keys.length;
for (; index < length; index++) {
key = keys[index];
keyPart = JSON.stringify(key) + ": ";
value = _stringify(
obj[key],
nextIndent,
keyPart.length + (index === length - 1 ? 0 : 1)
);
if (value !== undefined) {
items.push(keyPart + value);
}
}
}
if (items.length > 0) {
return [start, indent + items.join(",\n" + nextIndent), end].join(
"\n" + currentIndent
);
}
}
return string;
})(passedObj, "", 0);
};

View File

@@ -0,0 +1,75 @@
{
"_from": "json-stringify-pretty-compact@~2.0.0",
"_id": "json-stringify-pretty-compact@2.0.0",
"_inBundle": false,
"_integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==",
"_location": "/json-stringify-pretty-compact",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "json-stringify-pretty-compact@~2.0.0",
"name": "json-stringify-pretty-compact",
"escapedName": "json-stringify-pretty-compact",
"rawSpec": "~2.0.0",
"saveSpec": null,
"fetchSpec": "~2.0.0"
},
"_requiredBy": [
"/vega-lite"
],
"_resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz",
"_shasum": "e77c419f52ff00c45a31f07f4c820c2433143885",
"_spec": "json-stringify-pretty-compact@~2.0.0",
"_where": "/home/prabhatdev/Documents/opensource/gitHubStats/waka-readme-stats/node_modules/vega-lite",
"author": {
"name": "Simon Lydell"
},
"bugs": {
"url": "https://github.com/lydell/json-stringify-pretty-compact/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "The best of both `JSON.stringify(obj)` and `JSON.stringify(obj, null, indent)`.",
"devDependencies": {
"eslint": "5.13.0",
"eslint-config-lydell": "13.0.0",
"eslint-plugin-jest": "22.2.2",
"eslint-plugin-prettier": "3.0.1",
"jest": "24.0.0",
"prettier": "1.16.3"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/lydell/json-stringify-pretty-compact#readme",
"keywords": [
"JSON",
"stringify",
"pretty",
"print",
"pretty-print",
"compact",
"indent",
"format",
"formatter"
],
"license": "MIT",
"main": "index.js",
"name": "json-stringify-pretty-compact",
"repository": {
"type": "git",
"url": "git+https://github.com/lydell/json-stringify-pretty-compact.git"
},
"scripts": {
"coverage": "jest --coverage",
"eslint": "eslint .",
"eslint:fix": "npm run eslint -- --fix",
"jest": "jest",
"prepublishOnly": "npm test",
"prettier": "prettier --write \"**/*.{md,ts}\"",
"test": "npm run eslint && npm run coverage"
},
"version": "2.0.0"
}