{"id":21358317,"url":"https://github.com/bowheart/sheath-core","last_synced_at":"2025-06-18T22:36:33.756Z","repository":{"id":91226834,"uuid":"68464510","full_name":"bowheart/sheath-core","owner":"bowheart","description":"The Module Library","archived":false,"fork":false,"pushed_at":"2017-05-07T13:56:38.000Z","size":117,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T18:34:02.288Z","etag":null,"topics":["async","dependency-injection","module-loader","modules"],"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/bowheart.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":"2016-09-17T16:39:48.000Z","updated_at":"2017-04-14T20:11:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"90cdc69b-4943-45bf-8315-afa62b4dbcaa","html_url":"https://github.com/bowheart/sheath-core","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/bowheart%2Fsheath-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowheart%2Fsheath-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowheart%2Fsheath-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowheart%2Fsheath-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bowheart","download_url":"https://codeload.github.com/bowheart/sheath-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830955,"owners_count":20354856,"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":["async","dependency-injection","module-loader","modules"],"created_at":"2024-11-22T05:15:36.691Z","updated_at":"2025-03-16T06:16:52.254Z","avatar_url":"https://github.com/bowheart.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build status](https://travis-ci.org/bowheart/sheath-core.svg?branch=master)](https://travis-ci.org/bowheart/sheath-core)\n[![Test Coverage](https://codeclimate.com/github/bowheart/sheath-core/badges/coverage.svg)](https://codeclimate.com/github/bowheart/sheath-core/coverage)\n[![Issue Count](https://img.shields.io/codeclimate/issues/github/bowheart/sheath-core.svg)](https://codeclimate.com/github/bowheart/sheath-core/issues)\n[![Code Climate](https://codeclimate.com/github/bowheart/sheath-core/badges/gpa.svg)](https://codeclimate.com/github/bowheart/sheath-core)\n\n# Sheath\n\nSheath is a utility library for modular applications. It's *the* module library.\n\nCheck out Sheath's coolness list:\n\n- A clean, overly simplistic interface for creating modules.\n- Dependency injection.\n- Asynchronous script loading.\n- Utilities for easily creating common types of modules.\n- Designed to improve the flow of frameworks such as Backbone, React, Inferno, and Mithril.\n- Awesome debugging tools, including opt-in circular dependency detection.\n- Even awesomer dependency graph analysis tools available server-side for easy automation.\n- Highly optimized code. Most of Sheath's algorithms are simple lookups \u0026ndash; O(1) time.\n\n## A simple example\n\n\u003e Note: All examples will use es6 syntax. You've been warned.\n\nLet's create a module.\n\n```javascript\nsheath('dagger', () =\u003e 'a dagger')\n```\n\nSimple as that. Let's break down what happened here:\n\n- We *declared* a module named 'dagger'.\n- Sheath called our arrow function. This function is our module's *factory*. The factory *defined* our module.\n- We exposed the string `'a dagger'` as our module's *default export*. Our module's exports are what will get injected into dependents.\n\nAlright. Cool, I guess. Now what was the point of that?\n\nLet's create another module:\n\n```javascript\nsheath('assassin', ['dagger'], dagger =\u003e\n    'A deadly assassin. Weapon: ' + dagger\n)\n```\n\nLet's break this one down:\n\n- We declared a module named 'assassin' with one dependency, 'dagger'.\n- Sheath ensured that the dagger module was loaded before:\n- Sheath called the assassin module's factory, passing (\"injecting\") the dagger module's default export as the first argument. This defined the assassin module.\n- We exposed a new string as the default export of the assassin module.\n\nEvery module goes through this basic life cycle.\n\n## To Be Continued...\n\nThat's really all you need to get started! Take a look at the [github wiki](https://github.com/bowheart/sheath-core/wiki) for a more in-depth rundown and the full API documentation.\n\n## Bugs, Pull Requests, Feedback, Just Everything\n\nBugs can be reported at the [github issues page](https://github.com/bowheart/sheath-core/issues). All suggestions and feedback are so super welcome. Also feel free to fork and pull request \u0026ndash; just make sure the tests pass (`npm test`) and try to keep the tests at ~100% coverage. Happy coding!\n\n## License\n\nThe [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowheart%2Fsheath-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbowheart%2Fsheath-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowheart%2Fsheath-core/lists"}