Hey Terry,

I do indeed have one!

I probably should add some better documentation for this thing, but if you
include that source, you should be able to do things like this ...

//instantiate the call number class
var loc = new locCallClass();

// unsorted list of call numbers
var range_data = ["HB 74 .M3 A4 1963", "H 1 .E77", "HB 74 .M3 A38"];

//sort the range
range_data.sort(function (a,b) {
return loc.localeCompare(a,b);

If you're looking to store the "normalized" versions of the call numbers
(they're not very pretty to look at) in a spreadsheet, you could use the
method "returnNormLcCall()" ...

loc.returnNormLcCall('DA86 .R52');


loc.returnNormLcCall('DA506.A2 A4');


Let me know if you have any questions about it!


On Fri, Oct 7, 2016 at 2:16 PM, Terry Brady <[log in to unmask]>

> I need a JavaScript function that can normalize an LC Call Number for
> sorting.
> I did a quick search of the list, and I saw some Perl and Python examples.
> Before I attempt to port one of those versions to JavaScript, are you aware
> of any JavaScript versions that already exist?
> Thanks, Terry
> --
> Terry Brady
> Applications Programmer Analyst
> Georgetown University Library Information Technology
> <>
> 425-298-5498 (Seattle, WA)

Ray Voelker
(937) 229-1407
Roesch Library
University of Dayton
300 College Park
Dayton OH, 45469-1360