You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@storybook/router

Package Overview
Dependencies
Maintainers
10
Versions
1650
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.0-alpha.1 to 5.1.0-alpha.2

5

dist/tests/id.test.js

@@ -7,6 +7,9 @@ import { toId } from '../utils';

['handles simple cases', 'kind', 'story', 'kind--story'],
['handles basic substitution', 'a b$c?d😀e', '1-2:3', 'a-b-c-d-e--1-2-3'],
['handles basic substitution', 'a b$c?d😀e', '1-2:3', 'a-b-c-d😀e--1-2-3'],
['handles runs of non-url chars', 'a?&*b', 'story', 'a-b--story'],
['removes non-url chars from start and end', '?ab-', 'story', 'ab--story'],
['downcases', 'KIND', 'STORY', 'kind--story'],
['non-latin', 'Кнопки', 'нормальный', 'кнопки--нормальный'],
['korean', 'kind', '바보 (babo)', 'kind--바보-babo'],
['all punctuation', 'kind', 'unicorns,’–—―′¿`"<>()!.!!!{}[]%^&$*#&', 'kind--unicorns'],
].forEach(([name, kind, story, output]) => {

@@ -13,0 +16,0 @@ it(name, () => {

3

dist/utils.js

@@ -10,6 +10,7 @@ "use strict";

var splitPath = /\/([^/]+)\/([^/]+)?/;
// Remove punctuation https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a
exports.sanitize = function (string) {
return string
.toLowerCase()
.replace(/[^a-z0-9-]/g, '-')
.replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, '-')
.replace(/-+/g, '-')

@@ -16,0 +17,0 @@ .replace(/^-+/, '')

{
"name": "@storybook/router",
"version": "5.1.0-alpha.1",
"version": "5.1.0-alpha.2",
"description": "Core Storybook Router",

@@ -24,3 +24,4 @@ "keywords": [

"@reach/router": "^1.2.1",
"@storybook/theming": "5.1.0-alpha.1",
"@storybook/theming": "5.1.0-alpha.2",
"core-js": "^2.6.5",
"global": "^4.3.2",

@@ -37,3 +38,3 @@ "memoizerific": "^1.11.3",

},
"gitHead": "ed9b342742fadd5005f84bec846c0537bc13b4d5"
"gitHead": "394cc916377ea71bfce7f3d9fc1e4c9f154f02bd"
}

@@ -7,6 +7,9 @@ import { toId } from '../utils';

['handles simple cases', 'kind', 'story', 'kind--story'],
['handles basic substitution', 'a b$c?d😀e', '1-2:3', 'a-b-c-d-e--1-2-3'],
['handles basic substitution', 'a b$c?d😀e', '1-2:3', 'a-b-c-d😀e--1-2-3'],
['handles runs of non-url chars', 'a?&*b', 'story', 'a-b--story'],
['removes non-url chars from start and end', '?ab-', 'story', 'ab--story'],
['downcases', 'KIND', 'STORY', 'kind--story'],
['non-latin', 'Кнопки', 'нормальный', 'кнопки--нормальный'],
['korean', 'kind', '바보 (babo)', 'kind--바보-babo'],
['all punctuation', 'kind', 'unicorns,’–—―′¿`"<>()!.!!!{}[]%^&$*#&', 'kind--unicorns'],
].forEach(([name, kind, story, output]) => {

@@ -13,0 +16,0 @@ it(name, () => {

@@ -12,6 +12,7 @@ import qs from 'qs';

// Remove punctuation https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a
export const sanitize = (string: string) => {
return string
.toLowerCase()
.replace(/[^a-z0-9-]/g, '-')
.replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, '-')
.replace(/-+/g, '-')

@@ -18,0 +19,0 @@ .replace(/^-+/, '')

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc