File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 * Natural Sort algorithm for Javascript - Version 0.8 - Released under MIT license
33 * Author: Jim Palmer (based on chunking idea from Dave Koelle)
44 */
5+ ; ( function ( name , global , undefined ) {
6+ var UNDEFINED = undefined + ''
7+ , FUNCTION = 'function'
8+ ;
9+ (
10+ typeof define !== FUNCTION || ! define . amd ? typeof module != UNDEFINED && module . exports
11+ // CommonJS
12+ ? function ( deps , factory ) { module . exports = factory ( ) ; }
13+ // Browser
14+ : function ( deps , factory ) { global [ name ] = factory ( ) ; }
15+ // AMD
16+ : define
17+ )
18+ /*define*/ ( [ ] , function factory ( ) {
19+
520function naturalSort ( a , b ) {
621 var re = / ( ^ ( [ + \- ] ? (?: \d * ) (?: \. \d * ) ? (?: [ e E ] [ + \- ] ? \d + ) ? ) ? $ | ^ 0 x [ \d a - f A - F ] + $ | \d + ) / g,
722 sre = / ^ \s + | \s + $ / g, // trim pre-post whitespace
@@ -47,3 +62,8 @@ function naturalSort (a, b) {
4762 }
4863 return 0 ;
4964}
65+
66+ return naturalSort ;
67+ } ) ;
68+ }
69+ ( 'naturalSort' , typeof self == 'undefined' ? typeof global == 'undefined' ? this : global : self ) ) ;
You can’t perform that action at this time.
0 commit comments