├── index.ts ├── src ├── typings.d.ts ├── pipes │ ├── per-number.pipe.ts │ ├── is-per-number.pipe.ts │ ├── safe-per-word.pipe.ts │ ├── per-to-eng-number.pipe.ts │ ├── num-to-per-word.pipe.ts │ ├── is-nationalcode.pipe.ts │ └── is-company-national-id.pipe.ts ├── index.ts └── persian-pipes.module.ts ├── doc ├── README.md ├── PersianPipesModule.md ├── PerNumberPipe.md ├── PerToEngNumberPipe.md └── IsPerNumberPipe.md ├── .editorconfig ├── tsconfig.json ├── .gitignore ├── LICENSE.md ├── package.json ├── tslint.json └── README.md /index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/index'; 2 | -------------------------------------------------------------------------------- /src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | * [`PersianPipesModule`](./PersianPipesModule.md) 4 | * [`PerNumberPipe`](./PerNumberPipe.md) 5 | * [`IsPerNumberPipe`](./IsPerNumberPipe.md) 6 | * [`PerToEngNumberPipe`](./PerToEngNumberPipe.md) 7 | 8 | ## License 9 | 10 | [`MIT`](./LICENSE.md) -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /doc/PersianPipesModule.md: -------------------------------------------------------------------------------- 1 | ## PersianPipesModule 2 | 3 | Import `PersianPipesModule` into your app's modules: 4 | 5 | ``` typescript 6 | import {PersianPipesModule} from 'angular2-persian-pipes' 7 | 8 | @NgModule({ 9 | imports: [ 10 | PersianPipesModule 11 | ] 12 | }) 13 | ``` 14 | 15 | ## License 16 | 17 | [`MIT`](./LICENSE.md) -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "baseUrl": "src", 6 | "sourceMap": true, 7 | "declaration": true, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2016", 17 | "dom" 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /src/pipes/per-number.pipe.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Pipe, PipeTransform } from '@angular/core'; 3 | import { PersianNumberService } from 'angular2-persian-utils' 4 | 5 | @Pipe({ 6 | name: 'perNumber' 7 | }) 8 | export class PerNumberPipe implements PipeTransform { 9 | 10 | constructor(private persianNumberService: PersianNumberService) { } 11 | 12 | transform(inputValue: string): string { 13 | return this.persianNumberService.toPersianNumber(inputValue); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/pipes/is-per-number.pipe.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Pipe, PipeTransform } from '@angular/core'; 3 | import { PersianNumberService } from 'angular2-persian-utils' 4 | 5 | @Pipe({ 6 | name: 'isPerNumber' 7 | }) 8 | export class IsPerNumberPipe implements PipeTransform { 9 | 10 | constructor(private persianNumberService: PersianNumberService) { } 11 | 12 | transform(inputValue: string): boolean { 13 | return this.persianNumberService.isPersianNumber(inputValue); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /doc/PerNumberPipe.md: -------------------------------------------------------------------------------- 1 | ## PerNumberPipe 2 | 3 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and convert to persian digits. 4 | 5 | ##### Example 6 | 7 | ``` typescript 8 | import {PersianPipesModule} from 'angular2-persian-pipes' 9 | 10 | @NgModule({ 11 | imports: [ 12 | PersianPipesModule 13 | ] 14 | }) 15 | ``` 16 | 17 | ```html 18 |

{{'12345679' | perNumber}}

19 | ``` 20 | 21 | ## License 22 | 23 | [`MIT`](./LICENSE.md) -------------------------------------------------------------------------------- /src/pipes/safe-per-word.pipe.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Pipe, PipeTransform } from '@angular/core'; 3 | import { PersianLettersService } from 'angular2-persian-utils' 4 | 5 | @Pipe({ 6 | name: 'safePerWord' 7 | }) 8 | export class SafePerWord implements PipeTransform { 9 | 10 | constructor(private persianLettersService: PersianLettersService) { } 11 | 12 | transform(inputValue: string): string { 13 | return this.persianLettersService.replaceArabicLettersWithPersianLetters(inputValue); 14 | } 15 | } -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { NumToPerWord } from './pipes/num-to-per-word.pipe'; 2 | export { PerToEngNumberPipe } from './pipes/per-to-eng-number.pipe'; 3 | export { IsPerNumberPipe } from './pipes/is-per-number.pipe'; 4 | export { PerNumberPipe } from './pipes/per-number.pipe'; 5 | export { PersianPipesModule } from './persian-pipes.module'; 6 | export { SafePerWord } from './pipes/safe-per-word.pipe'; 7 | export { IsNationalCode } from './pipes/is-nationalcode.pipe'; 8 | export { IsCompanyNationalId } from './pipes/is-company-national-id.pipe'; -------------------------------------------------------------------------------- /src/pipes/per-to-eng-number.pipe.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Pipe, PipeTransform } from '@angular/core'; 3 | import { PersianNumberService } from 'angular2-persian-utils' 4 | 5 | @Pipe({ 6 | name: 'perToEngNumber' 7 | }) 8 | export class PerToEngNumberPipe implements PipeTransform { 9 | 10 | constructor(private persianNumberService: PersianNumberService) { } 11 | 12 | transform(inputValue: string): number { 13 | try { 14 | return this.persianNumberService.toEngNumber(inputValue); 15 | } 16 | catch (e) { 17 | return 0; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/pipes/num-to-per-word.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { PersianNumberService } from 'angular2-persian-utils' 3 | 4 | @Pipe({ 5 | name: 'numToPerWord' 6 | }) 7 | export class NumToPerWord implements PipeTransform { 8 | 9 | constructor(private persianNumberService: PersianNumberService) { } 10 | 11 | transform(inputValue: string): string { 12 | try { 13 | var number = this.persianNumberService.toEngNumber(inputValue); 14 | return this.persianNumberService.toPersianWord(inputValue); 15 | } 16 | catch(e){ 17 | return `${inputValue} is not valid number!`; 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | #Ignore thumbnails created by Windows 3 | Thumbs.db 4 | #Ignore files built by Visual Studio 5 | *.obj 6 | *.exe 7 | *.pdb 8 | *.user 9 | *.aps 10 | *.pch 11 | *.vspscc 12 | *_i.c 13 | *_p.c 14 | *.ncb 15 | *.suo 16 | *.tlb 17 | *.tlh 18 | *.bak 19 | *.cache 20 | *.ilk 21 | *.log 22 | [Bb]in 23 | [Dd]ebug*/ 24 | *.lib 25 | *.sbr 26 | obj/ 27 | [Rr]elease*/ 28 | _ReSharper*/ 29 | [Tt]est[Rr]esult* 30 | .vs/ 31 | #Nuget packages folder 32 | packages/ 33 | 34 | # compiled output 35 | /dist 36 | /tmp 37 | /out-tsc 38 | 39 | # dependencies 40 | /node_modules 41 | 42 | # develop 43 | /sample 44 | 45 | # IDEs and editors 46 | /.idea 47 | .project 48 | .classpath 49 | .c9/ 50 | *.launch 51 | .settings/ 52 | *.sublime-workspace 53 | 54 | -------------------------------------------------------------------------------- /doc/PerToEngNumberPipe.md: -------------------------------------------------------------------------------- 1 | ## PerToEngNumberPipe 2 | 3 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and convert to english number. 4 | 5 | ##### Example 6 | 7 | ``` typescript 8 | import {PersianPipesModule} from 'angular2-persian-pipes' 9 | 10 | @NgModule({ 11 | imports: [ 12 | PersianPipesModule 13 | ] 14 | }) 15 | ``` 16 | 17 | ```html 18 |

{{'1234567890' | perToEngNumber}}

19 |

{{'۱۲۳۴۵۶۷۸۹۰' | perToEngNumber}}

20 | 21 |

{{'۱۲۳٤٥٦۷۸۹۰' | perToEngNumber}}

22 | ``` 23 | 24 | ## License 25 | 26 | [`MIT`](./LICENSE.md) -------------------------------------------------------------------------------- /doc/IsPerNumberPipe.md: -------------------------------------------------------------------------------- 1 | ## IsPerNumberPipe 2 | 3 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and check it is persian number? 4 | 5 | ##### Example 6 | 7 | ``` typescript 8 | import {PersianPipesModule} from 'angular2-persian-pipes' 9 | 10 | @NgModule({ 11 | imports: [ 12 | PersianPipesModule 13 | ] 14 | }) 15 | ``` 16 | 17 | ```html 18 |

