1.0.5 • Published 2 years ago

sort-dot-js v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Hello , this is a module for sorting

How to use :

  • install
npm install sort-dot-js
  • config :
const sort = require("sort-dot-js");
  • Numbers, Big to small :
let numbers = [1, 100, 10];
sort.numBigToSmall(numbers);

// out : [100,10,1]
  • Numbers, Small To Big :
let numbers = [1, 100, 10];
sort.numSmallToBig(numbers);

// out : [1,10,100]
  • English, big to small :
let words = ["Circle", "Angel", "Banana"]; // or ['c','a','b']
sort.enBigToSmall(words);

// out : [ 'Angel', 'Banana', 'Circle' ]
  • English, small to big :
let words = ["Circle", "Angel", "Banana"]; // or ['c','a','b']
sort.enSmallToBig(words);

// out : [ 'Circle', 'Banana', 'Angel' ]
  • Persian, big to Small :
let words = ["آسمان", "بابا", "پادری"]; // or ['ا','ب','پ']
sort.peBigToSmall(words);

// out : [ 'پادری', 'بابا', 'آسمان' ]
  • Persian, small to big :
let words = ["آسمان", "بابا", "پادری"]; // or ['ا','ب','پ']
sort.peSmallToBig(words);

// out : [ 'آسمان', 'بابا', 'پادری' ]

Precautions :

  • data type :

Input parameters in methods must be Array type only

  • Words of other languages :‌

You can use english (en/Big/Small) related methods, but it may have errors in some languages and it is not accurate, we identified this error in Persian and developed a proprietary method for it, if you know such language, email me.

About :

  • The purpose of development :

The purpose of creating this library is simply to make sorting operations in JavaScript simple.

  • Does it use the SORT JavaScript method ?

No, this is another algorithm

developer :

The library was developed by Hamidreza Ghahremani\ mail\ telegram

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago