30秒学会 JavaScript 片段 – compose
Performs right-to-left function composition. Use Array.prototype.reduce() to perform right-to-left f...
Performs right-to-left function composition. Use Array.prototype.reduce() to perform right-to-left f...
Replaces the names of multiple object keys with the values provided. Use Object.keys() in combinatio...
Has the same functionality as Array.prototype.splice(), but returning a new array instead of mutatin...
Computes the new ratings between two or more opponents using the Elo rating system. It takes an arra...
Rounds a number to a specified amount of digits. Use Math.round() and template literals to round the...
Checks if the current environment is Travis CI. Checks if the current environment has the TRAVIS and...
Returns a boolean determining if the passed value is an object or not. Uses the Object constructor t...
Adds an ordinal suffix to a number. Use the modulo operator (%) to find values of single and tens di...
Converts the values of RGB components to a color code. Convert given RGB parameters to hexadecimal s...
Creates a pub/sub (publish–subscribe) event hub with emit, on, and off methods. Use Object.create(nu...