{"id":15699017,"url":"https://github.com/pgilad/esformatter-dot-notation","last_synced_at":"2025-05-09T02:17:15.063Z","repository":{"id":20187803,"uuid":"23458891","full_name":"pgilad/esformatter-dot-notation","owner":"pgilad","description":"esformatter plugin for transforming object bracket usage to dot notation","archived":false,"fork":false,"pushed_at":"2015-05-28T13:59:29.000Z","size":191,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-09T02:17:10.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pgilad.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":"2014-08-29T09:12:29.000Z","updated_at":"2016-10-20T20:59:08.000Z","dependencies_parsed_at":"2022-08-02T10:36:59.852Z","dependency_job_id":null,"html_url":"https://github.com/pgilad/esformatter-dot-notation","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fesformatter-dot-notation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fesformatter-dot-notation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fesformatter-dot-notation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fesformatter-dot-notation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgilad","download_url":"https://codeload.github.com/pgilad/esformatter-dot-notation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866143,"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":[],"created_at":"2024-10-03T19:37:26.015Z","updated_at":"2025-05-09T02:17:15.024Z","avatar_url":"https://github.com/pgilad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [esformatter](https://github.com/millermedeiros/esformatter)-dot-notation\n\n\u003e esformatter plugin for transforming object bracket usage to dot notation\n\n[![NPM Version](http://img.shields.io/npm/v/esformatter-dot-notation.svg?style=flat)](https://npmjs.org/package/esformatter-dot-notation)\n[![NPM Downloads](http://img.shields.io/npm/dm/esformatter-dot-notation.svg?style=flat)](https://npmjs.org/package/esformatter-dot-notation)\n[![Build Status](http://img.shields.io/travis/pgilad/esformatter-dot-notation.svg?style=flat)](https://travis-ci.org/pgilad/esformatter-dot-notation)\n\n**esformatter-dot-notation** is a plugin for [esformatter](https://github.com/millermedeiros/esformatter)\nmeant to convert accessing object properties with brackets into dot notation where valid.\n\nThis module uses [unquoted-property-validator](https://github.com/pgilad/unquoted-property-validator) which uses Mathias Bynens\n[implementation](https://github.com/mathiasbynens/mothereff.in/tree/master/js-properties)\nin order to validate if a property name is a valid identifier name and can be used with dot notation.\n\nThat means invalid identifiers will not be converted and your code is safe for transformations (see [tests](tests/compare.spec.js)).\n\nTurn this:\n```js\nsomeObject['property'] = true;\n```\n\ninto:\n```js\nsomeObject.property = true;\n```\n\n## Installation\n\n```sh\n$ npm install esformatter-dot-notation --save-dev\n```\n\n## Config\n\nNewest esformatter versions autoload plugins from your `node_modules` [See this](https://github.com/millermedeiros/esformatter#plugins)\n\nAdd to your esformatter config file:\n\n```json\n{\n  \"plugins\": [\n    \"esformatter-dot-notation\"\n  ]\n}\n```\n\nOr you can manually register your plugin:\n```js\nvar dotNotation = require('esformatter-dot-notation');\n// register plugin\nesformatter.register(dotNotation);\n```\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar esformatter = require('esformatter');\n//register plugin manually\nesformatter.register(require('esformatter-dot-notation'));\n\nvar str = fs.readFileSync('someKewlFile.js').toString();\nvar output = esformatter.format(str);\n//-\u003e output will now contain the formatted string\n```\n\nSee [esformatter](https://github.com/millermedeiros/esformatter) for more options and further usage.\n\n## License\n\nMIT @[Gilad Peleg](http://giladpeleg.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Fesformatter-dot-notation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgilad%2Fesformatter-dot-notation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Fesformatter-dot-notation/lists"}