30秒学会 JavaScript 片段 – hashNode
Creates a hash for a value using the SHA-256 algorithm. Returns a promise. Use crypto API to create ...
Creates a hash for a value using the SHA-256 algorithm. Returns a promise. Use crypto API to create ...
Capitalizes the first letter of a string. Use array destructuring and String.prototype.toUpperCase()...
Sorts a collection of arrays or objects by key. Uses sort() on the provided array to sort the array ...
Filters a collection keeping up to n occurences of each value. Use IEnumerable.Distinct() in combina...
A hook that returns a value based on a media query. Check if window and window.matchMedia exist, ret...
Returns true if all elements in the collection pass the test implemented by the provided function, f...
Redirects the page to HTTPS if its currently in HTTP. Also, pressing the back button doesn’t t...
Copy a string to the clipboard. Only works as a result of user action (i.e. inside a click event lis...
Creates a function that accepts up to n arguments, ignoring any additional arguments. Call the provi...
Returns all elements in a list except for the first one. Return lst[1:] if the list’s length i...