{"id":13619793,"url":"https://github.com/restuwahyu13/kraken-browser","last_synced_at":"2025-04-19T15:32:31.227Z","repository":{"id":37965065,"uuid":"397641979","full_name":"restuwahyu13/kraken-browser","owner":"restuwahyu13","description":"Dependency injection to register module to global access, you can load each given module from kraken config","archived":false,"fork":false,"pushed_at":"2023-02-27T13:04:32.000Z","size":1051,"stargazers_count":4,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T19:44:41.284Z","etag":null,"topics":["browser","dependencies","dependency-injection","global","global-module","javascript","kibrow","kraken-browser","node","node-package","npm","npm-package","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/restuwahyu13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-08-18T15:04:04.000Z","updated_at":"2023-04-04T04:44:51.000Z","dependencies_parsed_at":"2023-09-27T03:37:54.583Z","dependency_job_id":null,"html_url":"https://github.com/restuwahyu13/kraken-browser","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":0.4651162790697675,"last_synced_commit":"147e0e29477a3fdac92f59766a0346cddb35e32b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restuwahyu13","download_url":"https://codeload.github.com/restuwahyu13/kraken-browser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249510341,"owners_count":21283702,"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":["browser","dependencies","dependency-injection","global","global-module","javascript","kibrow","kraken-browser","node","node-package","npm","npm-package","typescript"],"created_at":"2024-08-01T21:00:48.814Z","updated_at":"2025-04-19T15:32:30.916Z","avatar_url":"https://github.com/restuwahyu13.png","language":"TypeScript","funding_links":[],"categories":["K"],"sub_categories":[],"readme":"# Kraken Browser\n\n[![codebeat badge](https://codebeat.co/badges/7f508275-ae9e-44a8-b9c7-8e036e0f5b27)](https://codebeat.co/projects/github-com-restuwahyu13-kraken-browser-main) [![CodeFactor](https://www.codefactor.io/repository/github/restuwahyu13/kraken-browser/badge?s=764996c37a16eaf4c8c9997f166d2a76005cf811)](https://www.codefactor.io/repository/github/restuwahyu13/kraken-browser) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/14d5b6f262cb4e78a553f164f3cdf3eb)](https://www.codacy.com/gh/restuwahyu13/kraken-browser/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=restuwahyu13/kraken-browser\u0026amp;utm_campaign=Badge_Grade) ![node-current](https://img.shields.io/node/v/kibrow?style=flat-square) ![npm](https://img.shields.io/npm/dm/kibrow) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/restuwahyu13/kraken-browser/blob/main/CONTRIBUTING.md)\n\n**kibrow** is dependency injection to register module to global access, without the need to load module using `require` or `import` again in every file, then module can be accessed as a global with very easy and then only register modules to kraken config, which you often the most used in each every file, example module like `axios`, `lodash`, `moment` etc, for nodejs version check this [kinode](https://github.com/restuwahyu13/kraken-node).\n\n- [Kraken Browser](#kraken-browser)\n  - [Installation](#installation)\n  - [Config](#config)\n  - [Example Usage](#example-usage)\n  - [Testing](#testing)\n  - [Bugs](#bugs)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Installation\n\n```bash\n$ npm install kibrow -S or yarn add kibrow -S\n```\n\n## Config\n\n- #### Kraken config property\n\n  - **name** for to calling module in each every file and default value is to undefined\n  - **module** for to register module to global access and default value is to undefined\n  - **inject** for to disabled module to global access, if value is set to false and default value is to true\n\n- #### Example Kraken Config Not With SSR\n\n  ```js\n  import { krakenConfig } from 'kibrow'\n  import axios from 'axios'\n  import _ from 'lodash'\n\n  krakenConfig({\n    packages: [\n      {\n        name: '$axios',\n        module: axios\n      },\n      {\n        name: '$_',\n        module: _\n      }\n    ]\n  })\n  ```\n\n- #### Example Kraken Config With SSR\n\n  ```js\n  import { krakenConfig } from 'kibrow/ssr'\n  import axios from 'axios'\n  import _ from 'lodash'\n\n  krakenConfig({\n    packages: [\n      {\n        name: '$axios',\n        module: axios\n      },\n      {\n        name: '$_',\n        module: _\n      }\n    ]\n  })\n  ```\n\n## Example Usage\n\nBefore usage of this module, if you're using ESLint you have must be added **Overrides ESLint Config**, and also if you're using typescript add `\"noImplicitAny\": false` to tsconfig.json, for more example usage and implementation check folder demo in this repository [here](https://github.com/restuwahyu13/kraken-browser/tree/main/demo).\n\n- ##### Overrides Eslint Config\n\n  ```json\n  \"overrides\": [\n    {\n      \"files\": [\n        \"**/*.js\",\n        \"**/*.jsx\",\n        \"**/*.ts\",\n        \"**/*.tsx\"\n      ],\n      \"rules\": {\n        \"no-restricted-globals\": 0\n      },\n      \"globals\": {\n        \"self\": \"writable\"\n      }\n    }\n  ]\n  ```\n\n- ##### Example Usage Using JavaScript\n\n  ```javascript\n   self.$axios.get('https://jsonplaceholder.typicode.com/users')\n   .then(res =\u003e console.log(res.data))\n   .catch(err =\u003e console.log(err.response.data))\n  ```\n\n- ##### Example Usage Using TypeScript\n\n  ```javascript\n   self['$axios'].get('https://jsonplaceholder.typicode.com/users')\n   .then(res =\u003e console.log(res.data))\n   .catch(err =\u003e console.log(err.response.data))\n  ```\n\n## Testing\n\n- Testing Via Local\n\n  ```sh\n  npm test or make test\n  ```\n\n- Testing Via Local And Build\n\n  ```sh\n  make build\n  ```\n\n- Testing Via Docker\n\n  ```sh\n  docker build -t kraken-browser or make dkb tag=kraken-browser\n  ```\n\n## Bugs\n\nFor information on bugs related to package libraries, please visit [here](https://github.com/restuwahyu13/kraken-browser/issues)\n\n## Contributing\n\nWant to make **kraken-browser** more perfect ? Let's contribute and follow the [contribution guide.](https://github.com/restuwahyu13/kraken-browser/blob/main/CONTRIBUTING.md)\n\n## License\n\n- [MIT License](https://github.com/restuwahyu13/kraken-browser/blob/main/LICENSE.md)\n\n\u003cp align=\"right\" style=\"padding: 5px; border-radius: 100%; background-color: red; font-size: 2rem;\"\u003e\n  \u003cb\u003e\u003ca href=\"#kraken-browser\"\u003eBACK TO TOP\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fkraken-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestuwahyu13%2Fkraken-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fkraken-browser/lists"}