New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-slugify

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-slugify - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

16

dist/slugify.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var harmonize = function (text) { return text
exports.__esModule = true;
var stripAccents = function (str) {
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž';
var fixes = 'AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz';
var split = accents.split('').join('|');
var reg = new RegExp("(" + split + ")", 'g');
function replacement(a) {
return fixes[accents.indexOf(a)] || '';
}
return str.replace(reg, replacement).toLowerCase();
};
var harmonize = function (text) { return stripAccents(text)
.toLowerCase()

@@ -37,3 +47,3 @@ .replace(/\s+/g, '-')

};
exports.default = slugify;
exports["default"] = slugify;
//# sourceMappingURL=slugify.js.map

2

package.json
{
"name": "react-slugify",
"version": "1.0.2",
"version": "1.1.0",
"description": "Slugify a React node",

@@ -5,0 +5,0 @@ "main": "dist/slugify.js",

import * as React from 'react';
const harmonize = (text: string) => text
const stripAccents = (str: string): string => {
const accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž';
const fixes = 'AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz';
const split = accents.split('').join('|');
const reg = new RegExp(`(${split})`, 'g');
function replacement(a: string) {
return fixes[accents.indexOf(a)] || '';
}
return str.replace(reg, replacement).toLowerCase();
};
const harmonize = (text: string): string => stripAccents(text)
.toLowerCase()

@@ -5,0 +18,0 @@ .replace(/\s+/g, '-')

{
"compileOnSave": false,
"compilerOptions": {
"target": "es5",
"target": "es3",
"module": "commonjs",

@@ -15,8 +15,12 @@ "jsx": "preserve",

"outDir": "dist",
"declaration": true
"declaration": true,
"lib": [
"es2017"
]
},
"exclude": [
"**/node_modules",
"**/__tests__/**"
"**/__tests__/**",
"dist/**"
]
}

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