Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Validation of IBAN numbers and generation of IBAN's plus some other helpful stuff
The ibantools npm package provides utilities for validating and formatting International Bank Account Numbers (IBANs). It helps ensure that IBANs are correctly structured and can be used for financial transactions.
Validate IBAN
This feature allows you to validate an IBAN to ensure it is correctly formatted and valid. The `validateIBAN` function returns an object indicating whether the IBAN is valid and, if not, what the issues are.
const ibantools = require('ibantools');
const result = ibantools.validateIBAN('DE89370400440532013000');
console.log(result);
Format IBAN
This feature allows you to format an IBAN into a more readable form. The `formatIBAN` function takes an IBAN string and returns it in a standardized format with spaces.
const ibantools = require('ibantools');
const formattedIBAN = ibantools.formatIBAN('DE89370400440532013000');
console.log(formattedIBAN);
Get IBAN Country Information
This feature provides information about the country associated with a given IBAN. The `getIBANCountryInfo` function takes a country code and returns details such as the country name and IBAN length.
const ibantools = require('ibantools');
const countryInfo = ibantools.getIBANCountryInfo('DE');
console.log(countryInfo);
The 'iban' package provides similar functionalities for validating and formatting IBANs. It also includes utilities for generating IBANs and extracting country-specific information. Compared to ibantools, it offers a more comprehensive set of features for handling IBANs.
IBANTools is JavaScript library for validation, creation and extraction of IBAN's.
For more information about IBAN see wikipedia page.
$ npm install ibantools
$ bower install ibantools
var ibantools = require('ibantools');
ibantools.isValidIBAN('NL91 ABNA 0517 1643 00');
require(["ibantools"], function(ibantools) {
console.log(ibantools.isValidIBAN('NL91 ABNA 0517 1643 00'));
});
Use browserify or webpack.
Use node, not bower module.
If you are using ES6-aware tools, like a rollup or JSPM, they will automatically select ES6 module from the package.
Include ibantools as dependency and run typings install
.
Link definition file from the package:
$ tsd link
That will add link to ibantools.d.ts
in your typings/tsd.d.ts
file.
Use it in your .ts
files:
/// <reference path="../typings/tsd.d.ts" />
import iban = require("ibantools");
console.log(iban.isValidIBAN("NL91 ABNA 0517 1643 00"));
See documentation with examples on Github pages.
npm install
and after node node_modules/.bin/typings install
(or run typings install
if you have typings installed globally).test/IBANToolsTest.ts
.karma/ibantoolsSpec.js
unless module have problem with loading using AMD.gulp all-with-tests
.dist
, es6
or build
directories.This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
FAQs
Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff like ISO 3136-1 alpha 2 country list
The npm package ibantools receives a total of 173,551 weekly downloads. As such, ibantools popularity was classified as popular.
We found that ibantools demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.