jcinfo-utils 1.0.46 → 1.0.48

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/index.d.ts CHANGED
@@ -85,3 +85,5 @@ export function fileExists(fs: Object, filename: string): boolean
85
85
  export function updateVersionDate(fs: Object): void
86
86
 
87
87
  export function updateVersionBuild(fs: Object, autoInc?: boolean): void
88
+
89
+ export function encodeUriBase64(str: string): string
package/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from './src/updateDotEnv.js'
18
18
  import { formatFileSize } from './src/formatFileSize.js'
19
19
  import { retirarAcentuacao } from './src/retirarAcentuacao.js'
20
- import { fileExists } from './src/utils.js'
20
+ import { fileExists, encodeUriBase64 } from './src/utils.js'
21
21
  import { validarCPF, validarCNPJ } from './src/validator.js'
22
22
 
23
23
  // ===================================================== CONFIGURAÇÕES
@@ -230,6 +230,7 @@ export {
230
230
  formatFileSize,
231
231
  retirarAcentuacao,
232
232
  fileExists,
233
+ encodeUriBase64,
233
234
  updateDotEnv,
234
235
  updateDotEnvKey,
235
236
  updateVersionDate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jcinfo-utils",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "Pacote de funções utilitárias",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/utils.js CHANGED
@@ -6,3 +6,8 @@ export function fileExists(fs, filename) {
6
6
  return false
7
7
  }
8
8
  }
9
+
10
+ export function encodeUriBase64(str) {
11
+ let result = encodeURI(str)
12
+ return window.btoa(result)
13
+ }