3.2.37 • Published 1 year ago

@kollorg/mollitia-quasi-aspernatur v3.2.37

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

CodePolish.js

Installation

You can install CodePolish using:

npm i @kollorg/mollitia-quasi-aspernatur

or

npm install @kollorg/mollitia-quasi-aspernatur

Usage

Basic Usage

Now, let's say we have a file: sample.js

// sample.js
function greet(name) {
return `Hello, ${name}!`;
}console.log(greet('Ankit Guria'));

Some dependencies maybe required, like:

npm install yaml

As the package also supports .yaml files. Now just head to the directory of this file and run this command on the console:

node -e "require('@kollorg/mollitia-quasi-aspernatur').beautifyJS('sample.js')"

Similarly, a sample.json

// sample.json
{"name":"Ankit Guria","age":25,"city":"India"}

Now just head to the console:

node -e "require('@kollorg/mollitia-quasi-aspernatur').beautifyJSON('sample.json')"

And the below screenshot can be seen as it is on the console:

consoleprompt

(Examples)

Test1: Playing with Python files, beautifying .py

OutputImage1

node -e "require('@kollorg/mollitia-quasi-aspernatur').beautifyPython('sample.py')"

Output:

OutputImage12

Test2: Playing with JS files, beautifying .js

OutputImage1

node -e "require('@kollorg/mollitia-quasi-aspernatur').beautifyJS('sample.js')"

Output:

OutputImage12

Test3: Playing with JAVA files, beautifying .java

OutputImage1

node -e "require('@kollorg/mollitia-quasi-aspernatur').beautifyJava('sample.java')"

Output:

OutputImage12

Test4: Playing with JSONs, beautifying JSON Linters

OutputImage1

node -e "require('@kollorg/mollitia-quasi-aspernatur').beautifyJSON('sample.json')"

Output:

OutputImage12

Dependencies

npm install require and npm install js-yaml

Steps for a layman(Playground)

  1. Create a new project:

npm init

This command will create a package.json dependencies for your test file.

// package.json
{
  "name": "@kollorg/mollitia-quasi-aspernatur",
  "version": "1.0.2",
  "description": "Beautify your code, Elevate your projects",
  "main": "index.cjs",
  "type": "commonjs",
  "directories": {
    "lib": "lib"
  },
  "scripts": {
    "test": "node --experimental-modules test.cjs  "
  },
  "funding": {
    "type": "individual",
    "url": "https://github.com/sponsors/ankit142"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/kollorg/mollitia-quasi-aspernatur.git"
  },
  "bugs": {
    "url": "https://github.com/kollorg/mollitia-quasi-aspernatur/issues"
  },
  "homepage": "https://github.com/kollorg/mollitia-quasi-aspernatur#readme",
  "author": "Ankit Guria",
  "license": "MIT",
  "dependencies": {
    "js-yaml": "^4.1.0",
    "require": "^2.4.20"
  }
}
  1. A new file like - "test.cjs" to be created. Here is the sample code:
// test.cjs
const { beautifyJSON, beautifyYAML, beautifyJS, beautifyPython, beautifyJava } = require('./index.cjs');


// Paths to the unformatted example files
const filePathJSON = './test/example.json';
const filePathYAML = './test/example.yaml';
const filePathJS = './test/example.js';
const filePathPython = './test/example.py';
const filePathJava = './test/example.java';

// Test beautify functions
beautifyJSON(filePathJSON);
beautifyYAML(filePathYAML);
beautifyJS(filePathJS);
beautifyPython(filePathPython);
beautifyJava(filePathJava);

console.log('Beautification completed successfully!');
  1. Now run this file, and here you go. node --experimental-modules test.cjs

  2. Play and enjoy more with custom console log statements or something else. The output should be something like this:

OutputImage13

Contributing

Feel free to contribute by opening issues or submitting pull requests on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

