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

abagnale

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abagnale - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

apiary.apib

4

Changelog.md

@@ -0,1 +1,5 @@

# 1.1.2 - 2016-10-27
- Remove `slug` dependency and replace it with `encodeURIComponent`. `slug` was including whole Unicode into final build.
# 1.1.1 - 2016-04-20

@@ -2,0 +6,0 @@

28

lib/abagnale.js

@@ -1,2 +0,3 @@

// A module to forge IDs for Refract elements.
// A safe way to slugify values. If the input is null, undefined, or
// some other error happens downstream, we simply return `unknown`.
'use strict';

@@ -8,22 +9,9 @@

var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
function safeSlug() {
var value = arguments.length <= 0 || arguments[0] === undefined ? 'unknown' : arguments[0];
var _slug = require('slug');
var _slug2 = _interopRequireDefault(_slug);
_slug2['default'].defaults.mode = 'rfc3986';
// A safe way to slugify values. If the input is null, undefined, or
// some other error happens downstream, we simply return `unknown`.
function safeSlug(value) {
var sluggified = undefined;
try {
sluggified = (0, _slug2['default'])(value);
} catch (err) {
sluggified = 'unknown';
}
return sluggified;
return encodeURIComponent(value).toLowerCase().replace(/[!'()*]/g, function (x) {
return '%' + x.charCodeAt(0).toString(16);
}) // RFC 3986 & https://developer.mozilla.org/cs/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
.replace(/%20|%2520/g, '-'); // Swap (encoded) spaces for hyphens
}

@@ -30,0 +18,0 @@

{
"name": "abagnale",
"version": "1.1.1",
"version": "1.1.2",
"description": "Forge unique IDs for Refract data structure elements",

@@ -27,5 +27,4 @@ "main": "lib/abagnale.js",

"dependencies": {
"babel-runtime": "^5.0.0",
"slug": "^0.9.1"
"babel-runtime": "^5.0.0"
}
}

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