Skip to content

Commit 667086b

Browse files
committed
Added PAN validator with tests
1 parent 7fdc788 commit 667086b

5 files changed

Lines changed: 16 additions & 19 deletions

File tree

build-browser.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import babelPresetEnv from "@babel/preset-env";
66
import pkg from "./package.json";
77

88
rollup({
9-
entry: "src/index.js",
9+
input: "src/index.js",
1010
plugins: [
1111
babel({
1212
presets: [[babelPresetEnv, { modules: false }]],
@@ -16,15 +16,15 @@ rollup({
1616
})
1717
.then((bundle) =>
1818
bundle.write({
19-
dest: "validator.js",
20-
format: "umd",
21-
moduleName: pkg.name,
22-
banner: `/*!\n${String(fs.readFileSync("./LICENSE"))
23-
.trim()
24-
.split("\n")
25-
.map((l) => ` * ${l}`)
26-
.join("\n")}\n */`,
27-
})
19+
file: "validator.js",
20+
format: "umd",
21+
name: pkg.name,
22+
banner: `/*!\n${String(fs.readFileSync("./LICENSE"))
23+
.trim()
24+
.split("\n")
25+
.map((l) => ` * ${l}`)
26+
.join("\n")}\n */`,
27+
})
2828
)
2929
.catch((e) => {
3030
process.stderr.write(`${e.message}\n`);

jsconfig.json

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

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"npm-run-all": "^4.1.5",
5050
"nyc": "^14.1.0",
5151
"rimraf": "^3.0.0",
52-
"rollup": "^0.47.0",
53-
"rollup-plugin-babel": "^4.0.1",
52+
"rollup": "^2.80.0",
53+
"rollup-plugin-babel": "^4.4.0",
5454
"timezone-mock": "^1.3.6",
5555
"uglify-js": "^3.0.19"
5656
},
@@ -72,5 +72,8 @@
7272
"engines": {
7373
"node": ">= 0.10"
7474
},
75-
"license": "MIT"
75+
"license": "MIT",
76+
"dependencies": {
77+
"validator": "^13.15.35"
78+
}
7679
}

src/lib/isPAN.js

Whitespace-only changes.

test/validators/isPAN.test.js

Whitespace-only changes.

0 commit comments

Comments
 (0)