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

vbb-util

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vbb-util - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "vbb-util",
"description": "JavaScript utilites for the VBB API client.",
"version": "0.1.0",
"version": "0.2.0",
"main": "./src/index",

@@ -6,0 +6,0 @@ "keywords": [

@@ -7,4 +7,30 @@ module.exports = {

tokenize: function (string) {
return string;
searchableName: function (name) {
return name
// German umlauts
.replace(/ß/g, 'ss')
.replace(/ä/g, 'ae')
.replace(/ö/g, 'oe')
.replace(/ü/g, 'ue')
// remove abbreviations
.replace(/^[SU](\+[SU])?\W/, ' ')
// expand abbreviations
.toLowerCase()
.replace(/\(pl\)/g, ' polen ')
.replace(/\(berlin\)/g, ' berlin ')
.replace(/\(bln\)/g, ' berlin ')
.replace(/str\.?$/, 'strasse')
.replace(/str\.?\W/g, 'strasse ')
.replace(/bhf\.?$/, 'bahnhof')
.replace(/bhf\.?\W/g, 'bahnhof ')
// special chars
.replace(/[^\w\s]/g, ' ')
.replace(/_/g, ' ')
.replace(/\s{2,}/g, ' ')
.trim();
},

@@ -11,0 +37,0 @@

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