Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-convenia-util

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-convenia-util - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.travis.yml

289

dist/vue-convenia-util.common.js

@@ -10,2 +10,71 @@ 'use strict';

/**
* Valida se o construtor do valor é o especificado.
* @example ```
* (12, 'Number') => true
* ({ name: 'Lucas' }, 'Object') => true
* ([2, 3], 'Set') => false
* ```
* @param {*} value
* @param {String} constructor
* @returns {Boolean}
*/
var is = function (value, constructor) {
var isEquals = constructor === getConstructor(value);
return isEquals
};
var isCPF = function (cpf) {
var isInvalid = function (cpf, rest, pos) { return rest !== parseInt(cpf.substring(pos, pos + 1)); };
var sumDigit = function (cpf, digit) { return 11 - (cpf.substring(0, digit).split('').reduce(function (acc, curr, index) {
acc += parseInt(curr) * ((digit + 1) - index);
return acc
}, 0) % 11); };
var getRest = function (sum) { return sum > 9 ? 0 : sum; };
if (!is(cpf, 'String')) { return false }
cpf = cpf.replace(/[\D]/gi, '');
if (!cpf.match(/^\d+$/)) { return false }
if (cpf === '00000000000' || cpf.length !== 11) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 9)), 9)) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 10)), 10)) { return false }
return true
};
/**
* Valida se é uma data com o formato especificado ou, quando não especificado,
* valida se é um dos formatos 'DD/MM/YYYY', 'DD-MM-YYYY' e 'YYYY-MM-DD'.
* @example ```
* ('3/102/2006') => false
* ('31/02/2006') => false
* ('21/12/2006') => true
* ('21/12/2006', 'YYYY-MM-DD') => false
* ```
* @param {String} date
* @param {String} [format]
* @returns {Boolean}
*/
var isDate = function (date, format) {
if ( format === void 0 ) format = null;
var from = format || getDateFormat(date);
var isValid = from ? moment(date, format).isValid() : false;
return isValid
};
var $validate = Object.freeze({
is: is,
isCPF: isCPF,
isDate: isDate
});
/**
* Obtém o formato da data ou null se não for possível identificar.

@@ -23,3 +92,3 @@ * @example ```

var getDateFormat = function (date) {
var isValid = typeof date === 'string' && date.trim().length === 10;
var isValid = is(date, 'String') && date.trim().length === 10;
var format = !isValid ? null

@@ -34,32 +103,116 @@ : /^\d{4}-\d{2}-\d{2}$/.test(date) ? 'YYYY-MM-DD'

var toCPF = function (rawString) {
return rawString
.replace(/\D/g, '')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d{1,2})$/, '$1-$2')
/**
* Obtém o construtor do valor.
* @param {*} value
* @returns {String}
*/
var getConstructor = function (value) {
var string = Object.prototype.toString.call(value);
var ref = /\[object (.*?)\]/.exec(string);
var constructor = ref[1];
return constructor
};
var toRG = function (rawString) {
return rawString
.replace(/\D/g, '')
.replace(/(\d{2})(\d)/, '$1.$2')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d{1})$/, '$1-$2')
/**
* Usando um valor inicial, encadeia uma função e retorna seu resultado.
* @param {A} initial
* @param {function(A):function} callback
* @param {Array.<*>} params
* @returns {B}
* @template A, B
*/
var chain = function (initial, callback, params) {
var value = params.reduce(function (value, args) {
return callback(value).apply(value, [].concat( args ))
}, initial);
return value
};
var toMoney = function (rawString) {
return 'R$ ' + rawString.toFixed(2)
.replace('.', ',')
.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.')
/**
* Faz em forma de corrente o replace do texto usando os argumentos especificados.
* @param {String} text
* @param {Array.<*>} args
* @returns {String}
*/
var replace = function (text, args) { return chain(text, function (text) { return text.replace; }, args); };
/**
* Transforma um valor para a formatação de CPF.
* @example ```
* ('00000000000') => '000.000.000-00'
* ('12345678') => '123.456.78'
* ('Abacaxi') => null
* ```
* @param {String} cpf
* @returns {String}
*/
var toCPF = function (cpf) {
var isValid = is(cpf, 'String') && /\d/.test(cpf);
var formatted = !isValid ? null : replace(cpf, [
[/\D/g, ''],
[/(\d{3})(\d)/, '$1.$2'],
[/(\d{3})(\d)/, '$1.$2'],
[/(\d{3})(\d{1,2})$/, '$1-$2']
]);
return formatted
};
var toAge = function (date) {
var YEAR = 31557600000; // 1000ms * 3600s * 24d * 365.25
var birthdate = +new Date(date);
var age = ~~((Date.now() - birthdate) / YEAR);
return age
/**
* Transforma um valor para a formatação de RG.
* @example ```
* ('000000000') => '00.000.000-0'
* ('12345678') => '123.456.78'
* ('Abacaxi') => null
* ```
* @param {String} rg
* @returns {String}
*/
var toRG = function (rg) {
var isValid = is(rg, 'String') && /\d/.test(rg);
var formatted = !isValid ? null : replace(rg, [
[/[^\d|A|B|X]/g, ''],
[/(\d{2})(\d)/, '$1.$2'],
[/(\d{3})(\d)/, '$1.$2'],
[/(\d{3})(\d{1})$/, '$1-$2']
]);
return formatted
};
/**
* Formata um valor para a formatação de moeda.
* @example ```
* ('1200') => 'R$ 1.200,00'
* (15.50) => 'R$ 15,50'
* ('Abacaxi') => null
* ```
* @param {String} number
* @returns {String}
*/
var toMoney = function (number) {
var isValid = is(number, 'Number') || (is(number, 'String') && !isNaN(number));
var formatted = !isValid ? null : 'R$ ' + replace(+(number).toFixed(2), [
['.', ','],
[/(\d)(?=(\d{3})+(?!\d))/g, '$1.']
]);
return formatted
};
/**
* Obtém a quantidade de anos a partir da data.
* @example ```
* ('21-12-2006') => 10
* ('2000-12-21') => 16
* ('Abacaxi') => null
* ```
* @param {String} date
* @returns {Number}
*/
var toYears = function (date) {
var from = moment(toDate(date), 'DD/MM/YYYY');
var years = moment().diff(from, 'years');
return years
};
/**
* Formata uma data 'YYYY-MM-DD' ou 'DD-MM-YYYY' em 'DD/MM/YYYY'. Transforma

@@ -69,7 +222,7 @@ * a data em 'YYYY-MM-DD' caso o segundo parâmetro seja "true".

* ('21-12-2006') => '21/12/2006'
* ('2006-12-12') => '21/12/2006'
* ('2006-12-21') => '21/12/2006'
* ('21/12/2006') => '21/12/2006'
* ('21/12/2006', true) => '2006-12-21'
* ('21-12-2006', true) => '2006-12-21'
* ('2006-12-21', true) => '2006-12-21'
* ('2006/12/21') => null
* ```

@@ -84,9 +237,22 @@ * @param {String} date

var from = getDateFormat(date);
var isValid = !!from;
var to = toDatabase ? 'YYYY-MM-DD' : 'DD/MM/YYYY';
var notNeeded = !from || (from === 'YYYY-MM-DD' && toDatabase) || (from === 'DD/MM/YYYY' && !toDatabase);
var formatted = notNeeded ? date : moment(date, from).format(to);
var formatted = !isValid ? null : moment(date, from).format(to);
return formatted
};
/**
* Faz uma verificação simples e coloca o caractere para vazio caso o valor seja
* vazio (null, undefined, '').
* @param {*} value
* @param {String} char
* @returns {String}
*/
var toEmpty = function (value, char) {
if ( char === void 0 ) char = '-';
return value || char;
};
var $format = Object.freeze({

@@ -96,60 +262,25 @@ toCPF: toCPF,

toMoney: toMoney,
toAge: toAge,
toDate: toDate
toYears: toYears,
toDate: toDate,
toEmpty: toEmpty
});
var isCPF = function (cpf) {
var isInvalid = function (cpf, rest, pos) { return rest !== parseInt(cpf.substring(pos, pos + 1)); };
/**
* Opções do plugin.
* @typedef {Object} Options
* @property {Boolean} formatters
* @property {Boolean} formatFilters
* @property {Boolean} validators
*/
var sumDigit = function (cpf, digit) { return 11 - (cpf.substring(0, digit).split('').reduce(function (acc, curr, index) {
acc += parseInt(curr) * ((digit + 1) - index);
return acc
}, 0) % 11); };
var getRest = function (sum) { return sum > 9 ? 0 : sum; };
cpf = cpf.replace(/[\D]/gi, '');
if (!cpf.match(/^\d+$/)) { return false }
if (cpf === '00000000000' || cpf.length !== 11) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 9)), 9)) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 10)), 10)) { return false }
return true
};
/**
* Valida se é uma data com o formato especificado ou, quando não especificado,
* valida se é um dos formatos 'DD/MM/YYYY', 'DD-MM-YYYY' e 'YYYY-MM-DD'.
* @example ```
* ('3/102/2006') => false
* ('31/02/2006') => false
* ('21/12/2006') => true
* ('21/12/2006', 'YYYY-MM-DD') => false
* ```
* @param {String} date
* @param {String} [format]
* @returns {Boolean}
* Adiciona as funções auxiliares definidas no protótipo do Vue, e
* consequentemente aos componentes.
* @param {Vue} Vue
* @param {Options} options
*/
var isDate = function (date, format) {
if ( format === void 0 ) format = null;
var from = format || getDateFormat(date);
var isValid = from ? moment(date, format).isValid() : false;
return isValid
};
var $validation = Object.freeze({
isCPF: isCPF,
isDate: isDate
});
var install = function (Vue, options) {
if ( options === void 0 ) options = {};
if (options.formaters) {
if (options.formatters) {
Vue.prototype.$format = $format;

@@ -165,4 +296,4 @@ }

if (options.validations) {
Vue.prototype.$validation = $validation;
if (options.validators) {
Vue.prototype.$validate = $validate;
}

@@ -172,3 +303,3 @@ };

exports.format = $format;
exports.validation = $validation;
exports.validate = $validate;
exports['default'] = install;
import moment from 'moment';
/**
* Valida se o construtor do valor é o especificado.
* @example ```
* (12, 'Number') => true
* ({ name: 'Lucas' }, 'Object') => true
* ([2, 3], 'Set') => false
* ```
* @param {*} value
* @param {String} constructor
* @returns {Boolean}
*/
var is = function (value, constructor) {
var isEquals = constructor === getConstructor(value);
return isEquals
};
var isCPF = function (cpf) {
var isInvalid = function (cpf, rest, pos) { return rest !== parseInt(cpf.substring(pos, pos + 1)); };
var sumDigit = function (cpf, digit) { return 11 - (cpf.substring(0, digit).split('').reduce(function (acc, curr, index) {
acc += parseInt(curr) * ((digit + 1) - index);
return acc
}, 0) % 11); };
var getRest = function (sum) { return sum > 9 ? 0 : sum; };
if (!is(cpf, 'String')) { return false }
cpf = cpf.replace(/[\D]/gi, '');
if (!cpf.match(/^\d+$/)) { return false }
if (cpf === '00000000000' || cpf.length !== 11) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 9)), 9)) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 10)), 10)) { return false }
return true
};
/**
* Valida se é uma data com o formato especificado ou, quando não especificado,
* valida se é um dos formatos 'DD/MM/YYYY', 'DD-MM-YYYY' e 'YYYY-MM-DD'.
* @example ```
* ('3/102/2006') => false
* ('31/02/2006') => false
* ('21/12/2006') => true
* ('21/12/2006', 'YYYY-MM-DD') => false
* ```
* @param {String} date
* @param {String} [format]
* @returns {Boolean}
*/
var isDate = function (date, format) {
if ( format === void 0 ) format = null;
var from = format || getDateFormat(date);
var isValid = from ? moment(date, format).isValid() : false;
return isValid
};
var $validate = Object.freeze({
is: is,
isCPF: isCPF,
isDate: isDate
});
/**
* Obtém o formato da data ou null se não for possível identificar.

@@ -16,3 +85,3 @@ * @example ```

var getDateFormat = function (date) {
var isValid = typeof date === 'string' && date.trim().length === 10;
var isValid = is(date, 'String') && date.trim().length === 10;
var format = !isValid ? null

@@ -27,32 +96,116 @@ : /^\d{4}-\d{2}-\d{2}$/.test(date) ? 'YYYY-MM-DD'

var toCPF = function (rawString) {
return rawString
.replace(/\D/g, '')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d{1,2})$/, '$1-$2')
/**
* Obtém o construtor do valor.
* @param {*} value
* @returns {String}
*/
var getConstructor = function (value) {
var string = Object.prototype.toString.call(value);
var ref = /\[object (.*?)\]/.exec(string);
var constructor = ref[1];
return constructor
};
var toRG = function (rawString) {
return rawString
.replace(/\D/g, '')
.replace(/(\d{2})(\d)/, '$1.$2')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d{1})$/, '$1-$2')
/**
* Usando um valor inicial, encadeia uma função e retorna seu resultado.
* @param {A} initial
* @param {function(A):function} callback
* @param {Array.<*>} params
* @returns {B}
* @template A, B
*/
var chain = function (initial, callback, params) {
var value = params.reduce(function (value, args) {
return callback(value).apply(value, [].concat( args ))
}, initial);
return value
};
var toMoney = function (rawString) {
return 'R$ ' + rawString.toFixed(2)
.replace('.', ',')
.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.')
/**
* Faz em forma de corrente o replace do texto usando os argumentos especificados.
* @param {String} text
* @param {Array.<*>} args
* @returns {String}
*/
var replace = function (text, args) { return chain(text, function (text) { return text.replace; }, args); };
/**
* Transforma um valor para a formatação de CPF.
* @example ```
* ('00000000000') => '000.000.000-00'
* ('12345678') => '123.456.78'
* ('Abacaxi') => null
* ```
* @param {String} cpf
* @returns {String}
*/
var toCPF = function (cpf) {
var isValid = is(cpf, 'String') && /\d/.test(cpf);
var formatted = !isValid ? null : replace(cpf, [
[/\D/g, ''],
[/(\d{3})(\d)/, '$1.$2'],
[/(\d{3})(\d)/, '$1.$2'],
[/(\d{3})(\d{1,2})$/, '$1-$2']
]);
return formatted
};
var toAge = function (date) {
var YEAR = 31557600000; // 1000ms * 3600s * 24d * 365.25
var birthdate = +new Date(date);
var age = ~~((Date.now() - birthdate) / YEAR);
return age
/**
* Transforma um valor para a formatação de RG.
* @example ```
* ('000000000') => '00.000.000-0'
* ('12345678') => '123.456.78'
* ('Abacaxi') => null
* ```
* @param {String} rg
* @returns {String}
*/
var toRG = function (rg) {
var isValid = is(rg, 'String') && /\d/.test(rg);
var formatted = !isValid ? null : replace(rg, [
[/[^\d|A|B|X]/g, ''],
[/(\d{2})(\d)/, '$1.$2'],
[/(\d{3})(\d)/, '$1.$2'],
[/(\d{3})(\d{1})$/, '$1-$2']
]);
return formatted
};
/**
* Formata um valor para a formatação de moeda.
* @example ```
* ('1200') => 'R$ 1.200,00'
* (15.50) => 'R$ 15,50'
* ('Abacaxi') => null
* ```
* @param {String} number
* @returns {String}
*/
var toMoney = function (number) {
var isValid = is(number, 'Number') || (is(number, 'String') && !isNaN(number));
var formatted = !isValid ? null : 'R$ ' + replace(+(number).toFixed(2), [
['.', ','],
[/(\d)(?=(\d{3})+(?!\d))/g, '$1.']
]);
return formatted
};
/**
* Obtém a quantidade de anos a partir da data.
* @example ```
* ('21-12-2006') => 10
* ('2000-12-21') => 16
* ('Abacaxi') => null
* ```
* @param {String} date
* @returns {Number}
*/
var toYears = function (date) {
var from = moment(toDate(date), 'DD/MM/YYYY');
var years = moment().diff(from, 'years');
return years
};
/**
* Formata uma data 'YYYY-MM-DD' ou 'DD-MM-YYYY' em 'DD/MM/YYYY'. Transforma

@@ -62,7 +215,7 @@ * a data em 'YYYY-MM-DD' caso o segundo parâmetro seja "true".

* ('21-12-2006') => '21/12/2006'
* ('2006-12-12') => '21/12/2006'
* ('2006-12-21') => '21/12/2006'
* ('21/12/2006') => '21/12/2006'
* ('21/12/2006', true) => '2006-12-21'
* ('21-12-2006', true) => '2006-12-21'
* ('2006-12-21', true) => '2006-12-21'
* ('2006/12/21') => null
* ```

@@ -77,9 +230,22 @@ * @param {String} date

var from = getDateFormat(date);
var isValid = !!from;
var to = toDatabase ? 'YYYY-MM-DD' : 'DD/MM/YYYY';
var notNeeded = !from || (from === 'YYYY-MM-DD' && toDatabase) || (from === 'DD/MM/YYYY' && !toDatabase);
var formatted = notNeeded ? date : moment(date, from).format(to);
var formatted = !isValid ? null : moment(date, from).format(to);
return formatted
};
/**
* Faz uma verificação simples e coloca o caractere para vazio caso o valor seja
* vazio (null, undefined, '').
* @param {*} value
* @param {String} char
* @returns {String}
*/
var toEmpty = function (value, char) {
if ( char === void 0 ) char = '-';
return value || char;
};
var $format = Object.freeze({

@@ -89,60 +255,25 @@ toCPF: toCPF,

toMoney: toMoney,
toAge: toAge,
toDate: toDate
toYears: toYears,
toDate: toDate,
toEmpty: toEmpty
});
var isCPF = function (cpf) {
var isInvalid = function (cpf, rest, pos) { return rest !== parseInt(cpf.substring(pos, pos + 1)); };
/**
* Opções do plugin.
* @typedef {Object} Options
* @property {Boolean} formatters
* @property {Boolean} formatFilters
* @property {Boolean} validators
*/
var sumDigit = function (cpf, digit) { return 11 - (cpf.substring(0, digit).split('').reduce(function (acc, curr, index) {
acc += parseInt(curr) * ((digit + 1) - index);
return acc
}, 0) % 11); };
var getRest = function (sum) { return sum > 9 ? 0 : sum; };
cpf = cpf.replace(/[\D]/gi, '');
if (!cpf.match(/^\d+$/)) { return false }
if (cpf === '00000000000' || cpf.length !== 11) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 9)), 9)) { return false }
if (isInvalid(cpf, getRest(sumDigit(cpf, 10)), 10)) { return false }
return true
};
/**
* Valida se é uma data com o formato especificado ou, quando não especificado,
* valida se é um dos formatos 'DD/MM/YYYY', 'DD-MM-YYYY' e 'YYYY-MM-DD'.
* @example ```
* ('3/102/2006') => false
* ('31/02/2006') => false
* ('21/12/2006') => true
* ('21/12/2006', 'YYYY-MM-DD') => false
* ```
* @param {String} date
* @param {String} [format]
* @returns {Boolean}
* Adiciona as funções auxiliares definidas no protótipo do Vue, e
* consequentemente aos componentes.
* @param {Vue} Vue
* @param {Options} options
*/
var isDate = function (date, format) {
if ( format === void 0 ) format = null;
var from = format || getDateFormat(date);
var isValid = from ? moment(date, format).isValid() : false;
return isValid
};
var $validation = Object.freeze({
isCPF: isCPF,
isDate: isDate
});
var install = function (Vue, options) {
if ( options === void 0 ) options = {};
if (options.formaters) {
if (options.formatters) {
Vue.prototype.$format = $format;

@@ -158,7 +289,7 @@ }

if (options.validations) {
Vue.prototype.$validation = $validation;
if (options.validators) {
Vue.prototype.$validate = $validate;
}
};
export { $format as format, $validation as validation };export default install;
export { $format as format, $validate as validate };export default install;
{
"name": "vue-convenia-util",
"version": "0.1.0",
"version": "0.2.0",
"description": "Plugin com validações, formatações e filtros para projetos Vue.",

@@ -21,10 +21,13 @@ "keywords": [

"scripts": {
"lint": "standard",
"test": "npm run lint && poi ./test/index.js",
"build": "bili ./src/index.js --format es --format cjs --exports named"
"test": "standard ./ && ava ./test/*.test.js",
"test:watch": "ava ./test/*.test.js --verbose --watch",
"build": "bili ./src/index.js --format es --format cjs --exports named",
"prepublish": "npm run build && npm run test"
},
"devDependencies": {
"ava": "^0.22.0",
"bili": "^0.17.4",
"moment": "^2.18.1",
"poi": "^9.2.4",
"sinon": "^3.2.1",
"standard": "^10.0.3",

@@ -37,2 +40,3 @@ "vue": "^2.4.2"

"standard": {
"env": "mocha",
"ignore": [

@@ -39,0 +43,0 @@ "dist/vue-convenia-util.common.js",

# Vue Convenia Util
[![Build Status][0]][1]
Plugin com validações, formatações e filtros para projetos Vue.

@@ -23,3 +25,3 @@

Vue.use(Util, {
format: true,
formatters: true,
formatFilters: true

@@ -45,4 +47,6 @@ })

}
.gitignore
}
```
[0]: https://travis-ci.org/convenia/vue-convenia-util.svg?branch=master
[1]: https://travis-ci.org/convenia/vue-convenia-util

@@ -0,1 +1,3 @@

import { is } from './validators'
/**

@@ -14,3 +16,3 @@ * Obtém o formato da data ou null se não for possível identificar.

export const getDateFormat = (date) => {
const isValid = typeof date === 'string' && date.trim().length === 10
const isValid = is(date, 'String') && date.trim().length === 10
const format = !isValid ? null

@@ -24,1 +26,36 @@ : /^\d{4}-\d{2}-\d{2}$/.test(date) ? 'YYYY-MM-DD'

}
/**
* Obtém o construtor do valor.
* @param {*} value
* @returns {String}
*/
export const getConstructor = (value) => {
const string = Object.prototype.toString.call(value)
const [ , constructor ] = /\[object (.*?)\]/.exec(string)
return constructor
}
/**
* Usando um valor inicial, encadeia uma função e retorna seu resultado.
* @param {A} initial
* @param {function(A):function} callback
* @param {Array.<*>} params
* @returns {B}
* @template A, B
*/
export const chain = (initial, callback, params) => {
const value = params.reduce((value, args) => {
return callback(value).apply(value, [...args])
}, initial)
return value
}
/**
* Faz em forma de corrente o replace do texto usando os argumentos especificados.
* @param {String} text
* @param {Array.<*>} args
* @returns {String}
*/
export const replace = (text, args) => chain(text, text => text.replace, args)

@@ -1,10 +0,24 @@

import * as $format from './formaters'
import * as $validation from './validations'
import * as $format from './formatters'
import * as $validate from './validators'
export { $format as format }
export { $validation as validation }
export { $validate as validate }
/**
* Opções do plugin.
* @typedef {Object} Options
* @property {Boolean} formatters
* @property {Boolean} formatFilters
* @property {Boolean} validators
*/
/**
* Adiciona as funções auxiliares definidas no protótipo do Vue, e
* consequentemente aos componentes.
* @param {Vue} Vue
* @param {Options} options
*/
const install = (Vue, options = {}) => {
if (options.formaters) {
if (options.formatters) {
Vue.prototype.$format = $format

@@ -20,4 +34,4 @@ }

if (options.validations) {
Vue.prototype.$validation = $validation
if (options.validators) {
Vue.prototype.$validate = $validate
}

@@ -24,0 +38,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc