{"id":41054986,"url":"https://github.com/typescript-package/wrapper","last_synced_at":"2026-01-22T11:35:40.525Z","repository":{"id":271848666,"uuid":"896398880","full_name":"typescript-package/wrapper","owner":"typescript-package","description":"A lightweight TypeScript library to wrap the text with the opening and closing chars.","archived":false,"fork":false,"pushed_at":"2025-01-10T10:37:03.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T20:44:20.687Z","etag":null,"topics":["text","wrap","wrapper"],"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/typescript-package.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["angular-package"],"patreon":"angularpackage","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-11-30T08:58:11.000Z","updated_at":"2025-01-10T09:34:20.000Z","dependencies_parsed_at":"2025-01-10T09:48:55.258Z","dependency_job_id":"26acfae1-8b3e-4a9d-a070-6e0a57907055","html_url":"https://github.com/typescript-package/wrapper","commit_stats":null,"previous_names":["typescript-package/wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/typescript-package/wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescript-package%2Fwrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescript-package%2Fwrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescript-package%2Fwrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescript-package%2Fwrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typescript-package","download_url":"https://codeload.github.com/typescript-package/wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescript-package%2Fwrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["text","wrap","wrapper"],"created_at":"2026-01-22T11:35:39.861Z","updated_at":"2026-01-22T11:35:40.521Z","avatar_url":"https://github.com/typescript-package.png","language":"TypeScript","funding_links":["https://github.com/sponsors/angular-package","https://patreon.com/angularpackage"],"categories":[],"sub_categories":[],"readme":"\n\u003ca href=\"https://www.typescriptlang.org/\"\u003e\n  \u003cimg\n    src=\"https://raw.githubusercontent.com/typescript-package/core/refs/heads/main/ts-package-barcode-logo-512.png\"\n    width=\"20%\"\n    title=\"@typescript-package/wrapper\"\n  /\u003e\n\u003c/a\u003e\n\n## typescript-package/wrapper\n\nA lightweight TypeScript library to wrap the text with the opening and closing chars.\n\n\u003c!-- npm badge --\u003e\n[![npm version][typescript-package-npm-badge-svg]][typescript-package-npm-badge]\n[![GitHub issues][typescript-package-badge-issues]][typescript-package-issues]\n[![GitHub license][typescript-package-badge-license]][typescript-package-license]\n\n\u003cbr\u003e\n\n## Table of contents\n\n* [Installation](#installation)\n* [Api](#api)\n* [Git](#git)\n  * [Commit](#commit)\n  * [Versioning](#versioning)\n* [License](#license)\n\n## Installation\n\n```bash\nnpm install @typescript-package/wrapper\n```\n\n## Api\n\n```typescript\nimport {\n   // Object.\n   Wrap,\n   Wrapper,\n   // Type\n   Wrapped\n} from '@typescript-package/wrapper';\n```\n\n### `Wrap`\n\n```typescript\nimport { Wrap } from \"@typescript-package/wrapper\";\n\n// Initialize.\nconst htmlTag = new Wrap('\u003c', '\u003e', 'div');\n\n// The `Wrap` object.\nconsole.log(htmlTag); // Output: Wrap {'\u003cdiv\u003e', #closing: '\u003e', #opening: '\u003c', #text: 'div'}\n\nconsole.log(htmlTag.valueOf()); // Output: \u003cdiv\u003e\n\n// Initialize.\nconst bbCode = new Wrap('[', ']', 'quote');\n\nconsole.log(bbCode); // Output: Wrap {'[quote]', #closing: ']', #opening: '[', #text: 'quote'}\n\nconsole.log(bbCode.valueOf()); // Output: [quote]\n```\n\n### `Wrapper`\n\n```typescript\nimport { Wrapper } from \"@typescript-package/wrapper\";\n\n// Initialize.\nconst htmlTag = new Wrapper(\n  '\u003c',\n  '\u003e',\n  'div'\n);\n\n// The `Wrap` object.\nconsole.log(htmlTag); // Output: Wrapper {'\u003cdiv\u003e', #closing: '\u003e', #opening: '\u003c', #text: 'div'}\n\nconsole.log(htmlTag.valueOf()); // Output: \u003cdiv\u003e\n\n// Initialize.\nconst bbCode = new Wrapper('[', ']', 'quote');\n\nconsole.log(bbCode); // Output: Wrapper {'[quote]', #closing: ']', #opening: '[', #text: 'quote'}\n\n// Wrap the valueOf [quote]\nconsole.log(bbCode.wrap()); // Output: [[quote]]\n\n// Wrap the valueOf [quote] with the specified `opening` and `closing` chars.\nconsole.log(bbCode.wrap(`(`, `)`)); // Output: ([quote])\n\n// Wrap the specified text with the `opening` and `closing` chars.\nconsole.log(bbCode.wrapOn(`/italic`)); // Output: [/italic]\n\n// Replace the `opening` and `closing` chars.\nconsole.log(bbCode.rewrap(`(`, `)`)); // Output: (quote)\n\n// Wraps the `text` inside.\nconsole.log(bbCode.wrapText(`(`, `)`)); // Output: [(quote)]\n\n// Returns the primitive value.\nconsole.log(bbCode.valueOf()); // Output: [quote]\n```\n\n## GIT\n\n### Commit\n\n* [AngularJS Git Commit Message Conventions][git-commit-angular]\n* [Karma Git Commit Msg][git-commit-karma]\n* [Conventional Commits][git-commit-conventional]\n\n### Versioning\n\n[Semantic Versioning 2.0.0][git-semver]\n\n**Given a version number MAJOR.MINOR.PATCH, increment the:**\n\n* MAJOR version when you make incompatible API changes,\n* MINOR version when you add functionality in a backwards-compatible manner, and\n* PATCH version when you make backwards-compatible bug fixes.\n\nAdditional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.\n\n**FAQ**\nHow should I deal with revisions in the 0.y.z initial development phase?\n\n\u003e The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.\n\nHow do I know when to release 1.0.0?\n\n\u003e If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.\n\n## License\n\nMIT © typescript-package ([license][typescript-package-license])\n\n\u003c!-- This package: typescript-package  --\u003e\n  \u003c!-- GitHub: badges --\u003e\n  [typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/wrapper\n  [isscript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/wrapper\n  [typescript-package-badge-stars]: https://img.shields.io/github/stars/typescript-package/wrapper\n  [typescript-package-badge-license]: https://img.shields.io/github/license/typescript-package/wrapper\n  \u003c!-- GitHub: badges links --\u003e\n  [typescript-package-issues]: https://github.com/typescript-package/wrapper/issues\n  [typescript-package-forks]: https://github.com/typescript-package/wrapper/network\n  [typescript-package-license]: https://github.com/typescript-package/wrapper/blob/master/LICENSE\n  [typescript-package-stars]: https://github.com/typescript-package/wrapper/stargazers\n\u003c!-- This package --\u003e\n\n\u003c!-- Package: typescript-package --\u003e\n  \u003c!-- npm --\u003e\n  [typescript-package-npm-badge-svg]: https://badge.fury.io/js/@typescript-package%2Fwrapper.svg\n  [typescript-package-npm-badge]: https://badge.fury.io/js/@typescript-package%2Fwrapper\n\n\u003c!-- GIT --\u003e\n[git-semver]: http://semver.org/\n\n\u003c!-- GIT: commit --\u003e\n[git-commit-angular]: https://gist.github.com/stephenparish/9941e89d80e2bc58a153\n[git-commit-karma]: http://karma-runner.github.io/0.10/dev/git-commit-msg.html\n[git-commit-conventional]: https://www.conventionalcommits.org/en/v1.0.0/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescript-package%2Fwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypescript-package%2Fwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescript-package%2Fwrapper/lists"}