Socket
Socket
Sign inDemoInstall

alphanum-sort

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

4

lib/compare.js

@@ -18,5 +18,3 @@ var zero = '0'.charCodeAt(0);

module.exports = function (opts, a, b) {
a = a.converted;
b = b.converted;
var checkSign = opts.sign === true;
var checkSign = opts.sign;
var ia = 0;

@@ -23,0 +21,0 @@ var ib = 0;

var compare = require('./compare');
function mediator(a, b) {
return compare(this, a.converted, b.converted);
}
module.exports = function (array, opts) {
if (!Array.isArray(array)) {
array = [];
}
if (typeof opts !== 'object') {
opts = {};
}
if (!Array.isArray(array)) {
array = [];
}
var insensitive = opts.insensitive;
opts.sign = !!opts.sign;
var insensitive = !!opts.insensitive;
var result = [];

@@ -22,3 +27,3 @@ var i, max, value;

result.sort(compare.bind(null, opts));
result.sort(mediator.bind(opts));

@@ -25,0 +30,0 @@ for (i = result.length - 1; ~i; i -= 1) {

{
"name": "alphanum-sort",
"version": "1.0.0",
"version": "1.0.1",
"description": "Alphanumeric sorting algorithm",

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

@@ -0,0 +0,0 @@ # alphanum-sort

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc