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

mediawiki-title

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mediawiki-title - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

1

lib/index.js

@@ -365,2 +365,3 @@ "use strict";

title = title.substr(1).replace(/^_+/, '');
defaultNs = 0;
}

@@ -367,0 +368,0 @@

2

package.json
{
"name": "mediawiki-title",
"version": "0.6.1",
"version": "0.6.2",
"description": "Title normalization library for mediawiki",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -284,8 +284,11 @@ 'use strict';

var testCases = [
[ undefined, 'Example.svg', 'Example.svg'],
[ 0, 'Example.svg', 'Example.svg'],
[ 6, 'Example.svg', 'File:Example.svg'],
[ undefined, 'File:Example.svg', 'File:Example.svg'],
[ 6, 'File:Example.svg', 'File:Example.svg'],
[ 2, 'File:Example.svg', 'File:Example.svg'],
[ undefined, 'Example.svg', 0, 'Example.svg' ],
[ 0, 'Example.svg', 0, 'Example.svg' ],
[ 6, 'Example.svg', 6, 'File:Example.svg' ],
[ undefined, 'File:Example.svg', 6, 'File:Example.svg' ],
[ 6, 'File:Example.svg', 6, 'File:Example.svg' ],
[ 2, 'File:Example.svg', 6, 'File:Example.svg' ],
[ 2, 'Test', 2, 'User:Test' ],
[ 2, ':Test', 0, 'Test' ],
[ 0, ':User:Test', 2, 'User:Test' ],
];

@@ -296,6 +299,8 @@ testCases.forEach(function (test) {

.then(function(siteInfo) {
return Title.newFromText(test[1], siteInfo, test[0]).getPrefixedDBKey();
var t = Title.newFromText(test[1], siteInfo, test[0]);
return [t.getNamespace()._id, t.getPrefixedDBKey()];
})
.then(function(res) {
assert.deepEqual(res, test[2]);
assert.deepEqual(res[0], test[2])
assert.deepEqual(res[1], test[3]);
});

@@ -302,0 +307,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