🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@types/javascript-natural-sort

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/javascript-natural-sort

TypeScript definitions for javascript-natural-sort

ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
0.7.0
Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/javascript-natural-sort

Summary

This package contains type definitions for javascript-natural-sort (https://github.com/Bill4Time/javascript-natural-sort).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/javascript-natural-sort.

index.d.ts

/**
 * Natural sort comparison function for use with Array.sort().
 * Sorts strings containing numbers in a human-friendly way.
 *
 * @param a - First value to compare
 * @param b - Second value to compare
 * @returns Negative if a < b, positive if a > b, zero if equal
 *
 * @example
 * ```javascript
 * var naturalSort = require('javascript-natural-sort');
 *
 * ['img12', 'img10', 'img2', 'img1'].sort(naturalSort);
 * // => ['img1', 'img2', 'img10', 'img12']
 * ```
 */
declare function naturalSort(a: string | number, b: string | number): number;

declare namespace naturalSort {
    /**
     * Set to true to enable case-insensitive sorting.
     * @default false
     */
    let insensitive: boolean;
}

export = naturalSort;

Additional Details

  • Last updated: Wed, 04 Feb 2026 18:45:32 GMT
  • Dependencies: none

Credits

These definitions were written by gaspard.

FAQs

Package last updated on 04 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts