This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a number from a given string. It ignores any characters, including | |
* comma's and points. When more than 1 number is found in a string, the last | |
* number is used as the fractional of the number. For example: | |
* | |
* '€ 12,34' => 12.34 | |
* '1,234.567 %' => 1234.567 | |
* | |
* @argument {string} text - text containing the number or number parts | |
* @returns {number|undefined} - parsed number or undefined when none found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ArrayOrdering | |
# Returns clone of the array with subject moved into the new idx | |
def self.move_to_position(_list, subject, new_idx) | |
old_idx = _list.index(subject) | |
return _list unless old_idx != new_idx | |
list = _list.clone | |
if old_idx.nil? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Based on: | |
-- | |
-- - https://github.com/mjlbach/defaults.nvim | |
-- - https://github.com/shift-d/nv/ | |
-- - https://github.com/NvChad/NvChad | |
-- Sane defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name":"Afghanistan", | |
"code":"AF" | |
}, | |
{ | |
"name":"Åland Islands", | |
"code":"AX" | |
}, | |
{ |
OlderNewer