{"id":15732280,"url":"https://github.com/stopsopa/inspc","last_synced_at":"2025-03-31T03:25:40.138Z","repository":{"id":57294841,"uuid":"163352108","full_name":"stopsopa/inspc","owner":"stopsopa","description":"🔬Improved console.log for node.js","archived":false,"fork":false,"pushed_at":"2023-09-01T23:20:02.000Z","size":28,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-08T22:45:28.611Z","etag":null,"topics":[],"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/stopsopa.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-28T01:37:56.000Z","updated_at":"2023-09-01T23:20:06.000Z","dependencies_parsed_at":"2024-10-24T23:15:57.848Z","dependency_job_id":"b532377f-2812-4586-b9be-ddf0e4571f71","html_url":"https://github.com/stopsopa/inspc","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Finspc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Finspc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Finspc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Finspc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stopsopa","download_url":"https://codeload.github.com/stopsopa/inspc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246409745,"owners_count":20772544,"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-04T00:08:50.713Z","updated_at":"2025-03-31T03:25:40.118Z","avatar_url":"https://github.com/stopsopa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/inspc.svg)](https://badge.fury.io/js/inspc)\n[![NpmLicense](https://img.shields.io/npm/l/inspc.svg)](https://github.com/stopsopa/inspc/blob/master/LICENSE)\n\n# DEPRECATED\nCreated in 2018 - quite old now and not maintained\n\n\nlogi\n---\n\nThis function use native [util.inspect](https://nodejs.org/api/util.html#util_util_inspect_object_options)\n\nNode.js mode with browser fallback to **logw**\n\n    const log = require('inspc/logi');\n    \n    log.colors(true);\n    \n    log({data: 'string', fn: () =\u003e {}});\n    log({data: 'string', fn: () =\u003e {}}, 2, false); // def: 2, false\n    \nlog.dump\n---\n\nIn many cases faster implementation\n\nNode.js mode with browser fallback to **logw**\n\n    const log = require('inspc/logn');\n    // const logn = require('inspc/logn').dump;\n    \n    log.dump({data: 'string', fn: () =\u003e {}})    \n    log.dump({data: 'string', fn: () =\u003e {}}, 2) // def: 2   \n    \nlogt\n---\n\nJust fallback to console.log but with timestamp\n\n    const logt = require('inspc/logt');\n    \nor:\n    \n    const log = require('inspc');\n    \n    cosnt logt = log.t;\n    \nlogw\n---\n\nJust always safe version of console.log with no timestamp \n\n    const logw = require('inspc/logw');  \n    \n# grabbing output to string variable\n\n```javascript\n\nlog.start();\n\nlog.dump('test1');\n\nlog('test2');\n\n// true or false to additionally flush data to screen after return (def false)\nconst tmp = log.get(true);\n```    \n    \nrequire all\n---\n\n    \n    const log = require('inspc');\n    \n    const data = {\n        one: 'two',\n        three: true,\n        four: () =\u003e {},\n        a: ['str', null, undefined, 2, 'end', {obj:'val'}]\n    };\n    \n    data.z = {raz: {dwa: {trzy: {cztery:  'piec'}}}};\n    log.dump(data, 3)\n    log.i(data, 3)\n    log.json(data)\n    log.i(data, 1, true) // colors on\n    \nwill print:\n\n![image](https://user-images.githubusercontent.com/3743506/50531636-4ca2f200-0b05-11e9-93ae-9641ed80431d.png)\n    \naddidional tools\n---    \n\n    require('inspc/isObject')\n    require('inspc/isArray')\n    \n    const node = require('inspc/isNode');\n    \n    require('inspc/getUserAgent')\n    \n    const isGoogleChrome = require('inspc/isGoogleChrome')\n    \n    const userAgent = (function () {try {return staticContext.req.headers['user-agent']}catch(e){}}());\n    \n    isGoogleChrome(userAgent) \n    \n# extra\n\nThere is additional synchronouse method *process._rawDebug* that print directly to terminal\n\n\n    \n         \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstopsopa%2Finspc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstopsopa%2Finspc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstopsopa%2Finspc/lists"}