{"id":18256137,"url":"https://github.com/serapath/exemethod","last_synced_at":"2025-04-08T22:26:54.105Z","repository":{"id":32071773,"uuid":"35643661","full_name":"serapath/exemethod","owner":"serapath","description":"require('exemethod')(); // =\u003e npm | script | globalcli | localcli | required | browserify","archived":false,"fork":false,"pushed_at":"2016-02-20T00:55:37.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T16:16:23.774Z","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/serapath.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":"2015-05-15T00:03:50.000Z","updated_at":"2016-02-20T00:55:38.000Z","dependencies_parsed_at":"2022-09-04T17:31:43.593Z","dependency_job_id":null,"html_url":"https://github.com/serapath/exemethod","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/serapath%2Fexemethod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fexemethod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fexemethod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fexemethod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serapath","download_url":"https://codeload.github.com/serapath/exemethod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247937191,"owners_count":21021212,"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-11-05T10:20:09.623Z","updated_at":"2025-04-08T22:26:54.085Z","avatar_url":"https://github.com/serapath.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# exemethod\nrequire('exemethod')(); // =\u003e npm | script | globalcli | localcli | required | browserify | browser\n\nIt will tell your code how it was executed.\n\n## Usage\n```js\n// [myscript.js]\nfunction customlogger (msg, method) { return method; }\n\nvar exemethod = require('exemethod');\n\nvar method = exemethod(customlogger);\n\nconsole.log(method);\n```\nwill result in:\n* `npm run myscript` =\u003e **npm**\n  * (assumes myscript.js is executed in a [package.json].script)\n* `./myscript.js` =\u003e **script**\n  * (assumes `chmod +x myscript.js`)\n* `npm install myscript -g` + `myscript` =\u003e **globalcli**\n  * (assumes [package.json].bin field)\n* `node usemyscript.js` =\u003e **required**\n  * (assumes something like `require('./myscript.js')` in \"usemyscript.js\")\n* `node ./myscript.js` =\u003e **localcli**\n* `browserify myscript.js \u003e b.js` =\u003e **browserify**\n* `\u003cscript src='b.js'\u003e\u003c/script\u003e` =\u003e **browser**\n  * (assumes you load \"b.js\" in an html page (e.g. via *script tag*))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserapath%2Fexemethod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserapath%2Fexemethod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserapath%2Fexemethod/lists"}