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.7.0 to 0.7.1

26

dist/vue-convenia-util.common.js

@@ -8,2 +8,4 @@ 'use strict';

var moment = _interopDefault(require('moment'));
var normalize = require('normalize-text');
var normalize__default = _interopDefault(normalize);

@@ -365,12 +367,3 @@ /**

var isValid = is(value, 'String');
var chars = [
'àáäâãèéëêìíïîòóöôõùúüûçÀÁÄÂÃÈÉËÊÌÍÏÎÒÓÖÔÕÙÚÜÛÇ',
'aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC'
];
var hasSpecial = new RegExp(chars[0].split('').join('|'), 'g');
var formatted = !isValid ? null : value.replace(hasSpecial, function (char) {
var index = chars[0].indexOf(char);
var clean = chars[1][index];
return clean
});
var formatted = !isValid ? null : normalize.normalizeDiacritics(value);
return formatted

@@ -385,11 +378,10 @@ };

var toSlug = function (value) {
var isValid = is(value, 'String');
var clean = isValid ? toClean(value.toLowerCase()) : null;
var formatted = !isValid ? null : replace(clean, [
[/\\|ß|·|\/|_|,|:|;|\s/g, '-'],
if (!is(value, 'String')) { // Short-circuit to handle all non-string values
return null // and return null.
}
var formatted = replace(normalize__default(value), [
[/&/g, '-e-'],
[/[^\w-]+/g, ''],
[/\W/g, '-'],
[/--+/g, '-'],
[/^-+/, ''],
[/-+$/, '']
[/(^-+)|(-+$)/, '']
]);

@@ -396,0 +388,0 @@ return formatted

import moment from 'moment';
import normalize, { normalizeDiacritics } from 'normalize-text';

@@ -358,12 +359,3 @@ /**

var isValid = is(value, 'String');
var chars = [
'àáäâãèéëêìíïîòóöôõùúüûçÀÁÄÂÃÈÉËÊÌÍÏÎÒÓÖÔÕÙÚÜÛÇ',
'aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC'
];
var hasSpecial = new RegExp(chars[0].split('').join('|'), 'g');
var formatted = !isValid ? null : value.replace(hasSpecial, function (char) {
var index = chars[0].indexOf(char);
var clean = chars[1][index];
return clean
});
var formatted = !isValid ? null : normalizeDiacritics(value);
return formatted

@@ -378,11 +370,10 @@ };

var toSlug = function (value) {
var isValid = is(value, 'String');
var clean = isValid ? toClean(value.toLowerCase()) : null;
var formatted = !isValid ? null : replace(clean, [
[/\\|ß|·|\/|_|,|:|;|\s/g, '-'],
if (!is(value, 'String')) { // Short-circuit to handle all non-string values
return null // and return null.
}
var formatted = replace(normalize(value), [
[/&/g, '-e-'],
[/[^\w-]+/g, ''],
[/\W/g, '-'],
[/--+/g, '-'],
[/^-+/, ''],
[/-+$/, '']
[/(^-+)|(-+$)/, '']
]);

@@ -389,0 +380,0 @@ return formatted

{
"name": "vue-convenia-util",
"version": "0.7.0",
"version": "0.7.1",
"description": "Plugin com validações, formatações e filtros para projetos Vue.",

@@ -48,3 +48,6 @@ "keywords": [

]
},
"dependencies": {
"normalize-text": "^0.2.0"
}
}
import moment from 'moment'
import normalize, { normalizeDiacritics } from 'normalize-text'
import { getDateFormat, replace } from './helpers'

@@ -177,12 +178,3 @@ import { is, isDate } from './validators'

const isValid = is(value, 'String')
const chars = [
'àáäâãèéëêìíïîòóöôõùúüûçÀÁÄÂÃÈÉËÊÌÍÏÎÒÓÖÔÕÙÚÜÛÇ',
'aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC'
]
const hasSpecial = new RegExp(chars[0].split('').join('|'), 'g')
const formatted = !isValid ? null : value.replace(hasSpecial, (char) => {
const index = chars[0].indexOf(char)
const clean = chars[1][index]
return clean
})
const formatted = !isValid ? null : normalizeDiacritics(value)
return formatted

@@ -197,11 +189,10 @@ }

export const toSlug = (value) => {
const isValid = is(value, 'String')
const clean = isValid ? toClean(value.toLowerCase()) : null
const formatted = !isValid ? null : replace(clean, [
[/\\|ß|·|\/|_|,|:|;|\s/g, '-'],
if (!is(value, 'String')) { // Short-circuit to handle all non-string values
return null // and return null.
}
const formatted = replace(normalize(value), [
[/&/g, '-e-'],
[/[^\w-]+/g, ''],
[/\W/g, '-'],
[/--+/g, '-'],
[/^-+/, ''],
[/-+$/, '']
[/(^-+)|(-+$)/, '']
])

@@ -208,0 +199,0 @@ return formatted

Sorry, the diff of this file is not supported yet

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