{"id":15499345,"url":"https://github.com/purplecones/log-full","last_synced_at":"2026-04-30T00:31:21.846Z","repository":{"id":57147523,"uuid":"85983410","full_name":"purplecones/log-full","owner":"purplecones","description":"This package will help you to log deeply nested JSON objects.","archived":false,"fork":false,"pushed_at":"2017-03-23T19:50:18.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T15:17:46.563Z","etag":null,"topics":["console","json","logging","output","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purplecones.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-23T18:20:35.000Z","updated_at":"2022-02-06T16:27:20.000Z","dependencies_parsed_at":"2022-09-06T15:01:33.902Z","dependency_job_id":null,"html_url":"https://github.com/purplecones/log-full","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purplecones%2Flog-full","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purplecones%2Flog-full/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purplecones%2Flog-full/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purplecones%2Flog-full/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purplecones","download_url":"https://codeload.github.com/purplecones/log-full/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246068302,"owners_count":20718505,"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":["console","json","logging","output","utility"],"created_at":"2024-10-02T08:51:58.906Z","updated_at":"2026-04-30T00:31:16.823Z","avatar_url":"https://github.com/purplecones.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Occasionally I find myself needing to log out deeply nested objects to the console. Sadly, the default logger, `console.log()` does not expand the entire object if it has many levels of depth.\n\nThis package will help you to log objects down to any number of levels.\n\n![`log-full` package outputting deeply nested JSON object](log-full-output.png)\n\n# Installation\nAdd package to your project\n\n`yarn add log-full`\n\nImport the package in your code. Preferably at the beginning of your app.\n\n`require('log-full');`\n\n_Note:_ There is no assignment. The package extends console and adds a `console.logFull()` function.\n\n# Usage\n```javascript\nrequire('log-full');\n\nconst deepObject = {\n   \"results\" : [\n      {\n         \"address_components\" : [\n            {\n               \"long_name\" : \"1600\",\n               \"short_name\" : \"1600\",\n               \"types\" : [ \"street_number\" ]\n            },\n            {\n               \"long_name\" : \"Amphitheatre Pkwy\",\n               \"short_name\" : \"Amphitheatre Pkwy\",\n               \"types\" : [ \"route\" ]\n            },\n            {\n               \"long_name\" : \"Mountain View\",\n               \"short_name\" : \"Mountain View\",\n               \"types\" : [ \"locality\", \"political\" ]\n            },\n            {\n               \"long_name\" : \"Santa Clara County\",\n               \"short_name\" : \"Santa Clara County\",\n               \"types\" : [ \"administrative_area_level_2\", \"political\" ]\n            },\n            {\n               \"long_name\" : \"California\",\n               \"short_name\" : \"CA\",\n               \"types\" : [ \"administrative_area_level_1\", \"political\" ]\n            },\n            {\n               \"long_name\" : \"United States\",\n               \"short_name\" : \"US\",\n               \"types\" : [ \"country\", \"political\" ]\n            },\n            {\n               \"long_name\" : \"94043\",\n               \"short_name\" : \"94043\",\n               \"types\" : [ \"postal_code\" ]\n            }\n         ],\n         \"formatted_address\" : \"1600 Amphitheatre Parkway, Mountain View, CA 94043, USA\",\n         \"geometry\" : {\n            \"location\" : {\n               \"lat\" : 37.4224764,\n               \"lng\" : -122.0842499\n            },\n            \"location_type\" : \"ROOFTOP\",\n            \"viewport\" : {\n               \"northeast\" : {\n                  \"lat\" : 37.4238253802915,\n                  \"lng\" : -122.0829009197085\n               },\n               \"southwest\" : {\n                  \"lat\" : 37.4211274197085,\n                  \"lng\" : -122.0855988802915\n               }\n            }\n         },\n         \"place_id\" : \"ChIJ2eUgeAK6j4ARbn5u_wAGqWA\",\n         \"types\" : [ \"street_address\" ]\n      }\n   ],\n   \"status\" : \"OK\"\n};\n\nconsole.log(deepObject);\n/*\n{ results:\n   [ { address_components: [Object],\n       formatted_address: '1600 Amphitheatre Parkway, Mountain View, CA 94043, USA',\n       geometry: [Object],\n       place_id: 'ChIJ2eUgeAK6j4ARbn5u_wAGqWA',\n       types: [Object] } ],\n  status: 'OK' }\n*/\n\nconsole.logFull(deepObject);\n/*\n{ results:\n   [ { address_components:\n        [ { long_name: '1600',\n            short_name: '1600',\n            types: [ 'street_number' ] },\n          { long_name: 'Amphitheatre Pkwy',\n            short_name: 'Amphitheatre Pkwy',\n            types: [ 'route' ] },\n          { long_name: 'Mountain View',\n            short_name: 'Mountain View',\n            types: [ 'locality', 'political' ] },\n          { long_name: 'Santa Clara County',\n            short_name: 'Santa Clara County',\n            types: [ 'administrative_area_level_2', 'political' ] },\n          { long_name: 'California',\n            short_name: 'CA',\n            types: [ 'administrative_area_level_1', 'political' ] },\n          { long_name: 'United States',\n            short_name: 'US',\n            types: [ 'country', 'political' ] },\n          { long_name: '94043',\n            short_name: '94043',\n            types: [ 'postal_code' ] } ],\n       formatted_address: '1600 Amphitheatre Parkway, Mountain View, CA 94043, USA',\n       geometry:\n        { location: { lat: 37.4224764, lng: -122.0842499 },\n          location_type: 'ROOFTOP',\n          viewport:\n           { northeast: { lat: 37.4238253802915, lng: -122.0829009197085 },\n             southwest: { lat: 37.4211274197085, lng: -122.0855988802915 } } },\n       place_id: 'ChIJ2eUgeAK6j4ARbn5u_wAGqWA',\n       types: [ 'street_address' ] } ],\n  status: 'OK' }\n*/\n```\n\n# Options\n\nAn option object can be passed as a second parameter. List of available options follow the `util.inspect()` function from https://nodejs.org/api/util.html#util_util_inspect_object_options\n\n```javascript\nconsole.logFull(deepObject, { depth: 3 });\n```\n\nThe default options set by the package are:\n\n```javascript\n{\n  depth: null, // recurse indefinitely\n  colors: true, // colorize output by types\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurplecones%2Flog-full","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurplecones%2Flog-full","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurplecones%2Flog-full/lists"}