javascript-natural-sort

WebJar for javascript-natural-sort

License

License

MIT
Categories

Categories

JavaScript Languages
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

javascript-natural-sort
Last Version

Last Version

0.7.1
Release Date

Release Date

Type

Type

jar
Description

Description

javascript-natural-sort
WebJar for javascript-natural-sort
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/Bill4Time/javascript-natural-sort

Download javascript-natural-sort

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/javascript-natural-sort/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>javascript-natural-sort</artifactId>
    <version>0.7.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/javascript-natural-sort/
implementation 'org.webjars.npm:javascript-natural-sort:0.7.1'
// https://jarcasting.com/artifacts/org.webjars.npm/javascript-natural-sort/
implementation ("org.webjars.npm:javascript-natural-sort:0.7.1")
'org.webjars.npm:javascript-natural-sort:jar:0.7.1'
<dependency org="org.webjars.npm" name="javascript-natural-sort" rev="0.7.1">
  <artifact name="javascript-natural-sort" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='javascript-natural-sort', version='0.7.1')
)
libraryDependencies += "org.webjars.npm" % "javascript-natural-sort" % "0.7.1"
[org.webjars.npm/javascript-natural-sort "0.7.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Simple numerics

>>> ['10',9,2,'1','4'].sort(naturalSort)
['1',2,'4',9,'10']

Floats

>>> ['10.0401',10.022,10.042,'10.021999'].sort(naturalSort)
['10.021999',10.022,'10.0401',10.042]

Float & decimal notation

>>> ['10.04f','10.039F','10.038d','10.037D'].sort(naturalSort)
['10.037D','10.038d','10.039F','10.04f']

Scientific notation

>>> ['1.528535047e5','1.528535047e7','1.528535047e3'].sort(naturalSort)
['1.528535047e3','1.528535047e5','1.528535047e7']

IP addresses

>>> ['192.168.0.100','192.168.0.1','192.168.1.1'].sort(naturalSort)
['192.168.0.1','192.168.0.100','192.168.1.1']

Filenames

>>> ['car.mov','01alpha.sgi','001alpha.sgi','my.string_41299.tif'].sort(naturalSort)
['001alpha.sgi','01alpha.sgi','car.mov','my.string_41299.tif'

Dates

>>> ['10/12/2008','10/11/2008','10/11/2007','10/12/2007'].sort(naturalSort)
['10/11/2007', '10/12/2007', '10/11/2008', '10/12/2008']

Money

>>> ['$10002.00','$10001.02','$10001.01'].sort(naturalSort)
['$10001.01','$10001.02','$10002.00']

Movie Titles

>>> ['1 Title - The Big Lebowski','1 Title - Gattaca','1 Title - Last Picture Show'].sort(naturalSort)
['1 Title - Gattaca','1 Title - Last Picture Show','1 Title - The Big Lebowski']

By default - case-sensitive sorting

>>> ['a', 'B'].sort(naturalSort);
['B', 'a']

To enable case-insensitive sorting

>>> naturalSort.insensitive = true;
>>> ['a', 'B'].sort(naturalSort);
['a', 'B']
org.webjars.npm

Bill4Time

Versions

Version
0.7.1