zhongchengyi

Results 3 comments of zhongchengyi

> This is the function used for comparison: > > ``` > compare: function (a, b) { > return (a === b) ? 0 > : (a > b) ?...

Now , you can set compare function , at [3.2.2](https://github.com/mihaifm/linq/releases/tag/3.2.2) Issue: [#74 ](https://github.com/mihaifm/linq/issues/74) ``` const a= ['2019-10-01', null, '2019-09-12', '2019-09-15', null]; var cf = new Intl.Collator(); Enumerable.from(a).orderBy(x=>x, cf.compare).toArray() ``` output:...

## **warning:** You should have a reasonable initialization parameter,otherwise the result may not be what you want. see [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) ### Example: ``` var cf = new Intl.Collator(); cf.compare(1,2) //=-1 cf.compare(15,2)...