@putout/plugin-apply-to-sorted
v1.0.1
Published
šPutout plugin adds ability to apply 'toSorted()'
Maintainers
Readme
@putout/plugin-apply-to-sorted 
The
toSorted()method ofArrayinstances is the copying version of thesort()method. It returns a new array with the elements sorted in ascending order. (c) MDN
šPutout plugin adds ability to apply toSorted.
Checkout in šPutout Editor.
Install
npm i @putout/plugin-apply-to-sortedRule
{
"rules": {
"apply-to-sorted": "on"
}
}ā Example of incorrect code
[...a].sort((a, b) => a - b);ā Example of correct code
a.toSorted((a, b) => a - b);License
MIT
