Permalink
Browse files

[minor] Using a lib folder for 1 file is stupid

[fix] Removed dead code
[fix] Added pre-commit hook
  • Loading branch information...
1 parent e81e582 commit e4c26c0fe2b1f07494adfdf113c10ceef1274554 @3rd-Eden 3rd-Eden committed Apr 13, 2013
Showing with 3 additions and 16 deletions.
  1. 0 lib/creditcard.js → index.js
  2. +0 −13 lib/iin/index.js
  3. +2 −2 package.json
  4. +1 −1 test/creditcard.test.js
File renamed without changes.
View
@@ -1,13 +0,0 @@
-[1, 2, 3, 4, 5, 6, 7, 8, 9].reduce(function generate(exports, key) {
- 'use strict';
-
- key = key.toString();
-
- // Require the different iin ranges and attach it to the exports.
- exports[key] = require('./'+ key);
-
- // Create a lookup array, so we can easily iterate over them to see if we have
- // matches againt the starting numbers
- exports[key +'_keys'] = Object.keys(exports[key]);
- return exports;
-}, exports);
View
@@ -2,7 +2,6 @@
"name": "creditcard",
"version": "0.0.2",
"description": "Creditcard number parsing, validation and information extraction",
- "main": "lib/creditcard.js",
"scripts": {
"test": "./node_modules/.bin/mocha $(shell find test -name '*.test.js')"
},
@@ -30,7 +29,8 @@
"chai": "1.4.0",
"mocha": "1.7.3",
"dox": "0.4.1",
- "ejs": "0.8.3"
+ "ejs": "0.8.3",
+ "pre-commit": "0.0.3"
},
"author": "Arnout Kazemier",
"license": "MIT"
View
@@ -11,7 +11,7 @@ chai.Assertion.includeStack = true;
/**
* The actual library that we test..
*/
-var creditcard = require('../lib/creditcard');
+var creditcard = require('../');
describe('creditcard#validate', function () {
var valid = 4222222222222

0 comments on commit e4c26c0

Please sign in to comment.