check out my latest app: Online Check
and my latest blog post
Alphabetically sort an array of strings
License: MIT License
check out my latest app: Online Check
and my latest blog post
The words "the", "a", and "an" don't usually make a difference in terms of order. (See wikipedia)
What do you think of adding support for case-insensitive sorting?
Per MDN recommendation:
When comparing large numbers of strings, such as in sorting large arrays, it is better to create an Intl.Collator object and use the function provided by its compare property.
Will also need a fallback for older Node versions and the browser.
Hello, im trying to use Alpha-sort for my TS project.
But I'm getting an error:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Users\thatguyjamal\Desktop\WorkSpace\Temrinal-ts\shell\node_modules\alpha-sort\index.js
require() of ES modules is not supported.
Now sure why I'm getting this when I imported it correctly.
The code I'm using AS on is here. Line 2, 47
Isn't this 'a'.localeCompare('å') === -1 always be true and we ended up using the fallback always?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.