
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Lietuviškų asmens kodo / įmonės kodo tikrinimo bei generavimo funkcijos
Examples can be found here:
npm install lt-codes
yarn add lt-codes
import { personalCode, companyCode } from 'lt-codes';
Function | Description |
---|---|
personalCode.validate(code: string) | Validates personal code |
personalCode.generate() | Generates personal code |
const code = '39001010000'; // example
const generatedCode = personalCode.generate();
const { isValid, isException, error } = personalCode.validate(code);
{
"isValid": true,
"error": "",
"isException": true
}
import { ValidationResult } from 'lt-codes';
const result: ValidationResult = personalCode.validate(code);
Function | Description |
---|---|
companyCode.validate(code: string) | Validates company code |
companyCode.generate() | Generates company code |
const code = '123456789'; // example
const generatedCode = companyCode.generate();
const { isValid, isException, error } = companyCode.validate(code);
{
"isValid": true,
"error": "",
"isException": false
}
import { ValidationResult } from 'lt-codes';
const result: ValidationResult = companyCode.validate(code);
You can import all error types from lt-codes
as use as constants.
import { ValidationError } from 'lt-codes';
error
property returned by validate()
can be empty or one of the following values:
Value | Description |
---|---|
ValidationError.EMPTY | Code not passed (empty) |
ValidationError.INVALID | Do not pass regex checker |
ValidationError.INVALID_CONTROL_NUMBER | Invalid control number (last digit) |
ValidationError.INVALID_DATE | Invalid user birth date |
FAQs
Lithuanian codes. Personal & company code validator and generator
The npm package lt-codes receives a total of 16 weekly downloads. As such, lt-codes popularity was classified as not popular.
We found that lt-codes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.