{"id":15024668,"url":"https://github.com/anein/angular2-trim-directive","last_synced_at":"2025-08-21T23:32:42.775Z","repository":{"id":65411331,"uuid":"78841806","full_name":"anein/angular2-trim-directive","owner":"anein","description":"the directive trims whitespaces from the end of an input text value.","archived":false,"fork":false,"pushed_at":"2020-09-11T10:27:43.000Z","size":1487,"stargazers_count":46,"open_issues_count":6,"forks_count":26,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-18T22:04:53.892Z","etag":null,"topics":["angular","angularjs","directive-trims-whitespaces","javascript","npm","trim","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/anein.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}},"created_at":"2017-01-13T10:59:45.000Z","updated_at":"2024-11-30T05:19:35.000Z","dependencies_parsed_at":"2023-01-23T00:16:00.916Z","dependency_job_id":null,"html_url":"https://github.com/anein/angular2-trim-directive","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/anein%2Fangular2-trim-directive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anein%2Fangular2-trim-directive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anein%2Fangular2-trim-directive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anein%2Fangular2-trim-directive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anein","download_url":"https://codeload.github.com/anein/angular2-trim-directive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542288,"owners_count":18242332,"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":["angular","angularjs","directive-trims-whitespaces","javascript","npm","trim","typescript"],"created_at":"2024-09-24T20:00:42.924Z","updated_at":"2024-12-20T06:06:03.673Z","avatar_url":"https://github.com/anein.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng2-trim-directive\n[![Build Status](https://travis-ci.org/anein/angular2-trim-directive.svg?branch=master)](https://travis-ci.org/anein/angular2-trim-directive)\n[![npm](https://img.shields.io/npm/v/ng2-trim-directive.svg)](https://www.npmjs.com/package/ng2-trim-directive)\n\n\u003eThe directive trims whitespaces from the end of an input text value.\n\n## Demo\n\nPlay with the directive here [https://anein.github.io/angular2-trim-directive/](https://anein.github.io/angular2-trim-directive/).\n\n## Usage \n\n1. Install `ng2-trim-directive`.\n\n  ```bash\n    npm i ng2-trim-directive\n  ```\n  \n  or using **Yarn**\n  \n  ```bash\n    yarn add ng2-trim-directive\n  ```\n  \n2. Import `InputTrimModule` to your Angular module.\n\n```typescript\nimport { InputTrimModule } from 'ng2-trim-directive';\n@NgModule({\n  imports: [\n    ...\n    InputTrimModule,\n    ...\n  ],\n  ...\n```\n\n3. Add the \"trim\" attribute to a text input or textarea element.\n  ```html\n     \u003cinput type=\"text\" trim /\u003e\n     \u003ctextarea ... trim \u003e\u003c/textarea\u003e\n  ```\n\n   or with an option: trim value only on the blur event.\n\n  ```html\n     \u003cinput type=\"text\" trim=\"blur\" /\u003e\n     \u003ctextarea ... trim=\"blur\" \u003e\u003c/textarea\u003e\n  ```\n  **note**: if you use the directive with \u003ctextarea\u003e without setting the blur event, it will behave like the text input element.\n\n---\nGood luck. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanein%2Fangular2-trim-directive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanein%2Fangular2-trim-directive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanein%2Fangular2-trim-directive/lists"}