Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@alibaba-aero/griphook
Advanced tools
Readme
Griphook is a tool to validate and visualize Iranian bank information.
It can validate IBANs and PANs, find issuer bank and more while caching the results.
Griphook was a goblin who worked at Gringotts Wizarding Bank in Diagon Alley.
validatePAN(value)
Will check if value is a valid PAN or not (returns a boolean).
import { validatePAN } from 'griphook';
console.log(validatePAN('6219861032799560')); // true
visualizePAN(value, options)
Will format a PAN (Returns a String).
import { visualizePAN } from 'griphook';
console.log(visualizePAN('6219861032799560')); // '6219-8610-3279-9560'
you can pass an optional object to this method:
option | type | default value | description |
---|---|---|---|
spacerChar | String | '-' | a character to use as spacer between each 4 digits |
censor | Boolean | false | whether should censor a part of PAN or not |
censorChar | String | '*' | a character to use as replacement of real digits |
censorLength | Number | 4 | number of censored digits (will censor from center) |
findBankByPAN(value)
Will Find Bank Info With PAN IIN+ (Returns an Object)
import { findBankByPAN } from 'griphook';
console.log(findBankByPAN('6219861032799560'));
// {
// "name": "saman",
// "name_farsi": "سامان",
// "icon": "Saman.svg",
// "iban_nbc": "056",
// "pan_iin": [ "621986" ]
// }
You should download icons from here and host them locally (for now).
validateIBAN(value)
Will check if value is a valid IBAN or not (returns a boolean).
import { validateIBAN } from 'griphook';
console.log(validateIBAN('IR410560090180001896622001')); // true
visualizeIBAN(value, options)
Will format a IBAN (Returns a String).
import { visualizeIBAN } from 'griphook';
console.log(visualizeIBAN('IR410560090180001896622001')); // 'IR41-0560-0901-8000-1896-6220-01'
you can pass an optional object to this method:
option | type | default value | description |
---|---|---|---|
spacerChar | String | '-' | a character to use as spacer between each 4 digits |
findBankByIBAN(value)
Will Find Bank Info With IBAN NBC+ (Returns an Object)
import { findBankByIBAN } from 'griphook';
console.log(findBankByIBAN('IR410560090180001896622001'));
// {
// "name": "saman",
// "name_farsi": "سامان",
// "icon": "Saman.svg",
// "iban_nbc": "056",
// "pan_iin": [ "621986" ]
// }
You should download icons from here and host them locally (for now).
findBankByName(value)
Will Find Bank Info With Their English Name (Returns an Object). English Name Must Be Lower Case.
import { findBankByName } from 'griphook';
console.log(findBankByName('saman'));
// {
// "name": "saman",
// "name_farsi": "سامان",
// "icon": "Saman.svg",
// "iban_nbc": "056",
// "pan_iin": [ "621986" ]
// }
findBankByFarsiName(value)
Will Find Bank Info With Their Farsi Name (Returns an Object).
import { findBankByFarsiName } from 'griphook';
console.log(findBankByFarsiName('سامان'));
// {
// "name": "saman",
// "name_farsi": "سامان",
// "icon": "Saman.svg",
// "iban_nbc": "056",
// "pan_iin": [ "621986" ]
// }
You should download icons from here and host them locally (for now).
FAQs
Validate and visualize Iranian bank info
The npm package @alibaba-aero/griphook receives a total of 14 weekly downloads. As such, @alibaba-aero/griphook popularity was classified as not popular.
We found that @alibaba-aero/griphook demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.