{{1234567890 | isPerNumber}}

19 |

{{'1234567890' | isPerNumber}}

20 |

{{'1۱2۲3۳4۴5۵6۶7۷8۸9۹0۰' | isPerNumber}}

21 | 22 |

{{'۱۲۳٤٥٦۷۸۹۰' | isPerNumber}}

23 |

{{'۱۲۳۴۵۶۷۸۹۰' | isPerNumber}}

24 | ``` 25 | 26 | ## License 27 | 28 | [`MIT`](./LICENSE.md) -------------------------------------------------------------------------------- /src/pipes/is-nationalcode.pipe.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Pipe, PipeTransform } from '@angular/core'; 3 | import { NationalCodeService, PersianNumberService } from 'angular2-persian-utils' 4 | 5 | @Pipe({ 6 | name: 'isNationalCode' 7 | }) 8 | export class IsNationalCode implements PipeTransform { 9 | 10 | constructor(private nationalCodeService: NationalCodeService, private persianNumberService: PersianNumberService) { } 11 | 12 | transform(nationalCode: string): boolean { 13 | try { 14 | let number = this.persianNumberService.toEngNumber(nationalCode); 15 | let natCode = number.toString(); 16 | 17 | while (natCode.length < 10) 18 | natCode = "0" + natCode; 19 | 20 | return this.nationalCodeService.isValid(natCode); 21 | } catch (e) { 22 | return false; 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/pipes/is-company-national-id.pipe.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Pipe, PipeTransform } from '@angular/core'; 3 | import { CompanyNationalIdService, PersianNumberService } from 'angular2-persian-utils' 4 | 5 | @Pipe({ 6 | name: 'isCompanyNationalId' 7 | }) 8 | export class IsCompanyNationalId implements PipeTransform { 9 | 10 | constructor(private companyNationalIdService: CompanyNationalIdService, private persianNumberService: PersianNumberService) { } 11 | 12 | transform(companyNationalId: string): boolean { 13 | try { 14 | let number = this.persianNumberService.toEngNumber(companyNationalId); 15 | let companyNatId = number.toString(); 16 | 17 | while (companyNatId.length < 11) 18 | companyNatId = "0" + companyNatId; 19 | 20 | return this.companyNationalIdService.isValid(companyNatId); 21 | } catch (e) { 22 | return false; 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/persian-pipes.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { PersianUtilsModule } from 'angular2-persian-utils'; 3 | import {PerNumberPipe} from './pipes/per-number.pipe' 4 | import { IsPerNumberPipe } from './pipes/is-per-number.pipe'; 5 | import { PerToEngNumberPipe } from './pipes/per-to-eng-number.pipe'; 6 | import { NumToPerWord } from './pipes/num-to-per-word.pipe'; 7 | import { SafePerWord } from './pipes/safe-per-word.pipe'; 8 | import { IsNationalCode } from './pipes/is-nationalcode.pipe'; 9 | import { IsCompanyNationalId } from './pipes/is-company-national-id.pipe'; 10 | 11 | @NgModule({ 12 | declarations: [PerNumberPipe, IsPerNumberPipe, PerToEngNumberPipe, NumToPerWord, SafePerWord, IsNationalCode, IsCompanyNationalId], 13 | imports: [PersianUtilsModule], 14 | providers: [], 15 | exports: [PerNumberPipe, IsPerNumberPipe, PerToEngNumberPipe, NumToPerWord, SafePerWord, IsNationalCode, IsCompanyNationalId] 16 | }) 17 | export class PersianPipesModule { } 18 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Florian Knop 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular2-persian-pipes", 3 | "version": "0.0.6", 4 | "description": "Persian pipes for Angular2 applications.", 5 | "author": "Javad Rasouli ", 6 | "license": "MIT", 7 | "keywords": [ 8 | "ng2", 9 | "ng", 10 | "angular", 11 | "angular2", 12 | "angularjs", 13 | "pipes", 14 | "filters", 15 | "library", 16 | "persian", 17 | "farsi", 18 | "thvsd" 19 | ], 20 | "files": [ 21 | "src", 22 | "index.ts", 23 | "doc" 24 | ], 25 | "scripts": { 26 | }, 27 | "repository": { 28 | "type": "git", 29 | "url": "git+https://github.com/JavadRasouli/angular2-persian-pipes.git" 30 | }, 31 | "bugs": { 32 | "url": "https://github.com/JavadRasouli/angular2-persian-pipes/issues" 33 | }, 34 | "homepage": "https://github.com/JavadRasouli/angular2-persian-pipes#readme", 35 | "private": false, 36 | "dependencies": { 37 | "angular2-persian-utils": "^0.1.6" 38 | }, 39 | "devDependencies": { 40 | "@angular/common": "^4.0.0", 41 | "@angular/compiler": "^4.0.0", 42 | "@angular/core": "^4.0.0", 43 | "@angular/cli": "1.0.1", 44 | "@angular/compiler-cli": "^4.0.0", 45 | "@types/node": "~6.0.60", 46 | "protractor": "~5.1.0", 47 | "ts-node": "~2.0.0", 48 | "copyfiles": "^1.2.0", 49 | "tslint": "~4.5.0", 50 | "typescript": "~2.2.0" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "callable-types": true, 7 | "class-name": true, 8 | "comment-format": [ 9 | true, 10 | "check-space" 11 | ], 12 | "curly": true, 13 | "eofline": true, 14 | "forin": true, 15 | "import-blacklist": [true, "rxjs"], 16 | "import-spacing": true, 17 | "indent": [ 18 | true, 19 | "spaces" 20 | ], 21 | "interface-over-type-literal": true, 22 | "label-position": true, 23 | "max-line-length": [ 24 | true, 25 | 140 26 | ], 27 | "member-access": false, 28 | "member-ordering": [ 29 | true, 30 | "static-before-instance", 31 | "variables-before-functions" 32 | ], 33 | "no-arg": true, 34 | "no-bitwise": true, 35 | "no-console": [ 36 | true, 37 | "debug", 38 | "info", 39 | "time", 40 | "timeEnd", 41 | "trace" 42 | ], 43 | "no-construct": true, 44 | "no-debugger": true, 45 | "no-duplicate-variable": true, 46 | "no-empty": false, 47 | "no-empty-interface": true, 48 | "no-eval": true, 49 | "no-inferrable-types": [true, "ignore-params"], 50 | "no-shadowed-variable": true, 51 | "no-string-literal": false, 52 | "no-string-throw": true, 53 | "no-switch-case-fall-through": true, 54 | "no-trailing-whitespace": true, 55 | "no-unused-expression": true, 56 | "no-use-before-declare": true, 57 | "no-var-keyword": true, 58 | "object-literal-sort-keys": false, 59 | "one-line": [ 60 | true, 61 | "check-open-brace", 62 | "check-catch", 63 | "check-else", 64 | "check-whitespace" 65 | ], 66 | "prefer-const": true, 67 | "quotemark": [ 68 | true, 69 | "single" 70 | ], 71 | "radix": true, 72 | "semicolon": [ 73 | "always" 74 | ], 75 | "triple-equals": [ 76 | true, 77 | "allow-null-check" 78 | ], 79 | "typedef-whitespace": [ 80 | true, 81 | { 82 | "call-signature": "nospace", 83 | "index-signature": "nospace", 84 | "parameter": "nospace", 85 | "property-declaration": "nospace", 86 | "variable-declaration": "nospace" 87 | } 88 | ], 89 | "typeof-compare": true, 90 | "unified-signatures": true, 91 | "variable-name": false, 92 | "whitespace": [ 93 | true, 94 | "check-branch", 95 | "check-decl", 96 | "check-operator", 97 | "check-separator", 98 | "check-type" 99 | ], 100 | 101 | "directive-selector": [true, "attribute", "app", "camelCase"], 102 | "component-selector": [true, "element", "app", "kebab-case"], 103 | "use-input-property-decorator": true, 104 | "use-output-property-decorator": true, 105 | "use-host-property-decorator": true, 106 | "no-input-rename": true, 107 | "no-output-rename": true, 108 | "use-life-cycle-interface": true, 109 | "use-pipe-transform-interface": true, 110 | "component-class-suffix": true, 111 | "directive-class-suffix": true, 112 | "no-access-missing-member": true, 113 | "templates-use-public": true, 114 | "invoke-injectable": true 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular2PersianPipes 2 | 3 | Persian pipes for Angular2 apps. 4 | 5 | ## Install 6 | 7 | ### npm 8 | 9 | ``` 10 | npm install angular2-persian-pipes --save 11 | ``` 12 | 13 | ## Usage 14 | 15 | Import `PersianPipesModule` into your app's modules: 16 | 17 | ``` typescript 18 | import { PersianPipesModule } from 'angular2-persian-pipes'; 19 | 20 | @NgModule({ 21 | imports: [ 22 | PersianPipesModule 23 | ] 24 | }) 25 | ``` 26 | 27 | This makes all the `angular2-persian-pipes` pipes available for use in your app. 28 | 29 | ## IsPerNumberPipe 30 | 31 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and check it is persian number? 32 | 33 | ##### Example 34 | 35 | ```html 36 |

{{1234567890 | isPerNumber}}

37 |

{{'1234567890' | isPerNumber}}

38 |

{{'1۱2۲3۳4۴5۵6۶7۷8۸9۹0۰' | isPerNumber}}

39 | 40 |

{{'۱۲۳٤٥٦۷۸۹۰' | isPerNumber}}

41 |

{{'۱۲۳۴۵۶۷۸۹۰' | isPerNumber}}

42 | ``` 43 | 44 | ## PerNumberPipe 45 | 46 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and convert to persian digits. 47 | 48 | ##### Example 49 | 50 | ```html 51 |

{{'12345679' | perNumber}}

52 | ``` 53 | 54 | ## PerToEngNumberPipe 55 | 56 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and convert to english number. 57 | 58 | ##### Example 59 | 60 | ```html 61 |

{{'1234567890' | perToEngNumber}}

62 |

{{'۱۲۳۴۵۶۷۸۹۰' | perToEngNumber}}

63 | 64 |

{{'۱۲۳٤٥٦۷۸۹۰' | perToEngNumber}}

65 | ``` 66 | 67 | ## NumToPerWord 68 | 69 | This pipe take a [`Template expressions`](https://angular.io/guide/template-syntax#!) and convert to persian word. 70 | 71 | ##### Example 72 | 73 | ```html 74 |

{{'1234567890' | numToPerWord}}

75 |

{{'۱۲۳۴۵۶۷۸۹۰' | numToPerWord}}

76 |

{{'۱۲۳٤٥٦۷۸۹۰' | numToPerWord}}

77 |

{{1234567890 | numToPerWord}}

78 | ``` 79 | 80 | ## SafePerWord 81 | 82 | This pipe take a 'string' and replace all arabic letters with persian(e.g 'ي' and 'ك' replace with 'ی' and 'ک'). 83 | 84 | ##### Example 85 | 86 | ```html 87 |

{{'انگولار يك فريمورك ساختاري براي وب اپليكيشن هاي پويا است.' | safePerWord}}

88 |

{{'Angular يك فريمورك ساختاري براي وب اپليكيشن هاي پويا است.' | safePerWord}}

89 | ``` 90 | 91 | ## IsNationalCode 92 | 93 | This pipe take a 'nationalCode' and check it is correctly? 94 | 95 | nationalCode >> شماره ملی 96 | 97 | ##### Example 98 | 99 | ```html 100 |

{{'0082959277' | isNationalCode}}

101 |

{{'۰۰۸۲۹۵۹۲۷۷' | isNationalCode}}

102 |

{{'۰۰۸۲۹٥۹۲۷۷' | isNationalCode}}

103 |

{{0082959277 | isNationalCode}}

104 | ``` 105 | 106 | ## IsCompanyNationalId 107 | 108 | This pipe take a 'CompanyNationalId' and check it is correctly? 109 | 110 | CompanyNationalId >> شناسه ملی شرکت 111 | 112 | ##### Example 113 | 114 | ```html 115 |

{{'10260595692' | isCompanyNationalId}}

116 |

{{'۱۰۲۶۰۵۹۵۶۹۲' | isCompanyNationalId}}

117 |

{{'۱۰۲۶۰٥۹٥۶۹۲' | isCompanyNationalId}}

118 |

{{10260595692 | isCompanyNationalId}}

119 | ``` 120 | 121 | ## License 122 | 123 | [`MIT`](./LICENSE.md) 124 | --------------------------------------------------------------------------------