{"id":21502366,"url":"https://github.com/night-codes/libe","last_synced_at":"2025-06-11T16:06:13.477Z","repository":{"id":34951331,"uuid":"39026365","full_name":"night-codes/libe","owner":"night-codes","description":"Small solution for easy node libs inclusions","archived":false,"fork":false,"pushed_at":"2015-07-13T17:47:03.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T13:46:50.103Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/night-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-13T17:17:20.000Z","updated_at":"2022-08-01T09:05:49.000Z","dependencies_parsed_at":"2022-09-15T22:31:28.959Z","dependency_job_id":null,"html_url":"https://github.com/night-codes/libe","commit_stats":null,"previous_names":["mirrr/libe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/night-codes/libe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Flibe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Flibe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Flibe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Flibe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/night-codes","download_url":"https://codeload.github.com/night-codes/libe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Flibe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259293098,"owners_count":22835539,"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-23T18:14:39.546Z","updated_at":"2025-06-11T16:06:13.455Z","avatar_url":"https://github.com/night-codes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Libe](http://msrv.su/files/libe.png)](https://github.com/mirrr/libe) \n\nSmall solution for easy node libs inclusions\n    \n    \n## How To Install   \n```bash\nnpm install libe --save\n```\n    \n    \n## Getting Started\nPut your files into the directory /lib and they will be available everywhere:\n\n```js\nvar through = lib('through');    \nvar duplexer = lib('duplexer');    \nvar myModule = lib('myModule');\n```\n    \n    \n## Example\n\n**index.js:**    \n```js\nrequire('libe');\n\n// include file `my.js` from /lib\nvar my = lib('my');\n\nmy.func();\n```\n\n**lib/my.js:**    \n```js\n// include file `great.js` from /lib\nvar great = lib('great');\n\nexports.func = great.func;\n```\n\n**lib/great.js:**    \n```js\nexports.func = function () {\n    console.log(\"Aloha!\");\n};\n```\n    \n\n## What else?\nInitialize your modules! So simple. Just add `exports.init` method to your library. Like this:\n\n\n**lib/my.js:**    \n```js\nvar great = lib('great');\n\nexports.init = function (callback) {\n    console.log('Module `my.js` initialized!');\n    callback();\n}\nexports.func = great.func;\n```\n\n**lib/great.js:**    \n```js\nexports.init = function (callback) {\n    after(['my'], function () {\n        console.log('Module `great.js` initialized after `my.js`!');\n        callback();\n    });\n}\nexports.func = function () {\n    console.log(\"Aloha!\");\n};\n\n```\n\nThen add `libe.init` to your main file:    \n\n**index.js:**    \n```js\nvar libe = require('libe');\nvar my = lib('my');\n\nlibe.init(function () {\n    my.func();\n});\n```\n    \nThat's all!    \n\n## Change directory path\n```js\nvar libe = require('libe');\n\nlibe.setPath('/srv/myProject2/libs');\n```\n\nor:\n\n```js\nvar libe = require('libe');\n\nlibe.init('/srv/myProject2/libs', function () {\n    // ...\n});\n```\n\n## People\n\nAuthor is [Oleksiy Chechel](https://github.com/mirrr)   \n\n[List of all contributors](https://github.com/mirrr/libe/graphs/contributors)   \n\n\n## License\n   \nMIT License   \n   \nCopyright (C) 2014 Oleksiy Chechel (alex.mirrr@gmail.com)   \n   \nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:   \n   \nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.   \n   \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Flibe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnight-codes%2Flibe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Flibe/lists"}