Skip to content

Commit b226c19

Browse files
committed
Complete revamp
- More fields, more data! - New tool chain based on Node.js
1 parent b63c3c0 commit b226c19

19 files changed

Lines changed: 6282 additions & 72 deletions

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
experiments
1+
/experiments
2+
/build/*
3+
/node_modules

.travis.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
language: ruby
2-
sudo: false
3-
rvm:
4-
- 2.2.2
5-
before_install:
6-
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc'
7-
cache: bundler
8-
install:
9-
- bundle install
10-
script:
11-
- csvlint -d -s iin-user-contributions.schema.json iin-user-contributions.csv
12-
- "for file in `ls *.csv` ; do csvlint $file ; done"
13-
- rake
1+
language: node_js
2+
node_js:
3+
- "stable"
144
notifications:
155
- email: false

Gemfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ binlist-data
33

44
[![Build status](https://api.travis-ci.org/binlist/binlist-data.svg)][BUILDSTATUS]
55

6-
A public repository of Issuer Identification Numbers ([IIN][IIN]) also
7-
called the "Bank Identification Numbers" ([BIN][BIN]).
6+
A public repository of Issuer Identification Numbers ([IIN][IIN]) also called
7+
the "Bank Identification Numbers" ([BIN][BIN]).
88

99
Contributing
1010
============
11-
1. Open the `iin-user-contributions.csv`
12-
2. Edit or Add your entry and make sure to keep the file alphabetical sorted by IIN/BIN.
13-
3. Test that everything works as expected by running `bundle exec csvlint -d -s iin-user-contributions.schema.json iin-user-contributions.csv` and `rake`
11+
12+
1. Open the `ranges.csv`
13+
2. Edit or add your entry and make sure to keep the file alphabetical sorted by IIN/BIN.
14+
3. Test that everything works as expected by running `npm test`
1415
4. Send a pull request.
1516

1617
## Known issues
@@ -19,15 +20,17 @@ Contributing
1920

2021
## Reach out
2122

22-
Doing anything interesting with binlist or want to share your favorite tips and tricks? Please checkout the wiki then and feel free to reach out with ideas for features or requests.
23+
Doing anything interesting with binlist, or want to share your favorite tips
24+
and tricks? Please open an issue and we will add a section to the README.
2325

2426
Credits
2527
=======
28+
2629
This repository is part of http://www.binlist.net/
2730

2831
## LICENSE
2932

30-
Copyright 2014 binlist.net All Rights Reserved.
33+
Copyright 2016 binlist.net All Rights Reserved.
3134

3235
Licensed under the Apache License, Version 2.0 (the "License");
3336
you may not use this file except in compliance with the License.

Rakefile

Lines changed: 0 additions & 14 deletions
This file was deleted.
File renamed without changes.

archived/iins-to-ranges.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
'use strict';
2+
3+
const map = require('through2-map').obj;
4+
const fromCsv = require('csv-parser');
5+
const toCsv = require('csv-write-stream');
6+
7+
process.stdin
8+
.pipe(fromCsv())
9+
.pipe(map(function( row ){
10+
let scheme = row.card_brand
11+
.replace('MAESTRO', 'MASTERCARD')
12+
.replace('DINERS CLUB', 'DINERS')
13+
.replace('DINERS INTERNATIONAL', 'DINERS')
14+
.replace('AMERICAN EXPRESS', 'AMEX');
15+
16+
let brand = row.card_sub_brand;
17+
18+
if (!brand && scheme !== row.card_brand)
19+
brand = row.card_brand;
20+
21+
brand = brand
22+
.replace('MAESTRO', 'Maestro')
23+
.replace('DANKORT', 'Visa/Dankort');
24+
25+
return {
26+
iin_start: row.iin,
27+
iin_end: null,
28+
number_length: null,
29+
scheme: scheme,
30+
brand: brand,
31+
type: row.card_type
32+
.replace('PREPAID', 'DEBIT'),
33+
prepaid: row.card_type === 'PREPAID' ? 'y' : null,
34+
country: row.country_code
35+
.replace('QZ', 'XK'),
36+
bank_name: row.bank_name,
37+
bank_logo: null,
38+
bank_url: row.bank_url,
39+
bank_phone: row.bank_phone,
40+
bank_city: row.bank_city,
41+
};
42+
}))
43+
.pipe(toCsv())
44+
.pipe(process.stdout);

0 commit comments

Comments
 (0)