Socket
Socket
Sign inDemoInstall

alphanum-sort

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alphanum-sort - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

0

lib/compare.js

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

10

lib/index.js

@@ -8,4 +8,4 @@ var compare = require('./compare');

module.exports = function (array, opts) {
if (!Array.isArray(array)) {
array = [];
if (!Array.isArray(array) || array.length < 2) {
return array;
}

@@ -17,3 +17,3 @@ if (typeof opts !== 'object') {

var insensitive = !!opts.insensitive;
var result = [];
var result = Array(array.length);
var i, max, value;

@@ -23,6 +23,6 @@

value = String(array[i]);
result.push({
result[i] = {
value: array[i],
converted: insensitive ? value.toLowerCase() : value
});
};
}

@@ -29,0 +29,0 @@

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

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

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