jcinfo-utils 1.0.6 → 1.0.7

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.
Files changed (2) hide show
  1. package/index.js +10 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6,6 +6,15 @@ function addLog({ ...args }) {
6
6
  }
7
7
  }
8
8
 
9
+ /**
10
+ * Adiciona o estilo "userSelect: none" ao body
11
+ */
12
+ function addUserSelectNoneInMobile() {
13
+ if (isMobile()) {
14
+ document.body.style.userSelect = 'none'
15
+ }
16
+ }
17
+
9
18
  /**
10
19
  * Retorna se o navegador está em um mobile
11
20
  * @returns {boolean}
@@ -280,6 +289,7 @@ function formatValor(valor = 0, decimalScale = 2, money = true) {
280
289
 
281
290
  module.exports = {
282
291
  addLog,
292
+ addUserSelectNoneInMobile,
283
293
  calcularIdade,
284
294
  colorGain,
285
295
  formatValor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jcinfo-utils",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Pacote de funções utilitárias",
5
5
  "main": "index.js",
6
6
  "scripts": {