Socket
Socket
Sign inDemoInstall

normalize-shorthands

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalize-shorthands - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

index.js

@@ -110,6 +110,6 @@

if (file = uri.replace(/^\//, '')) {
// index.js support
// index support
if (file.slice(-1) === '/') file += 'index.' + ext
// must always be this extension!
if (file.slice(-3) !== '.' + ext) file += '.' + ext
if (file.slice(-1 - ext.length) !== '.' + ext) file += '.' + ext
}

@@ -116,0 +116,0 @@

{
"name": "normalize-shorthands",
"description": "shorthand URIs for normalize",
"version": "0.1.4",
"version": "0.1.5",
"author": {

@@ -6,0 +6,0 @@ "name": "Jonathan Ong",

@@ -60,2 +60,15 @@

// other extensions
;[
['component/emitter@1', '/github/component/emitter/1/index.css'],
['component/emitter@1/', '/github/component/emitter/1/index.css'],
['component/emitter@1/index', '/github/component/emitter/1/index.css'],
['component/emitter@1/index.css', '/github/component/emitter/1/index.css'],
].forEach(function (pair) {
assert.equal(
shorthand(pair[0], 'css'),
'https://nlz.io' + pair[1],
pair[0] + ' !== ' + pair[1] + ', got ' + shorthand(pair[0], 'css'))
})
// fragments -> shorthand

@@ -83,13 +96,2 @@ ;[

// other extensions
assert.equal(
shorthand('component/emitter@1', 'css'),
'https://nlz.io/github/component/emitter/1/index.css')
assert.equal(
shorthand('component/emitter@1/', 'css'),
'https://nlz.io/github/component/emitter/1/index.css')
assert.equal(
shorthand('component/emitter@1/index', 'css'),
'https://nlz.io/github/component/emitter/1/index.css')
console.log('All tests pass!')
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