{"id":15634536,"url":"https://github.com/jonschlinkert/pretty","last_synced_at":"2025-05-16T18:08:55.324Z","repository":{"id":11384265,"uuid":"13825105","full_name":"jonschlinkert/pretty","owner":"jonschlinkert","description":"Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.","archived":false,"fork":false,"pushed_at":"2021-03-04T18:05:47.000Z","size":22,"stargazers_count":139,"open_issues_count":7,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T18:14:06.436Z","etag":null,"topics":["beautify","format","formatter","html","indentation","javascript","jonschlinkert","js-beautify","markup","nodejs","prettify","whitespace"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mukeshsoni/react-telephone-input","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-24T07:10:21.000Z","updated_at":"2025-01-16T01:49:45.000Z","dependencies_parsed_at":"2022-09-05T06:01:22.427Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/pretty","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fpretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fpretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fpretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fpretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/pretty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248601059,"owners_count":21131605,"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","jonschlinkert","js-beautify","markup","nodejs","prettify","whitespace"],"created_at":"2024-10-03T10:53:54.568Z","updated_at":"2025-04-12T16:47:21.484Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pretty [![NPM version](https://img.shields.io/npm/v/pretty.svg?style=flat)](https://www.npmjs.com/package/pretty) [![NPM monthly downloads](https://img.shields.io/npm/dm/pretty.svg?style=flat)](https://npmjs.org/package/pretty) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/pretty.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/pretty)\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 pretty\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add pretty\n```\n\n## Usage\n\n```js\nvar pretty = require('pretty');\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### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\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._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fpretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fpretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fpretty/lists"}