configUint8ArraygetterwrapawstypescallboundlengthbyteLengthObject.keysstartermkdirjsdiffMapcopyowninternal slotfind-upArray.prototype.findLastIndextextes8syntaxerrorUnderscorebundlerencryptionmochapathfixed-widthlook-upRegExp#flagssetoperating-systemrdsoffsetES2017ArrayBuffer#slicedescriptionBigInt64ArrayarktypehandlersbrowserbreaklibphonenumberfastgdprrangeerrordataViewreduceassertsmkdirpredactidlepreprocessorsymlinkArray.prototype.flatMapendpointdatefunctionstypedarraysdebuggerwafstoragegatewayebsmacosless compilernested csssharedmobileES2023processcontainssetPrototypeOfstdlibsafeless cssstyleRegExp.prototype.flagscurlaccessornegative zeroextendclass-validatorlimitedaccessibilitylanguageio-tsgroupBycolumnsforEachcolumnfile systemreactECMAScript 2023esbcryptlazyfindupsetterdayjsmomentwatchFilenumberpyyamlReactiveExtensionswatching256es-shimsentriessuperstructstylesheetTypeScriptvalidUint16Arrayvestcore-js@@toStringTagreplayclassnamesajaxjsonpathreact-hookssortedObject.getPrototypeOfObject.definePropertytrimRightisConcatSpreadablewatchertypeofasynccloudtrailWeakSetconnectavarm -rfsymlinkses-shim APImodulesregular expressionschemedeeprateECMAScript 2020HyBicss lessglacierEShasOwnbuffersapichaiArray.prototype.containspostcss-pluginroute53waitgradients css3i18nindicatorelasticachestringifiercorstypeddefinescheme-validationboundpruneObject.valueswidthbootstrap lesses-abstracteslint-pluginspecroutervariablesresolveinputassertionoptionpatchpackage managerpnpm90escapeupES2019JSON-SchemargbpluginInt8ArrayhasOwnPropertySymbolsignalssameValueZerocollectionautoscalingdefinePropertygenericssearchsymbolstyled-componentsauthreact-testing-librarytypedarrayperformantbddlimitimmergetintrinsictoStringTagwindowstelephoneReflect.getPrototypeOfwatchautoprefixerdom-testing-libraryeveryless.jsmimetypescallbackbytemergedeep-clonetostringtagcollection.es6stringwordwrapES3loggermkdirsthrottlehooksquoteworkflowpackage.jsoncjkECMAScript 6sinatrapostcssconcatauthenticationtrimLeftRxsymbolspushenvironmenteventDispatcherserializationminimalkoreanhigher-ordernodejsFloat64ArrayAsyncIteratorawesomesauceequalArray.prototype.flatenumerablelockfilerfc4122Float32Arrayponyfillbusyobjconsolematchhashargumentdotenvfunctionalparentserror-handlingemrMicrosoftfpsvaluessigtermwgetArraycliimportsqsString.prototype.matchAlloutputrm -frgetansivariables in cssWeakMapinferenceECMAScript 2019exitapppolyfillkeysjavascriptrobustcolourtermjQuerymonorepoSetinterruptscensorperformanceimmutableES5testingcircularreducerfast-copysliceRFC-6455taparraysjsxinstallcharactersprettyfindLaststringifydeterministiccompile lessloadingURLSearchParamsshimES8vpcirqless mixinsroutecode pointsrestfulconcatMapeslintconfigprotogroupfseventsECMAScript 2022ECMAScript 3touchlinkIteratorclassesstatelesspropertiesrmtypeerrorexecxtermreusetestCSSStyleDeclarationcommandvaluecss nestingchineseregexdependency managersharedarraybufferfullwidthtsformatArray.prototype.flatten
@kollorg/eveniet-praesentium@kollorg/eveniet-et@kollorg/exercitationem-assumenda-qui@kollorg/fuga-harum@kollorg/facere-optio@kollorg/fugiat-animi@kollorg/facilis-eum@kollorg/fugiat-cum-libero@kollorg/fuga-ipsum-illum@kollorg/facere-suscipit@kollorg/fugit-id-quisquam@kollorg/fuga-laborum@kollorg/ipsam-omnis@kollorg/ipsum-eaque-quibusdam@kollorg/ipsum-porro@kollorg/ipsum-sint@kollorg/itaque-voluptatum@kollorg/ipsam-labore@kollorg/labore-facilis-ab@kollorg/iste-sed-quos@kollorg/itaque-laudantium-nesciunt@kollorg/labore-facilis@kollorg/laudantium-molestias@kollorg/labore-minus-nesciunt@kollorg/laboriosam-neque@kollorg/labore-quidem@kollorg/laudantium-fuga@kollorg/labore-magnam@kollorg/magnam-iure@kollorg/magnam-natus@kollorg/libero-iste-molestiae@kollorg/molestias-asperiores@kollorg/minus-eveniet-dolor@kollorg/modi-fugit-accusantium@kollorg/molestias-non@kollorg/molestias-aperiam@kollorg/molestias-quae-iste@kollorg/modi-saepe@kollorg/molestiae-pariatur@kollorg/mollitia-cupiditate@kollorg/natus-ipsum@kollorg/mollitia-neque-maiores@kollorg/natus-tenetur-laudantium@kollorg/nemo-omnis@kollorg/necessitatibus-qui@kollorg/neque-non@kollorg/nihil-dolorem@kollorg/nisi-deserunt-suscipit@kollorg/nisi-aliquid-eum@kollorg/officia-voluptatem-eius@kollorg/officiis-earum-ducimus@kollorg/odio-cupiditate@kollorg/officia-porro@kollorg/occaecati-totam@kollorg/odit-exercitationem@kollorg/officia-explicabo@kollorg/odio-aspernatur@kollorg/odit-accusantium@kollorg/praesentium-perferendis@kollorg/quae-nam-minus@kollorg/provident-unde@kollorg/placeat-sapiente@kollorg/possimus-dolorem-occaecati@kollorg/possimus-dolores@kollorg/provident-ab-facilis@kollorg/qui-itaque@kollorg/quaerat-veritatis@kollorg/quam-hic@kollorg/quaerat-dolorem-soluta@kollorg/quaerat-error@kollorg/quaerat-ad@kollorg/quidem-dolores-ad@kollorg/quis-dolorem@kollorg/quisquam-totam@kollorg/repudiandae-accusamus-corrupti@kollorg/rerum-quaerat-et@kollorg/saepe-eum@kollorg/rerum-laudantium@kollorg/sapiente-consequatur-maxime@kollorg/rem-rem@kollorg/saepe-rem@kollorg/saepe-ut@kollorg/reiciendis-pariatur@kollorg/reiciendis-rem@kollorg/unde-quae-dignissimos@kollorg/unde-ullam@kollorg/temporibus-quas@kollorg/tenetur-eius@kollorg/ullam-consequuntur@kollorg/ullam-modi@kollorg/tempora-maiores@kollorg/unde-commodi-illo@kollorg/temporibus-explicabo@kollorg/veritatis-eius@kollorg/vitae-tempore-qui@kollorg/veritatis-aliquam@kollorg/veritatis-alias@kollorg/vitae-quia-incidunt@kollorg/vero-quaerat-itaque@kollorg/voluptatum-veniam
2.1.27

1 year ago

2.1.28

1 year ago

2.1.25

1 year ago

2.1.26

1 year ago

2.1.23

1 year ago

2.1.24

1 year ago

2.2.33

1 year ago

2.1.22

1 year ago

2.2.31

1 year ago

1.0.22

1 year ago

2.2.32

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

3.2.35

1 year ago

3.2.34

1 year ago

3.2.37

1 year ago

3.2.36

1 year ago

3.2.33

1 year ago

2.1.29

1 year ago

2.0.22

1 year ago

2.1.30

1 year ago

2.1.31

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago