@alwatr/iranian-national-code-validator 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.22](https://github.com/Alwatr/nanolib/compare/@alwatr/iranian-national-code-validator@1.0.21...@alwatr/iranian-national-code-validator@1.0.22) (2026-03-18)
7
+
8
+ **Note:** Version bump only for package @alwatr/iranian-national-code-validator
9
+
6
10
  ## [1.0.21](https://github.com/Alwatr/nanolib/compare/@alwatr/iranian-national-code-validator@1.0.20...@alwatr/iranian-national-code-validator@1.0.21) (2026-03-16)
7
11
 
8
12
  ### 🔨 Code Refactoring
package/dist/main.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /** 📦 @alwatr/iranian-national-code-validator v1.0.21 */
1
+ /** 📦 @alwatr/iranian-national-code-validator v1.0.22 */
2
2
  "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var main_exports={};__export(main_exports,{isValidIranianNationalCode:()=>isValidIranianNationalCode});module.exports=__toCommonJS(main_exports);function isValidIranianNationalCode(str){if(!/^\d{10}$/.test(str))return false;const check=+str[9];const sum=str.split("").slice(0,9).reduce((acc,x,i)=>acc+ +x*(10-i),0)%11;return sum<2?check===sum:check+sum===11}0&&(module.exports={isValidIranianNationalCode});
3
3
  //# sourceMappingURL=main.cjs.map
package/dist/main.mjs CHANGED
@@ -1,3 +1,3 @@
1
- /** 📦 @alwatr/iranian-national-code-validator v1.0.21 */
1
+ /** 📦 @alwatr/iranian-national-code-validator v1.0.22 */
2
2
  function isValidIranianNationalCode(str){if(!/^\d{10}$/.test(str))return false;const check=+str[9];const sum=str.split("").slice(0,9).reduce((acc,x,i)=>acc+ +x*(10-i),0)%11;return sum<2?check===sum:check+sum===11}export{isValidIranianNationalCode};
3
3
  //# sourceMappingURL=main.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alwatr/iranian-national-code-validator",
3
3
  "description": "A tiny TypeScript library to Validates an Iranian National Code (Code Melli).",
4
- "version": "1.0.21",
4
+ "version": "1.0.22",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "bugs": "https://github.com/Alwatr/nanolib/issues",
7
7
  "devDependencies": {
@@ -64,7 +64,7 @@
64
64
  "clean": "rm -rfv dist *.tsbuildinfo",
65
65
  "d": "bun run build:es && bun --enable-source-maps --trace-warnings",
66
66
  "t": "bun run test",
67
- "test": "echo test-skipped",
67
+ "test": "bun test",
68
68
  "w": "bun run watch",
69
69
  "watch": "bun run watch:ts & bun run watch:es",
70
70
  "watch:es": "bun run build:es --watch",
@@ -73,5 +73,5 @@
73
73
  "sideEffects": false,
74
74
  "type": "module",
75
75
  "types": "./dist/main.d.ts",
76
- "gitHead": "c3889e3756b0a0f9b935a1b702a1373ac52cb379"
76
+ "gitHead": "def1decf8f496f4b0d3d3ab952c346c689c30160"
77
77
  }