sudhanshuverse /
javascript-essentials
A beginner-friendly collection of core JavaScript concepts with examples. Covers variables, functions, loops, arrays, objects, DOM, and more to build a solid foundation in JavaScript.
Loading repository data…
georapbox / repository
A collection of dependency-free JavaScript utilities :wrench:
This repository contains a set of simple, standalone JavaScript utility functions that I've used throughout the years in various projects. It's meant to provide useful tools that developers can easily modify and adapt for their own needs. The focus is on offering individual functions that can be changed as needed, rather than providing a full library.
The utilities are organized into packages based on their functionality. Each package contains a set of functions that are related to a specific area of development, such as arrays, strings, objects, functions, etc.
| Name | Description |
|---|---|
| chunk | Creates an array of elements split into groups the length of size specified. |
| compact | Creates an array with all falsy values removed. 'false', 'null', '0', '""', 'undefined', and 'NaN' are falsy. |
| diff | Returns an array with only the unique values from the first array, by excluding all values from the second array using strict equality for comparisons. |
| drop | Creates a slice of array with n elements dropped from the beginning. |
| dropRight | Creates a slice of array with n elements dropped from the end. |
| dropRightWhile | Creates a slice of array excluding elements dropped from the end, until predicate returns falsy. |
| dropWhile | Creates a slice of array excluding elements dropped from the beginning, until predicate returns falsy. |
| groupBy | Creates an object composed of keys generated from the results of running each element of array through iteratee. |
| intersect | Creates an array of unique values that are included in all given arrays. |
| insert | Inserts one or more elements to array at specific index. |
| move | Move an array element to a different position. |
| partition | Creates an array of elements split into two groups (arrays) depending on the result of a predicated function invoked for each iteration. |
| pluck | Retrieves the value of a specified property from all elements in an array. |
| remove | Removes one or more elements from an array at the specified index(es). |
| shuffle | Returns a new array with its elements' order randomized, using the Fisher-Yates (aka Knuth) Shuffle algorithm. |
| tail | Gets all but the first element of array. |
| take | Creates a slice of array with n items taken from the beginning. |
| takeRight | Creates a slice of array with n items taken from the end. |
| takeRightWhile | Creates a slice of array with elements taken from the end, until predicate returns falsy. |
| takeWhile | Creates a slice of array with elements taken from the beginning, until predicate returns falsy. |
| sort | Sorts an array of primitive values. |
| sortBy | Sorts an array of objects by a property. |
| uniq | Creates a duplicate-free version of an array, using SameValueZero for equality comparisons. |
| uniqBy | Creates a dupliate free array by accepting an iteratee which is invoked for each element in array. |
| zip | Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. |
| Name | Description |
|---|---|
| camelCase | Converts a string to camel case, eg 'theQuickBrownFoxJumpsOverTheLazyDog'. |
| capitalize | Capitalizes the first character of a string (Optionally, converts the rest of the string to lower case). |
| classnames | Creates a string by conditionally joining classNames together. |
| collapseWhitespace | Converts all adjacent whitespace characters to a single space. |
| deburr | Deburrs a string by converting latin-1 supplementary letters to basic latin letters and removing combining diacritical marks. |
| escapeHTML | Converts the characters &, <, >, " and ' in a string to their corresponding HTML entities. |
| escapeRegExp | Escapes RegExp special characters in a string. |
| kebabCase | Converts a string to kebab case, eg 'the-quick-brown-fox-jumps-over-the-lazy-dog'. |
| lines | Returns an array with the lines of a a string. |
| numberFormat |
| Name | Description |
|---|---|
| average | Calculates the average of a set of numbers. |
| clamp | Clamps number within the inclusive lower and upper bounds. |
| degreesToRadians | Converts degrees to radians. |
| inRange | Checks if a number is between min and max including. |
| lerp | Takes a normalized value within a range of values and converts it to a numerical value that the normalized value points to. |
| normalize | Takes a value within a range of values and converts that value to a number from 0 to 1 that indicates where it lies in that range. |
| max | Returns the largest of zero or more numbers. |
| min | Returns the smallest of zero or more numbers. |
| radiansToDegrees | Converts radians to degrees. |
| randomDist | Returns a weighted random number (that tends to the center) of a range of numbers based on the number of the iterations set. |
| randomInt | Returns a pseudo-random integer number between a min (inclusive) and a max (inclusive) value. |
Selected from shared topics, language and repository description—not editorial ratings.
sudhanshuverse /
A beginner-friendly collection of core JavaScript concepts with examples. Covers variables, functions, loops, arrays, objects, DOM, and more to build a solid foundation in JavaScript.
Liakhov /
📚 A collection of 93 solved JavaScript exercises following the javascript.info curriculum. Topics include: functions & recursion, arrays & objects, closures & scope, object methods & context, functional OOP, DOM manipulation, and event handling.
faisalkhalildev /
| Formats a number based on the number of decimal points, the decimal separator and the thousands separator. |
| pascalCase | Converts a string to pascal case, eg 'TheQuickBrownFoxJumpsOverTheLazyDog'. |
| randomString | Generates a pseudo-random string of specific length allowing a set of characters specified by chars. |
| removePrefix | Removes substring (prefix) from start of a string. |
| removeSuffix | Removes substring (suffix) from end of a string. |
| snakeCase | Converts a string to snake case, eg 'the_quick_brown_fox_jumps_over_the_lazy_dog'. |
| squash | Removes all spaces from a string; optionally removes any escape sequences such as \t, \n, \f, \r and \v. |
| strip | Returns a new string with all occurrences of arguments passed removed. |
| stripHTML | Returns a new string with all HTML tags removed. |
| stripPunctuation | Returns a new string with all of punctuation removed. |
| substringAfter | Returns a substring after a specific sequence of character(s). |
| substringBefore | Returns a substring before a specific sequence of character(s). |
| supplant | Performs variable substitution in a string. |
| truncate | Truncates a string based on character count. |
| unescapeHTML | Converts the HTML entities &, <, >, ", " and ' in a string to their corresponding characters. |
| words | Splits string into an array of its words. |
| randomRange |
| Returns a pseudo-random number between a min (inclusive) and a max (exclusive) value. |
| roundToNearest | Ro |
A collection of HTML, CSS, and JavaScript practice projects covering DOM manipulation, arrays, objects, events, localStorage, and mini apps.
bnidev /
A collection of modern, typed JavaScript utility functions for working with arrays, DOM elements, objects, and timing.
warisha234 /
A collection of beginner-friendly JavaScript projects, each focusing on a different concept of web development. Perfect for practice and learning fundamentals like DOM manipulation, events, functions, arrays, and more.
Soumyadip778 /
A collection of JavaScript practice codes and mini-projects created while learning core JS concepts like DOM, events, async JS, array methods, and more. 🚀