{"id":13619782,"url":"https://github.com/restuwahyu13/kraken-node","last_synced_at":"2025-05-07T04:41:39.814Z","repository":{"id":38358487,"uuid":"389356766","full_name":"restuwahyu13/kraken-node","owner":"restuwahyu13","description":"Dependency injection to register module to global access, you can load each given module from kraken.config.json","archived":false,"fork":false,"pushed_at":"2023-03-06T12:59:19.000Z","size":461,"stargazers_count":6,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T04:41:36.938Z","etag":null,"topics":["dependency","dependency-injection","global-module","javascript","kinode","kraken","kraken-node","module-loader","node-module","nodejs","npm-module","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,"roadmap":null,"authors":null}},"created_at":"2021-07-25T13:42:54.000Z","updated_at":"2023-08-29T07:49:50.000Z","dependencies_parsed_at":"2024-01-11T13:19:52.347Z","dependency_job_id":null,"html_url":"https://github.com/restuwahyu13/kraken-node","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.25806451612903225","last_synced_commit":"0ac3bcbc683e8567a6259c2c8b54de91464a0de0"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fkraken-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restuwahyu13","download_url":"https://codeload.github.com/restuwahyu13/kraken-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816519,"owners_count":21808702,"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":["dependency","dependency-injection","global-module","javascript","kinode","kraken","kraken-node","module-loader","node-module","nodejs","npm-module","typescript"],"created_at":"2024-08-01T21:00:48.661Z","updated_at":"2025-05-07T04:41:39.785Z","avatar_url":"https://github.com/restuwahyu13.png","language":"TypeScript","funding_links":[],"categories":["K"],"sub_categories":[],"readme":"# Kraken Node\n\n[![Build Status](https://app.travis-ci.com/restuwahyu13/kinode.svg?token=TJCjdtb3tZAkAUnGPRjB\u0026branch=main)](https://app.travis-ci.com/restuwahyu13/kinode) [![Coverage Status](https://coveralls.io/repos/github/restuwahyu13/kraken-node/badge.svg?branch=main)](https://coveralls.io/github/restuwahyu13/kraken-node?branch=main) [![codebeat badge](https://codebeat.co/badges/2a94b9f3-f82c-45c3-9f8e-fb4b13d44812)](https://codebeat.co/projects/github-com-restuwahyu13-kraken-node-main) [![CodeFactor](https://www.codefactor.io/repository/github/restuwahyu13/kraken-node/badge)](https://www.codefactor.io/repository/github/restuwahyu13/kraken-node) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dc11d2a4ebeb447f9fb67fc8d0479dab)](https://www.codacy.com/gh/restuwahyu13/kraken-node/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=restuwahyu13/kraken-node\u0026amp;utm_campaign=Badge_Grade) ![node-current](https://img.shields.io/node/v/kinode?style=flat-square) ![npm](https://img.shields.io/npm/dm/kinode) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/restuwahyu13/kraken-node/blob/main/CONTRIBUTING.md)\n\n**kinode** is dependency injection to register module to global access, you can load each given module from **kraken.config.json**, 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 browser version check this [kibrow](https://github.com/restuwahyu13/kraken-browser).\n\n- [Kraken Node](#kraken-node)\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 kinode -S or yarn add kinode -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.json\n\n  ```json\n  {\n    \"packages\": [\n      {\n        \"name\": \"$axios\",\n        \"module\": \"axios\"\n      },\n      {\n        \"name\": \"$_\",\n        \"module\": \"lodash\"\n      },\n      {\n        \"name\": \"$moment\",\n        \"module\": \"moment\",\n        \"inject\": false\n      }\n    ]\n  }\n  ```\n\n## Example Usage\n\n+ ##### Example Usage Config Outside Directory\n\n  - ##### Example Usage Using CommonJs With JavaScript\n\n    ```javascript\n     require('kinode').config()\n\n     $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    ```javascript\n     require('kinode/config')\n\n     $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 Esm With JavaScript\n\n    ```javascript\n     import { config } from 'kinode'\n     config()\n\n     $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    ```javascript\n     import 'kinode/config'\n\n     $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  - ##### Example Usage With Typescript\n\n    ```typescript\n     import { config } from 'kinode'\n     config()\n\n     global.$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    ```typescript\n     import 'kinode/config'\n\n     global.$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 Config Inside Directory\n\n  - ##### Example Usage Using CommonJs With JavaScript\n\n    ```javascript\n     require('kinode').config({ directory: 'config' })\n\n     $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 Esm With JavaScript\n\n    ```javascript\n     import { config } from 'kinode'\n     config({ directory: 'config' })\n\n     $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  - ##### Example Usage With Typescript\n\n    ```typescript\n     import { config } from 'kinode'\n     config({ directory: 'config' })\n\n     global.$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-node or make dkb tag=kraken-node\n  ```\n\n## Bugs\n\nFor information on bugs related to package libraries, please visit [here](https://github.com/restuwahyu13/kraken-node/issues)\n\n## Contributing\n\nWant to make **kraken-node** more perfect ? Let's contribute and follow the [contribution guide.](https://github.com/restuwahyu13/kraken-node/blob/main/CONTRIBUTING.md)\n\n## License\n\n- [MIT License](https://github.com/restuwahyu13/kraken-node/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-node\"\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-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestuwahyu13%2Fkraken-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fkraken-node/lists"}