@agrotools1/at-utils 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/car/index.d.ts +2 -1
- package/dist/car/index.d.ts.map +1 -0
- package/dist/car/validators.d.ts +1 -0
- package/dist/car/validators.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -1
- package/package.json +5 -18
- package/dist/car/index.js +0 -1
- package/dist/car/validators.js +0 -1
package/dist/car/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './validators';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/car/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
package/dist/car/validators.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/car/validators.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,WA0C3C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
function A(e) {
|
|
2
|
+
const s = [
|
|
3
|
+
"AC",
|
|
4
|
+
"AL",
|
|
5
|
+
"AP",
|
|
6
|
+
"AM",
|
|
7
|
+
"BA",
|
|
8
|
+
"CE",
|
|
9
|
+
"DF",
|
|
10
|
+
"ES",
|
|
11
|
+
"GO",
|
|
12
|
+
"MA",
|
|
13
|
+
"MT",
|
|
14
|
+
"MS",
|
|
15
|
+
"MG",
|
|
16
|
+
"PA",
|
|
17
|
+
"PB",
|
|
18
|
+
"PR",
|
|
19
|
+
"PE",
|
|
20
|
+
"PI",
|
|
21
|
+
"RJ",
|
|
22
|
+
"RN",
|
|
23
|
+
"RS",
|
|
24
|
+
"RO",
|
|
25
|
+
"RR",
|
|
26
|
+
"SC",
|
|
27
|
+
"SP",
|
|
28
|
+
"SE",
|
|
29
|
+
"TO"
|
|
30
|
+
];
|
|
31
|
+
let t = "";
|
|
32
|
+
if (e.length >= 40)
|
|
33
|
+
t = e[0] + e[1];
|
|
34
|
+
else
|
|
35
|
+
return !1;
|
|
36
|
+
return s.includes(t) ? /^[A-Z]{2}-\d{7}-[\dA-Z]{4}\.?$/.test(e) : !1;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
A as validateCAR
|
|
40
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agrotools1/at-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"private": false,
|
|
6
|
-
"packageManager": "pnpm@9.1.0",
|
|
7
6
|
"description": "Métodos utilitários da Agrotools",
|
|
8
7
|
"author": "Agrotools",
|
|
9
8
|
"license": "MIT",
|
|
@@ -11,25 +10,13 @@
|
|
|
11
10
|
"utils",
|
|
12
11
|
"agrotools"
|
|
13
12
|
],
|
|
14
|
-
"main": "
|
|
15
|
-
"module": "
|
|
16
|
-
"types": "
|
|
17
|
-
"typings": "./dist/index.d.ts",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"module": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
18
16
|
"files": [
|
|
19
17
|
"dist"
|
|
20
18
|
],
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"esbuild": "0.24.0",
|
|
23
|
-
"glob": "11.0.0",
|
|
24
|
-
"typescript": "4.2.4"
|
|
25
|
-
},
|
|
26
19
|
"publishConfig": {
|
|
27
20
|
"access": "public"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"build": "pnpm run build-only",
|
|
31
|
-
"build-only": "node ./scripts/build.js && tsc --emitDeclarationOnly",
|
|
32
|
-
"format": "prettier --write src/",
|
|
33
|
-
"pub:release": "pnpm publish --access public"
|
|
34
21
|
}
|
|
35
|
-
}
|
|
22
|
+
}
|
package/dist/car/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"./validators";
|
package/dist/car/validators.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function validateCAR(t){const s=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"];let e="";if(t.length>=40)e=t[0]+t[1];else return!1;return s.includes(e)?/^([A-Z]{2})-\d{7}-([\dA-Z]{4}\.?){8}$/.test(t):!1}
|