Skip to content

Commit

Permalink
Release v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Feb 15, 2021
1 parent 52ffeac commit fa605b4
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 32 deletions.
1 change: 1 addition & 0 deletions clabe.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
}
form pre.dark-mode {
display: none;
font-size: 0.8rem;
background-color: black;
padding: 10px 20px;
overflow-x: auto !important;
Expand Down
5 changes: 3 additions & 2 deletions dist/clabe.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! CLABE Validator v1.6.0 ~ github.com/center-key/clabe-validator ~ MIT License
//! CLABE Validator v1.6.1 ~ github.com/center-key/clabe-validator ~ MIT License

export declare type ClabeBank = {
tag?: string;
Expand All @@ -13,9 +13,10 @@ export declare type ClabeCitiesMap = {
};
export declare type ClabeCheck = {
ok: boolean;
error: string | null;
formatOk: boolean;
error: string | null;
message: string;
clabe: string | null;
tag: string | null;
bank: string | null;
city: string | null;
Expand Down
7 changes: 4 additions & 3 deletions dist/clabe.esm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! CLABE Validator v1.6.0 ~ github.com/center-key/clabe-validator ~ MIT License
//! CLABE Validator v1.6.1 ~ github.com/center-key/clabe-validator ~ MIT License

const clabe = {
version: '1.6.0',
version: '1.6.1',
computeChecksum(clabeNum17) {
const x = (i) => [3, 7, 1][i % 3];
const add = (sum, digit, i) => sum + (Number(digit) * x(i)) % 10;
Expand Down Expand Up @@ -40,9 +40,10 @@ const clabe = {
const validation = getValidationInfo();
return {
ok: !validation,
error: validation ? 'invalid-' + validation.invalid : null,
formatOk: !validation || ['bank', 'city'].includes(validation.invalid),
error: validation ? 'invalid-' + validation.invalid : null,
message: validation ? errorMap[validation.invalid] + validation.data : 'Valid',
clabe: validation ? null : clabeNum,
tag: bank.tag || null,
bank: bank.name || null,
city: city || null,
Expand Down
7 changes: 4 additions & 3 deletions dist/clabe.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! CLABE Validator v1.6.0 ~ github.com/center-key/clabe-validator ~ MIT License
//! CLABE Validator v1.6.1 ~ github.com/center-key/clabe-validator ~ MIT License

const clabe = {
version: '1.6.0',
version: '1.6.1',
computeChecksum(clabeNum17) {
const x = (i) => [3, 7, 1][i % 3];
const add = (sum, digit, i) => sum + (Number(digit) * x(i)) % 10;
Expand Down Expand Up @@ -40,9 +40,10 @@ const clabe = {
const validation = getValidationInfo();
return {
ok: !validation,
error: validation ? 'invalid-' + validation.invalid : null,
formatOk: !validation || ['bank', 'city'].includes(validation.invalid),
error: validation ? 'invalid-' + validation.invalid : null,
message: validation ? errorMap[validation.invalid] + validation.data : 'Valid',
clabe: validation ? null : clabeNum,
tag: bank.tag || null,
bank: bank.name || null,
city: city || null,
Expand Down
4 changes: 2 additions & 2 deletions dist/clabe.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/clabe.umd.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! CLABE Validator v1.6.0 ~ github.com/center-key/clabe-validator ~ MIT License
//! CLABE Validator v1.6.1 ~ github.com/center-key/clabe-validator ~ MIT License

(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
Expand All @@ -13,7 +13,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.clabe = void 0;
const clabe = {
version: '1.6.0',
version: '1.6.1',
computeChecksum(clabeNum17) {
const x = (i) => [3, 7, 1][i % 3];
const add = (sum, digit, i) => sum + (Number(digit) * x(i)) % 10;
Expand Down Expand Up @@ -52,9 +52,10 @@
const validation = getValidationInfo();
return {
ok: !validation,
error: validation ? 'invalid-' + validation.invalid : null,
formatOk: !validation || ['bank', 'city'].includes(validation.invalid),
error: validation ? 'invalid-' + validation.invalid : null,
message: validation ? errorMap[validation.invalid] + validation.data : 'Valid',
clabe: validation ? null : clabeNum,
tag: bank.tag || null,
bank: bank.name || null,
city: city || null,
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ <h2>JavaScript library to analyze or create a CLABE number for a Mexican bank ac
<script src=https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js></script>
<script src=https://cdn.jsdelivr.net/npm/[email protected]/dist/dna.min.js></script>
<script src=https://cdn.jsdelivr.net/npm/[email protected]/dist/lib-x.min.js></script>
<script src=https://cdn.jsdelivr.net/npm/clabe-validator@1.5/dist/clabe.min.js></script>
<script src=https://cdn.jsdelivr.net/npm/clabe-validator@1.6/dist/clabe.min.js></script>
</body>
</html>
18 changes: 9 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// Gulp configuration and tasks

// Imports
import babel from 'gulp-babel';
import gap from 'gulp-append-prepend';
import gulp from 'gulp';
import header from 'gulp-header';
import htmlHint from 'gulp-htmlhint';
import mergeStream from 'merge-stream';
import rename from 'gulp-rename';
import replace from 'gulp-replace';
import size from 'gulp-size';
import babel from 'gulp-babel';
import gap from 'gulp-append-prepend';
import gulp from 'gulp';
import header from 'gulp-header';
import htmlHint from 'gulp-htmlhint';
import mergeStream from 'merge-stream';
import rename from 'gulp-rename';
import replace from 'gulp-replace';
import size from 'gulp-size';
import { htmlValidator } from 'gulp-w3c-html-validator';
import { readFileSync } from 'fs';

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clabe-validator",
"version": "1.6.0",
"version": "1.6.1",
"description": "Analyze or create a CLABE number for a Mexican bank account (written in TypeScript)",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -70,7 +70,7 @@
"@typescript-eslint/parser": "~4.15",
"babel-minify": "~0.5",
"dna.js": "~1.7",
"eslint": "~7.19",
"eslint": "~7.20",
"gulp": "~4.0",
"gulp-append-prepend": "~1.0",
"gulp-babel": "~8.0",
Expand All @@ -85,6 +85,7 @@
"jshint": "~2.12",
"merge-stream": "~2.0",
"mocha": "~8.3",
"pretty-print-json": "~0.5",
"rimraf": "~3.0",
"typescript": "~4.1",
"web-ignition": "~1.4"
Expand Down
14 changes: 7 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"declaration": true,
"outDir": "build",
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUncheckedIndexedAccess": true,
"suppressImplicitAnyIndexErrors": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
"noUnusedLocals": true,
"suppressImplicitAnyIndexErrors": true
}
}

0 comments on commit fa605b4

Please sign in to comment.