New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

myanmar-nrc-x

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myanmar-nrc-x

Myanmar NRC assert tool fixed bugs, used unicode

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31
decreased by-16.22%
Maintainers
1
Weekly downloads
 
Created
Source

Myanmar National Registration Card Format Prefix

Myanmar NRC Format [State Number][District]([NAING])[Register No] using Unicode. Fixed all bug, pretty fine and ready to use with myanmar unicode. This is a modified version of https://github.com/greenlikeorange/NRCPrefix

Match Formats

[State Number]\[District]([NAING/N])[Register No]

  • 12/OKM(N)123456
  • 12/OUKAMA(N)123456
  • 12/OKM(NAING)123456

Prefer formats

  • 12/OUKAMA(N)123456
  • 12/OUKAMA(NAING)123456
  • ၁၂/ဥကမ(နိုင်)၁၂၃၄၅၆

NOTE

Three english characters in district are not complete format and will not support some function. So you should be use six english characters for district.

Usage

var MMNRC = require('myanmar-nrc-x')
try{
	var nrc = MMNRC("၁၂/ဥကမ(န)၀၂၃၄၅၆")
	nrc.isEqual("12/OUKAMA(N)023456") //true;
}catch(error){
	console.log(error.message)
}

Example

var MMNRC = require('myanmar-nrc-x')

function checknrc(nrcno){
	var validity = false;
	try{
		var nrc = MMNRC(nrcno);
		console.log(MMNRC.toMyaNum(12)) //၁၂
		console.log(MMNRC.toEngNum('၁၂')) //12
		console.log(nrc.getFormat()) // 12/OUKAMA(N)023456
		console.log(nrc.getFormat("mm")) // ၁၂/ဥကမ(နိုင်)၀၂၃၄၅၆
		console.log(nrc.getState()) // Yangon
		console.log(nrc.getState("mm")) // ရန်ကုန်တိုင်း
		validity = true;

	}catch(e){
	 console.log(e.message);
	 validity = false;
	}

	return validity;
}


if(checknrc("၁၂/ဥကမ(န)၀၂၃၄၅၆")) console.log('myanmar nrc format is valid')

Keywords

FAQs

Package last updated on 29 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc