{"id":23377962,"url":"https://github.com/beyondjs/code","last_synced_at":"2026-01-05T14:35:28.128Z","repository":{"id":256812566,"uuid":"856488291","full_name":"beyondjs/code","owner":"beyondjs","description":"A lightweight JavaScript utility library for code manipulation. Provides simple functions to create file headers and wrap code in scoped Immediately Invoked Function Expressions (IIFEs). Ideal for projects requiring code generation or transformation.","archived":false,"fork":false,"pushed_at":"2024-09-13T23:05:52.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-16T09:09:10.390Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beyondjs.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":"2024-09-12T16:55:12.000Z","updated_at":"2024-09-13T23:05:40.000Z","dependencies_parsed_at":"2024-09-13T06:48:00.256Z","dependency_job_id":"8738b5ab-9952-4e37-b1c5-26975e20685e","html_url":"https://github.com/beyondjs/code","commit_stats":null,"previous_names":["beyondjs/code"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondjs","download_url":"https://codeload.github.com/beyondjs/code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230755877,"owners_count":18275735,"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-12-21T18:33:37.230Z","updated_at":"2026-01-05T14:35:28.068Z","avatar_url":"https://github.com/beyondjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @beyond-js/code\n\nSimple utility functions for code manipulation.\n\n## Installation\n\n```bash\nnpm install @beyond-js/code\n```\n\n## Usage\n\n```javascript\nconst { header, scoped } = require('@beyond-js/code');\n\n// Create a header for a file\nconst fileHeader = header('My JavaScript File');\nconsole.log(fileHeader);\n\n// Wrap code in a scoped IIFE\nconst myCode = `\nconst x = 1;\nconsole.log(x);\n`;\nconst scopedCode = scoped(myCode);\nconsole.log(scopedCode);\n```\n\n## API\n\n-   `header(text: string): string` - Creates a comment header for code files.\n-   `scoped(code: string): string` - Wraps code in a scoped IIFE and adds indentation.\n\n## License\n\nMIT © [[BeyondJS](https://beyondjs.com)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondjs%2Fcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fcode/lists"}