{"id":16317690,"url":"https://github.com/goatandsheep/pretti","last_synced_at":"2025-03-16T14:30:54.345Z","repository":{"id":40564268,"uuid":"338499068","full_name":"goatandsheep/pretti","owner":"goatandsheep","description":"Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.","archived":false,"fork":false,"pushed_at":"2025-02-10T21:32:00.000Z","size":102,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T10:35:22.278Z","etag":null,"topics":["beautify","format","formatter","html","indentation","javascript","js-beautify","markup","nodejs","prettify","whitespace"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goatandsheep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"issuehunt":"goatandsheep/pretti"}},"created_at":"2021-02-13T04:49:13.000Z","updated_at":"2022-10-03T21:30:33.000Z","dependencies_parsed_at":"2024-08-09T13:33:26.406Z","dependency_job_id":"21b634b1-117f-45d3-8b1d-cec7b6a378d5","html_url":"https://github.com/goatandsheep/pretti","commit_stats":{"total_commits":31,"total_committers":9,"mean_commits":"3.4444444444444446","dds":0.6451612903225806,"last_synced_commit":"e9aabd1b45cc53e3b47a542d63c82d2ff229c89a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goatandsheep%2Fpretti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goatandsheep%2Fpretti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goatandsheep%2Fpretti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goatandsheep%2Fpretti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goatandsheep","download_url":"https://codeload.github.com/goatandsheep/pretti/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243882265,"owners_count":20363113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautify","format","formatter","html","indentation","javascript","js-beautify","markup","nodejs","prettify","whitespace"],"created_at":"2024-10-10T22:09:02.298Z","updated_at":"2025-03-16T14:30:53.848Z","avatar_url":"https://github.com/goatandsheep.png","language":"JavaScript","funding_links":["https://issuehunt.io/r/goatandsheep/pretti"],"categories":[],"sub_categories":[],"readme":"# pretti\n\nBased on [pretty ![npm downloads](https://img.shields.io/npm/dt/pretty.svg?style=flat-square)](https://www.npmjs.com/package/pretty)\n\n[![NPM version](https://img.shields.io/npm/v/pretti.svg?style=flat)](https://www.npmjs.com/package/pretti)\n[![codecov](https://codecov.io/gh/goatandsheep/pretti/branch/master/graph/badge.svg?token=tgPNrZoH4k)](https://codecov.io/gh/goatandsheep/pretti)\n[![NPM monthly downloads](https://img.shields.io/npm/dm/pretti.svg?style=flat)](https://npmjs.org/package/pretti)\n[![Known Vulnerabilities](https://snyk.io/test/github/goatandsheep/pretti/badge.svg)](https://snyk.io/test/github/goatandsheep/pretti)\n\n\u003e Some tweaks for beautifying HTML with js-beautify according to my preferences.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save pretti\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add pretti\n```\n\n## Usage\n\n```js\nvar pretty = require('pretti');\n\npretty(STRING_OF_HTML);\n```\n\nBefore\n\n```html\n\u003c!DOCTYPE html\u003e \u003chtml lang=\"en\"\u003e \u003chead\u003e \n\u003cmeta charset=\"UTF-8\"\u003e \u003ctitle\u003eHome\u003c/title\u003e \n\u003c/head\u003e \u003cbody\u003e This is content. \u003c/body\u003e \u003c/html\u003e\n```\n\nAfter\n\n```html\n\u003c!DOCTYPE html\u003e\n  \u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003ctitle\u003eHome\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    This is content.\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Options\n\n### ocd\n\n```js\npretty(STRING_OF_HTML, {ocd: true});\n```\n\n**Type**: `Boolean`\n\n**Default**: `undefined`\n\n* condenses multiple newlines to a single newline\n* trims leading and trailing whitespace\n* ensures that a trailing newline is inserted\n* normalizes whitespace before code comments\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 13, 2017._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoatandsheep%2Fpretti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoatandsheep%2Fpretti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoatandsheep%2Fpretti/lists"}