From db4fc1d50bfe712cdaeeb68215bb4894fb546269 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:20:58 +0300 Subject: [PATCH 01/13] Rename snippets with potential naming conflicts --- collections/js/event-handling.yaml | 2 +- collections/js/generators.yaml | 2 +- ...-listen-once.md => javascript-execute-event-handler-once.md} | 0 ...ipt-range-generator.md => javascript-generator-for-range.md} | 0 snippets/js/s/{sleep.md => delay-async.md} | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename snippets/articles/s/{javascript-listen-once.md => javascript-execute-event-handler-once.md} (100%) rename snippets/articles/s/{javascript-range-generator.md => javascript-generator-for-range.md} (100%) rename snippets/js/s/{sleep.md => delay-async.md} (100%) diff --git a/collections/js/event-handling.yaml b/collections/js/event-handling.yaml index b1d7fa8fd..def999e5c 100644 --- a/collections/js/event-handling.yaml +++ b/collections/js/event-handling.yaml @@ -10,7 +10,7 @@ snippetIds: - js/s/add-event-listener-all - js/s/remove-event-listener-all - js/s/add-multiple-events - - articles/s/javascript-listen-once + - articles/s/javascript-execute-event-handler-once - articles/s/passive-scroll-listener-performance - js/s/on-scroll-stop - articles/s/javascript-arrow-function-event-listeners diff --git a/collections/js/generators.yaml b/collections/js/generators.yaml index 476043c9b..51d6a0144 100644 --- a/collections/js/generators.yaml +++ b/collections/js/generators.yaml @@ -2,7 +2,7 @@ slug: js/generators name: JavaScript Generator Functions featured: true snippetIds: - - articles/s/javascript-range-generator + - articles/s/javascript-generator-for-range - js/s/range-generator - js/s/repeat-generator - js/s/cycle-generator diff --git a/snippets/articles/s/javascript-listen-once.md b/snippets/articles/s/javascript-execute-event-handler-once.md similarity index 100% rename from snippets/articles/s/javascript-listen-once.md rename to snippets/articles/s/javascript-execute-event-handler-once.md diff --git a/snippets/articles/s/javascript-range-generator.md b/snippets/articles/s/javascript-generator-for-range.md similarity index 100% rename from snippets/articles/s/javascript-range-generator.md rename to snippets/articles/s/javascript-generator-for-range.md diff --git a/snippets/js/s/sleep.md b/snippets/js/s/delay-async.md similarity index 100% rename from snippets/js/s/sleep.md rename to snippets/js/s/delay-async.md From f1931acb2c25db870207f076ff8a1f1ffb874b47 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:24:53 +0300 Subject: [PATCH 02/13] Rename articles prefixed with `javascript-` --- collections/js/array-methods.yaml | 8 +-- collections/js/arrow-functions.yaml | 8 +-- collections/js/comparison.yaml | 12 ++-- collections/js/dom-querying.yaml | 4 +- collections/js/event-handling.yaml | 6 +- collections/js/generators.yaml | 8 +-- collections/js/interviews.yaml | 56 +++++++++---------- collections/js/object-cloning.yaml | 4 +- collections/js/performance.yaml | 6 +- collections/js/promises.yaml | 10 ++-- collections/js/proxy.yaml | 4 +- collections/js/url.yaml | 4 +- .../s/code-anatomy-optimizing-recursion.md | 2 +- .../articles/s/js-array-map-vs-foreach.md | 2 +- .../articles/s/js-double-negation-operator.md | 2 +- .../articles/s/js-immutable-object-proxy.md | 2 +- .../articles/s/js-object-freeze-vs-seal.md | 2 +- .../articles/s/js-timeout-interval-delay.md | 2 +- ...react-use-effect-primitive-dependencies.md | 2 +- .../s/add-key-value-pair-to-object.md} | 0 .../s/array-comparison.md} | 0 .../s/array-includes-value.md} | 2 +- .../s/arrow-function-event-listeners.md} | 0 .../s/arrow-functions.md} | 0 .../s/arrow-regular-function-differences.md} | 0 .../s/async-array-loops.md} | 0 .../s/await-timeout.md} | 0 .../s/blank-value.md} | 0 .../s/boolean-function.md} | 0 .../s/boolean-trap.md} | 0 .../s/callbacks.md} | 0 .../s/classical-vs-prototypal-inheritance.md} | 0 .../s/closures.md} | 0 .../s/copy-array.md} | 0 .../s/date-comparison.md} | 0 .../s/deep-freeze-object.md} | 0 .../s/destructuring-assignment.md} | 0 .../s/empty-array.md} | 0 .../s/encodeuri-encodeuricomponent.md} | 0 .../s/javascript-enum.md => js/s/enum.md} | 0 .../s/equality.md} | 0 .../s/event-bubbling-capturing-delegation.md} | 0 .../s/event-loop-explained.md} | 0 .../s/evil-closures.md} | 2 +- .../s/execute-event-handler-once.md} | 0 .../s/expression-statement.md} | 0 .../s/for-in-for-of-foreach.md} | 0 .../s/for-loop-early-break.md} | 0 .../s/function-call-apply-bind.md} | 0 .../s/generator-for-range.md} | 0 .../s/higher-order-functions.md} | 0 .../s/javascript-iife.md => js/s/iife.md} | 0 .../s/index-for-of-loop.md} | 2 +- .../s/iterable-to-array.md} | 0 .../s/iterators.md} | 0 .../s/json-stringify-pick-keys.md} | 0 .../s/make-iterable.md} | 0 .../s/memoization.md} | 0 .../s/merge-arrays.md} | 0 .../s/modify-url-without-reload.md} | 0 .../s/module-cheatsheet.md} | 0 .../s/naming-conventions.md} | 0 .../nullish-coalescing-optional-chaining.md} | 0 .../s/numeric-separator.md} | 0 .../s/object-array-proxy.md} | 0 .../s/object-comparison.md} | 0 .../s/object-is-triple-equals.md} | 0 .../s/pass-by-reference-or-pass-by-value.md} | 0 .../s/prefix-postfix-operators.md} | 0 .../s/pretty-print-json.md} | 0 .../s/prevent-string-being-escaped.md} | 0 .../s/primitive-instanceof.md} | 0 .../s/promise-then-catch.md} | 0 .../s/promise-then-finally.md} | 0 .../s/promises.md} | 0 .../s/property-enumerability.md} | 0 .../s/pure-functions.md} | 0 .../s/query-selector-shorthand.md} | 0 .../s/random-value-pure-functions.md} | 0 .../s/recursion.md} | 0 .../s/reload-page.md} | 0 .../s/remove-object-property.md} | 0 .../s/return-constructor.md} | 0 .../s/shallow-deep-clone.md} | 0 .../s/singleton-proxy.md} | 0 .../s/javascript-sleep.md => js/s/sleep.md} | 0 .../s/spread-rest-syntax.md} | 0 .../s/store-dom-items.md} | 0 .../s/string-contains-substring.md} | 0 .../s/string-immutability.md} | 0 .../s/string-to-boolean.md} | 0 .../s/swap-two-variables.md} | 0 .../s/switch-object.md} | 0 .../s/sync-async.md} | 0 .../s/target-blank.md} | 0 .../s/ternary-operator.md} | 0 .../s/javascript-this.md => js/s/this.md} | 0 .../s/truthy-falsy-values.md} | 0 .../s/undeclared-undefined-null.md} | 0 .../s/use-strict.md} | 0 .../s/value-as-number.md} | 0 .../s/value-not-equal-to-itself.md} | 0 .../s/var-let-const.md} | 6 +- .../s/variable-hoisting.md} | 0 .../s/variable-scope.md} | 0 .../s/void-links.md} | 0 106 files changed, 78 insertions(+), 78 deletions(-) rename snippets/{articles/s/javascript-add-key-value-pair-to-object.md => js/s/add-key-value-pair-to-object.md} (100%) rename snippets/{articles/s/javascript-array-comparison.md => js/s/array-comparison.md} (100%) rename snippets/{articles/s/javascript-array-includes-value.md => js/s/array-includes-value.md} (85%) rename snippets/{articles/s/javascript-arrow-function-event-listeners.md => js/s/arrow-function-event-listeners.md} (100%) rename snippets/{articles/s/javascript-arrow-functions.md => js/s/arrow-functions.md} (100%) rename snippets/{articles/s/javascript-arrow-regular-function-differences.md => js/s/arrow-regular-function-differences.md} (100%) rename snippets/{articles/s/javascript-async-array-loops.md => js/s/async-array-loops.md} (100%) rename snippets/{articles/s/javascript-await-timeout.md => js/s/await-timeout.md} (100%) rename snippets/{articles/s/javascript-blank-value.md => js/s/blank-value.md} (100%) rename snippets/{articles/s/javascript-boolean-function.md => js/s/boolean-function.md} (100%) rename snippets/{articles/s/javascript-boolean-trap.md => js/s/boolean-trap.md} (100%) rename snippets/{articles/s/javascript-callbacks.md => js/s/callbacks.md} (100%) rename snippets/{articles/s/javascript-classical-vs-prototypal-inheritance.md => js/s/classical-vs-prototypal-inheritance.md} (100%) rename snippets/{articles/s/javascript-closures.md => js/s/closures.md} (100%) rename snippets/{articles/s/javascript-copy-array.md => js/s/copy-array.md} (100%) rename snippets/{articles/s/javascript-date-comparison.md => js/s/date-comparison.md} (100%) rename snippets/{articles/s/javascript-deep-freeze-object.md => js/s/deep-freeze-object.md} (100%) rename snippets/{articles/s/javascript-destructuring-assignment.md => js/s/destructuring-assignment.md} (100%) rename snippets/{articles/s/javascript-empty-array.md => js/s/empty-array.md} (100%) rename snippets/{articles/s/javascript-encodeuri-encodeuricomponent.md => js/s/encodeuri-encodeuricomponent.md} (100%) rename snippets/{articles/s/javascript-enum.md => js/s/enum.md} (100%) rename snippets/{articles/s/javascript-equality.md => js/s/equality.md} (100%) rename snippets/{articles/s/javascript-event-bubbling-capturing-delegation.md => js/s/event-bubbling-capturing-delegation.md} (100%) rename snippets/{articles/s/javascript-event-loop-explained.md => js/s/event-loop-explained.md} (100%) rename snippets/{articles/s/javascript-evil-closures.md => js/s/evil-closures.md} (95%) rename snippets/{articles/s/javascript-execute-event-handler-once.md => js/s/execute-event-handler-once.md} (100%) rename snippets/{articles/s/javascript-expression-statement.md => js/s/expression-statement.md} (100%) rename snippets/{articles/s/javascript-for-in-for-of-foreach.md => js/s/for-in-for-of-foreach.md} (100%) rename snippets/{articles/s/javascript-for-loop-early-break.md => js/s/for-loop-early-break.md} (100%) rename snippets/{articles/s/javascript-function-call-apply-bind.md => js/s/function-call-apply-bind.md} (100%) rename snippets/{articles/s/javascript-generator-for-range.md => js/s/generator-for-range.md} (100%) rename snippets/{articles/s/javascript-higher-order-functions.md => js/s/higher-order-functions.md} (100%) rename snippets/{articles/s/javascript-iife.md => js/s/iife.md} (100%) rename snippets/{articles/s/javascript-index-for-of-loop.md => js/s/index-for-of-loop.md} (94%) rename snippets/{articles/s/javascript-iterable-to-array.md => js/s/iterable-to-array.md} (100%) rename snippets/{articles/s/javascript-iterators.md => js/s/iterators.md} (100%) rename snippets/{articles/s/javascript-json-stringify-pick-keys.md => js/s/json-stringify-pick-keys.md} (100%) rename snippets/{articles/s/javascript-make-iterable.md => js/s/make-iterable.md} (100%) rename snippets/{articles/s/javascript-memoization.md => js/s/memoization.md} (100%) rename snippets/{articles/s/javascript-merge-arrays.md => js/s/merge-arrays.md} (100%) rename snippets/{articles/s/javascript-modify-url-without-reload.md => js/s/modify-url-without-reload.md} (100%) rename snippets/{articles/s/javascript-module-cheatsheet.md => js/s/module-cheatsheet.md} (100%) rename snippets/{articles/s/javascript-naming-conventions.md => js/s/naming-conventions.md} (100%) rename snippets/{articles/s/javascript-nullish-coalescing-optional-chaining.md => js/s/nullish-coalescing-optional-chaining.md} (100%) rename snippets/{articles/s/javascript-numeric-separator.md => js/s/numeric-separator.md} (100%) rename snippets/{articles/s/javascript-object-array-proxy.md => js/s/object-array-proxy.md} (100%) rename snippets/{articles/s/javascript-object-comparison.md => js/s/object-comparison.md} (100%) rename snippets/{articles/s/javascript-object-is-triple-equals.md => js/s/object-is-triple-equals.md} (100%) rename snippets/{articles/s/javascript-pass-by-reference-or-pass-by-value.md => js/s/pass-by-reference-or-pass-by-value.md} (100%) rename snippets/{articles/s/javascript-prefix-postfix-operators.md => js/s/prefix-postfix-operators.md} (100%) rename snippets/{articles/s/javascript-pretty-print-json.md => js/s/pretty-print-json.md} (100%) rename snippets/{articles/s/javascript-prevent-string-being-escaped.md => js/s/prevent-string-being-escaped.md} (100%) rename snippets/{articles/s/javascript-primitive-instanceof.md => js/s/primitive-instanceof.md} (100%) rename snippets/{articles/s/javascript-promise-then-catch.md => js/s/promise-then-catch.md} (100%) rename snippets/{articles/s/javascript-promise-then-finally.md => js/s/promise-then-finally.md} (100%) rename snippets/{articles/s/javascript-promises.md => js/s/promises.md} (100%) rename snippets/{articles/s/javascript-property-enumerability.md => js/s/property-enumerability.md} (100%) rename snippets/{articles/s/javascript-pure-functions.md => js/s/pure-functions.md} (100%) rename snippets/{articles/s/javascript-query-selector-shorthand.md => js/s/query-selector-shorthand.md} (100%) rename snippets/{articles/s/javascript-random-value-pure-functions.md => js/s/random-value-pure-functions.md} (100%) rename snippets/{articles/s/javascript-recursion.md => js/s/recursion.md} (100%) rename snippets/{articles/s/javascript-reload-page.md => js/s/reload-page.md} (100%) rename snippets/{articles/s/javascript-remove-object-property.md => js/s/remove-object-property.md} (100%) rename snippets/{articles/s/javascript-return-constructor.md => js/s/return-constructor.md} (100%) rename snippets/{articles/s/javascript-shallow-deep-clone.md => js/s/shallow-deep-clone.md} (100%) rename snippets/{articles/s/javascript-singleton-proxy.md => js/s/singleton-proxy.md} (100%) rename snippets/{articles/s/javascript-sleep.md => js/s/sleep.md} (100%) rename snippets/{articles/s/javascript-spread-rest-syntax.md => js/s/spread-rest-syntax.md} (100%) rename snippets/{articles/s/javascript-store-dom-items.md => js/s/store-dom-items.md} (100%) rename snippets/{articles/s/javascript-string-contains-substring.md => js/s/string-contains-substring.md} (100%) rename snippets/{articles/s/javascript-string-immutability.md => js/s/string-immutability.md} (100%) rename snippets/{articles/s/javascript-string-to-boolean.md => js/s/string-to-boolean.md} (100%) rename snippets/{articles/s/javascript-swap-two-variables.md => js/s/swap-two-variables.md} (100%) rename snippets/{articles/s/javascript-switch-object.md => js/s/switch-object.md} (100%) rename snippets/{articles/s/javascript-sync-async.md => js/s/sync-async.md} (100%) rename snippets/{articles/s/javascript-target-blank.md => js/s/target-blank.md} (100%) rename snippets/{articles/s/javascript-ternary-operator.md => js/s/ternary-operator.md} (100%) rename snippets/{articles/s/javascript-this.md => js/s/this.md} (100%) rename snippets/{articles/s/javascript-truthy-falsy-values.md => js/s/truthy-falsy-values.md} (100%) rename snippets/{articles/s/javascript-undeclared-undefined-null.md => js/s/undeclared-undefined-null.md} (100%) rename snippets/{articles/s/javascript-use-strict.md => js/s/use-strict.md} (100%) rename snippets/{articles/s/javascript-value-as-number.md => js/s/value-as-number.md} (100%) rename snippets/{articles/s/javascript-value-not-equal-to-itself.md => js/s/value-not-equal-to-itself.md} (100%) rename snippets/{articles/s/javascript-var-let-const.md => js/s/var-let-const.md} (91%) rename snippets/{articles/s/javascript-variable-hoisting.md => js/s/variable-hoisting.md} (100%) rename snippets/{articles/s/javascript-variable-scope.md => js/s/variable-scope.md} (100%) rename snippets/{articles/s/javascript-void-links.md => js/s/void-links.md} (100%) diff --git a/collections/js/array-methods.yaml b/collections/js/array-methods.yaml index 11584a557..3a37e5602 100644 --- a/collections/js/array-methods.yaml +++ b/collections/js/array-methods.yaml @@ -4,12 +4,12 @@ featured: true snippetIds: - articles/s/js-array-map-vs-foreach - articles/s/4-javascript-array-methods - - articles/s/javascript-array-comparison - - articles/s/javascript-index-for-of-loop - - articles/s/javascript-for-loop-early-break + - js/s/array-comparison + - js/s/index-for-of-loop + - js/s/for-loop-early-break - articles/s/js-array-initialization - articles/s/code-anatomy-chaining-reduce-for-loop - - articles/s/javascript-async-array-loops + - js/s/async-array-loops - articles/s/js-typecheck-array splash: laptop-lamp.png description: >- diff --git a/collections/js/arrow-functions.yaml b/collections/js/arrow-functions.yaml index a85355dd7..b707a1cea 100644 --- a/collections/js/arrow-functions.yaml +++ b/collections/js/arrow-functions.yaml @@ -2,10 +2,10 @@ slug: js/arrow-functions name: JavaScript Arrow Functions featured: true snippetIds: - - articles/s/javascript-arrow-functions - - articles/s/javascript-arrow-regular-function-differences - - articles/s/javascript-arrow-function-event-listeners - - articles/s/javascript-this + - js/s/arrow-functions + - js/s/arrow-regular-function-differences + - js/s/arrow-function-event-listeners + - js/s/this splash: coffee-float.png description: >- Arrow functions are one of the most useful tools in a JavaScript developer's diff --git a/collections/js/comparison.yaml b/collections/js/comparison.yaml index 2cf8e48f0..d062435eb 100644 --- a/collections/js/comparison.yaml +++ b/collections/js/comparison.yaml @@ -2,12 +2,12 @@ slug: js/comparison name: JavaScript Comparison featured: true snippetIds: - - articles/s/javascript-equality - - articles/s/javascript-value-not-equal-to-itself - - articles/s/javascript-object-comparison - - articles/s/javascript-array-comparison - - articles/s/javascript-date-comparison - - articles/s/javascript-object-is-triple-equals + - js/s/equality + - js/s/value-not-equal-to-itself + - js/s/object-comparison + - js/s/array-comparison + - js/s/date-comparison + - js/s/object-is-triple-equals - js/s/equals - js/s/matches - js/s/matches-with diff --git a/collections/js/dom-querying.yaml b/collections/js/dom-querying.yaml index ac17ac732..c94407e32 100644 --- a/collections/js/dom-querying.yaml +++ b/collections/js/dom-querying.yaml @@ -9,14 +9,14 @@ snippetIds: - js/s/element-contains - js/s/find-closest-anchor - js/s/get-images - - articles/s/javascript-query-selector-shorthand + - js/s/query-selector-shorthand - js/s/element-is-visible-in-viewport - articles/s/select-focused-dom-element - js/s/get-elements-bigger-than-viewport - articles/s/js-element-from-point - js/s/element-is-focused - js/s/get-vertical-offset - - articles/s/javascript-store-dom-items + - js/s/store-dom-items splash: laptop-plants-1.png description: >- Querying the DOM is an essential skill every web developer should have. Learn diff --git a/collections/js/event-handling.yaml b/collections/js/event-handling.yaml index def999e5c..eda119195 100644 --- a/collections/js/event-handling.yaml +++ b/collections/js/event-handling.yaml @@ -6,14 +6,14 @@ snippetIds: - js/s/off - js/s/listen-once - js/s/on-click-outside - - articles/s/javascript-event-bubbling-capturing-delegation + - js/s/event-bubbling-capturing-delegation - js/s/add-event-listener-all - js/s/remove-event-listener-all - js/s/add-multiple-events - - articles/s/javascript-execute-event-handler-once + - js/s/execute-event-handler-once - articles/s/passive-scroll-listener-performance - js/s/on-scroll-stop - - articles/s/javascript-arrow-function-event-listeners + - js/s/arrow-function-event-listeners - articles/s/detect-caps-lock-is-on - js/s/trigger-event - js/s/on-user-input-change diff --git a/collections/js/generators.yaml b/collections/js/generators.yaml index 51d6a0144..d1db2f63f 100644 --- a/collections/js/generators.yaml +++ b/collections/js/generators.yaml @@ -2,7 +2,7 @@ slug: js/generators name: JavaScript Generator Functions featured: true snippetIds: - - articles/s/javascript-generator-for-range + - js/s/generator-for-range - js/s/range-generator - js/s/repeat-generator - js/s/cycle-generator @@ -16,9 +16,9 @@ snippetIds: - js/s/generate-until - js/s/left-substr-generator - js/s/right-substr-generator - - articles/s/javascript-make-iterable - - articles/s/javascript-enum - - articles/s/javascript-object-array-proxy + - js/s/make-iterable + - js/s/enum + - js/s/object-array-proxy splash: generator.png description: >- JavaScript generator functions introduce a way to define an iterative diff --git a/collections/js/interviews.yaml b/collections/js/interviews.yaml index f051ee366..e7f5bcdaf 100644 --- a/collections/js/interviews.yaml +++ b/collections/js/interviews.yaml @@ -4,38 +4,38 @@ miniName: Interview Questions featured: true parent: js snippetIds: - - articles/s/javascript-equality - - articles/s/javascript-truthy-falsy-values - - articles/s/javascript-expression-statement - - articles/s/javascript-undeclared-undefined-null - - articles/s/javascript-variable-hoisting - - articles/s/javascript-variable-scope + - js/s/equality + - js/s/truthy-falsy-values + - js/s/expression-statement + - js/s/undeclared-undefined-null + - js/s/variable-hoisting + - js/s/variable-scope - articles/s/js-callbacks - - articles/s/javascript-pass-by-reference-or-pass-by-value - - articles/s/javascript-promises - - articles/s/javascript-sync-async - - articles/s/javascript-classical-vs-prototypal-inheritance - - articles/s/javascript-this - - articles/s/javascript-shallow-deep-clone - - articles/s/javascript-copy-array - - articles/s/javascript-object-comparison - - articles/s/javascript-array-comparison - - articles/s/javascript-array-includes-value + - js/s/pass-by-reference-or-pass-by-value + - js/s/promises + - js/s/sync-async + - js/s/classical-vs-prototypal-inheritance + - js/s/this + - js/s/shallow-deep-clone + - js/s/copy-array + - js/s/object-comparison + - js/s/array-comparison + - js/s/array-includes-value - articles/s/js-array-map-vs-foreach - - articles/s/javascript-event-bubbling-capturing-delegation - - articles/s/javascript-value-not-equal-to-itself - - articles/s/javascript-blank-value - - articles/s/javascript-string-immutability + - js/s/event-bubbling-capturing-delegation + - js/s/value-not-equal-to-itself + - js/s/blank-value + - js/s/string-immutability - articles/s/js-static-instance-methods - - articles/s/javascript-arrow-functions - - articles/s/javascript-pure-functions - - articles/s/javascript-recursion - - articles/s/javascript-use-strict + - js/s/arrow-functions + - js/s/pure-functions + - js/s/recursion + - js/s/use-strict - articles/s/js-async-defer - - articles/s/javascript-closures - - articles/s/javascript-iife - - articles/s/javascript-event-loop-explained - - articles/s/javascript-prefix-postfix-operators + - js/s/closures + - js/s/iife + - js/s/event-loop-explained + - js/s/prefix-postfix-operators - articles/s/cors-explained splash: interview.png description: >- diff --git a/collections/js/object-cloning.yaml b/collections/js/object-cloning.yaml index 5f4e866e1..cf9d57452 100644 --- a/collections/js/object-cloning.yaml +++ b/collections/js/object-cloning.yaml @@ -2,10 +2,10 @@ slug: js/object-cloning name: JavaScript Object Cloning featured: true snippetIds: - - articles/s/javascript-shallow-deep-clone + - js/s/shallow-deep-clone - js/s/shallow-clone - js/s/deep-clone - - articles/s/javascript-copy-array + - js/s/copy-array splash: coffee-phone-tray.png description: >- JavaScript objects and arrays are a little tricky to clone. Luckily, this diff --git a/collections/js/performance.yaml b/collections/js/performance.yaml index f567fd988..72795c792 100644 --- a/collections/js/performance.yaml +++ b/collections/js/performance.yaml @@ -2,14 +2,14 @@ slug: js/performance name: JavaScript Performance Optimization featured: true snippetIds: - - articles/s/javascript-store-dom-items + - js/s/store-dom-items - articles/s/passive-scroll-listener-performance - articles/s/js-textcontent-or-innertext - - articles/s/javascript-memoization + - js/s/memoization - articles/s/js-array-filtering-tips - articles/s/js-fast-remove-array-element - articles/s/code-anatomy-optimizing-recursion - - articles/s/javascript-switch-object + - js/s/switch-object - articles/s/js-dynamic-properties-are-slow - articles/s/big-o-cheatsheet splash: do-more-computer.png diff --git a/collections/js/promises.yaml b/collections/js/promises.yaml index 5c7867784..73cc64c94 100644 --- a/collections/js/promises.yaml +++ b/collections/js/promises.yaml @@ -2,12 +2,12 @@ slug: js/promises name: JavaScript Promises featured: true snippetIds: - - articles/s/javascript-promises + - js/s/promises - articles/s/async-javascript-cheatsheet - - articles/s/javascript-sync-async - - articles/s/javascript-promise-then-catch - - articles/s/javascript-promise-then-finally - - articles/s/javascript-await-timeout + - js/s/sync-async + - js/s/promise-then-catch + - js/s/promise-then-finally + - js/s/await-timeout - js/s/debounce-promise - js/s/run-promises-in-series splash: blue-computer.png diff --git a/collections/js/proxy.yaml b/collections/js/proxy.yaml index 6d78a8760..3a0e47ba9 100644 --- a/collections/js/proxy.yaml +++ b/collections/js/proxy.yaml @@ -5,9 +5,9 @@ snippetIds: - articles/s/js-proxy-introduction - articles/s/js-dynamic-getter-setter-proxy - articles/s/js-immutable-object-proxy - - articles/s/javascript-singleton-proxy + - js/s/singleton-proxy - articles/s/js-dynamic-getter-chain-proxy - - articles/s/javascript-object-array-proxy + - js/s/object-array-proxy - articles/s/js-proxy-array-negative-index - articles/s/js-cannot-extend-proxy-object - articles/s/js-typecheck-proxy diff --git a/collections/js/url.yaml b/collections/js/url.yaml index b6faa2737..595e2d76a 100644 --- a/collections/js/url.yaml +++ b/collections/js/url.yaml @@ -2,10 +2,10 @@ slug: js/url name: URLs in JavaScript featured: true snippetIds: - - articles/s/javascript-modify-url-without-reload + - js/s/modify-url-without-reload - articles/s/js-construct-url - articles/s/js-edit-url-params - - articles/s/javascript-reload-page + - js/s/reload-page - articles/s/js-window-location-cheatsheet - js/s/current-url - js/s/https-redirect diff --git a/snippets/articles/s/code-anatomy-optimizing-recursion.md b/snippets/articles/s/code-anatomy-optimizing-recursion.md index 2fc847056..18ebb4f10 100644 --- a/snippets/articles/s/code-anatomy-optimizing-recursion.md +++ b/snippets/articles/s/code-anatomy-optimizing-recursion.md @@ -54,7 +54,7 @@ As you can see, for each value of `n`, `fibonacciNumber` will be called twice, o ### Calculation memoization -The solution to this problem, and the first trick that you can use to speed up recursive functions, is to use memoization. We already published [a great blog post on memoization](/articles/s/javascript-memoization/) a little while back, so be sure to check it out to learn more about the subject. Here's our `fibonacciNumber` function, using memoization: +The solution to this problem, and the first trick that you can use to speed up recursive functions, is to use memoization. We already published [a great blog post on memoization](/js/s/memoization/) a little while back, so be sure to check it out to learn more about the subject. Here's our `fibonacciNumber` function, using memoization: ```js const fibonacciCache = new Map(); diff --git a/snippets/articles/s/js-array-map-vs-foreach.md b/snippets/articles/s/js-array-map-vs-foreach.md index dbe174048..d72bf7a59 100644 --- a/snippets/articles/s/js-array-map-vs-foreach.md +++ b/snippets/articles/s/js-array-map-vs-foreach.md @@ -28,4 +28,4 @@ const doubledNumbers = numbers.map(num => num * 2); The way I like to distinguish them is by remembering that `Array.prototype.map()` represents a **transformation**, whereas `Array.prototype.forEach()` represents an **iteration**. Hopefully, one of these explanations will click for you and help you remember the difference between the two. -As a closing note, I would like to remind you that the humble `for` loop can be more efficient in some cases, such as [breaking out of a loop early](/articles/s/javascript-for-loop-early-break). Always pick the right tool for the job, as ES6 has a method for almost every use case. +As a closing note, I would like to remind you that the humble `for` loop can be more efficient in some cases, such as [breaking out of a loop early](/js/s/for-loop-early-break). Always pick the right tool for the job, as ES6 has a method for almost every use case. diff --git a/snippets/articles/s/js-double-negation-operator.md b/snippets/articles/s/js-double-negation-operator.md index 56c5e0da5..350e99312 100644 --- a/snippets/articles/s/js-double-negation-operator.md +++ b/snippets/articles/s/js-double-negation-operator.md @@ -20,7 +20,7 @@ const y = null; !!y; // false ``` -Using the double negation operator is functionally equivalent to using the `Boolean()` function, which we explored in depth in a [previous article](/articles/s/javascript-boolean-function). In terms of readability and usability, I would still suggest using the `Boolean()` function. It conveys the intent of the operation more clearly, and it's easier to understand at a glance. +Using the double negation operator is functionally equivalent to using the `Boolean()` function, which we explored in depth in a [previous article](/js/s/boolean-function). In terms of readability and usability, I would still suggest using the `Boolean()` function. It conveys the intent of the operation more clearly, and it's easier to understand at a glance. ```js const x = 1; diff --git a/snippets/articles/s/js-immutable-object-proxy.md b/snippets/articles/s/js-immutable-object-proxy.md index 5d1fc22d5..0b8cc63eb 100644 --- a/snippets/articles/s/js-immutable-object-proxy.md +++ b/snippets/articles/s/js-immutable-object-proxy.md @@ -10,7 +10,7 @@ excerpt: Freezing objects is not the only way to prevent mutations. Learn how yo dateModified: 2022-04-10T05:00:00-04:00 --- -Object mutability and its relation to the `const` keyword is a very common headache for developers. More often than not, when looking for ways to make an object immutable, `Object.freeze()` will pop up as a solution. We’ve explored this approach previously, elaborating on deep freezing solutions. You can read more about it in [this article](/articles/s/javascript-deep-freeze-object). +Object mutability and its relation to the `const` keyword is a very common headache for developers. More often than not, when looking for ways to make an object immutable, `Object.freeze()` will pop up as a solution. We’ve explored this approach previously, elaborating on deep freezing solutions. You can read more about it in [this article](/js/s/deep-freeze-object). While `Object.freeze()` is the more straightforward approach, it might not always be the best solution. This may be especially true when dealing with extensive object nesting or when objects have a very short life. For such cases, a different approach using the [Proxy object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) might make more sense. Here’s what that looks like: diff --git a/snippets/articles/s/js-object-freeze-vs-seal.md b/snippets/articles/s/js-object-freeze-vs-seal.md index 94f295568..1b0eb8270 100644 --- a/snippets/articles/s/js-object-freeze-vs-seal.md +++ b/snippets/articles/s/js-object-freeze-vs-seal.md @@ -33,4 +33,4 @@ If you want to prevent new properties from being added and existing properties f | `Object.freeze()` | No | Yes | No | No | | `Object.seal()` | No | Yes | Yes | No | -As a closing note, remember that both methods perform a shallow freeze/seal on the object. This means that nested objects and arrays are not frozen or sealed and can be mutated. To prevent this, you can deep freeze objects, as described in [this related article](/articles/s/javascript-deep-freeze-object). +As a closing note, remember that both methods perform a shallow freeze/seal on the object. This means that nested objects and arrays are not frozen or sealed and can be mutated. To prevent this, you can deep freeze objects, as described in [this related article](/js/s/deep-freeze-object). diff --git a/snippets/articles/s/js-timeout-interval-delay.md b/snippets/articles/s/js-timeout-interval-delay.md index a9e3f924c..56b70e42e 100644 --- a/snippets/articles/s/js-timeout-interval-delay.md +++ b/snippets/articles/s/js-timeout-interval-delay.md @@ -14,7 +14,7 @@ JavaScript provides two widely used timing functions, `setTimeout()` and `setInt ### Delays are not exact -I went into detail about how JavaScript engines execute code in [the Event Loop explanation](/articles/s/javascript-event-loop-explained), but let me recap here. As JavaScript is single-threaded, tasks are queued to be executed in a loop. Thus, `setTimeout()` and `setInterval()` are tasks that will be executed after at least the given amount of time has elapsed. There is no guarantee, however, that the task will be executed exactly after the given amount of time has elapsed. The delay is a suggestion, signifying the **minimum amount of time** that must pass before the task is executed. The actual delay can be longer, depending on the current state of the JavaScript engine. +I went into detail about how JavaScript engines execute code in [the Event Loop explanation](/js/s/event-loop-explained), but let me recap here. As JavaScript is single-threaded, tasks are queued to be executed in a loop. Thus, `setTimeout()` and `setInterval()` are tasks that will be executed after at least the given amount of time has elapsed. There is no guarantee, however, that the task will be executed exactly after the given amount of time has elapsed. The delay is a suggestion, signifying the **minimum amount of time** that must pass before the task is executed. The actual delay can be longer, depending on the current state of the JavaScript engine. ### Browser factors diff --git a/snippets/articles/s/react-use-effect-primitive-dependencies.md b/snippets/articles/s/react-use-effect-primitive-dependencies.md index 4c2757226..50e1d97f4 100644 --- a/snippets/articles/s/react-use-effect-primitive-dependencies.md +++ b/snippets/articles/s/react-use-effect-primitive-dependencies.md @@ -12,7 +12,7 @@ dateModified: 2022-06-12T05:00:00-04:00 Conditionally firing an effect is a pretty common requirement when working with React. In most cases, this is as simple as passing a dependency array to `useEffect()`. Turns out that, in some cases, this can cause unnecessary performance degradation. -Such issues arise when entire objects are passed as dependencies when you only need a primitive value. Due to the nature of objects, [being pass-by-reference](/articles/s/javascript-pass-by-reference-or-pass-by-value), comparing the dependencies will always trigger a re-run. This ends up causing effects to run unnecessarily. +Such issues arise when entire objects are passed as dependencies when you only need a primitive value. Due to the nature of objects, [being pass-by-reference](/js/s/pass-by-reference-or-pass-by-value), comparing the dependencies will always trigger a re-run. This ends up causing effects to run unnecessarily. ```jsx const CartItem = ({ item }) => { diff --git a/snippets/articles/s/javascript-add-key-value-pair-to-object.md b/snippets/js/s/add-key-value-pair-to-object.md similarity index 100% rename from snippets/articles/s/javascript-add-key-value-pair-to-object.md rename to snippets/js/s/add-key-value-pair-to-object.md diff --git a/snippets/articles/s/javascript-array-comparison.md b/snippets/js/s/array-comparison.md similarity index 100% rename from snippets/articles/s/javascript-array-comparison.md rename to snippets/js/s/array-comparison.md diff --git a/snippets/articles/s/javascript-array-includes-value.md b/snippets/js/s/array-includes-value.md similarity index 85% rename from snippets/articles/s/javascript-array-includes-value.md rename to snippets/js/s/array-includes-value.md index 7ceb55ac4..9a65658e3 100644 --- a/snippets/articles/s/javascript-array-includes-value.md +++ b/snippets/js/s/array-includes-value.md @@ -24,7 +24,7 @@ array.includes(3, 3); // false ### Objects -Unlike primitive values, you can't use `Array.prototype.includes()` to check if an array includes an object. This comes down to how JavaScript compares values and the fact that [objects are reference types](/articles/s/javascript-pass-by-reference-or-pass-by-value). I highly recommend reading the previous article about [object comparison](/articles/s/javascript-object-comparison), as I won't be going into detail on how to compare objects here. +Unlike primitive values, you can't use `Array.prototype.includes()` to check if an array includes an object. This comes down to how JavaScript compares values and the fact that [objects are reference types](/js/s/pass-by-reference-or-pass-by-value). I highly recommend reading the previous article about [object comparison](/js/s/object-comparison), as I won't be going into detail on how to compare objects here. Due to this difference between primitive values and objects, you can't use `Array.prototype.includes()` to check if an array includes an object. However, provided you implement a [deep equality function](/js/s/equals), you can use `Array.prototype.some()` to check if any object matches the shape of another object. diff --git a/snippets/articles/s/javascript-arrow-function-event-listeners.md b/snippets/js/s/arrow-function-event-listeners.md similarity index 100% rename from snippets/articles/s/javascript-arrow-function-event-listeners.md rename to snippets/js/s/arrow-function-event-listeners.md diff --git a/snippets/articles/s/javascript-arrow-functions.md b/snippets/js/s/arrow-functions.md similarity index 100% rename from snippets/articles/s/javascript-arrow-functions.md rename to snippets/js/s/arrow-functions.md diff --git a/snippets/articles/s/javascript-arrow-regular-function-differences.md b/snippets/js/s/arrow-regular-function-differences.md similarity index 100% rename from snippets/articles/s/javascript-arrow-regular-function-differences.md rename to snippets/js/s/arrow-regular-function-differences.md diff --git a/snippets/articles/s/javascript-async-array-loops.md b/snippets/js/s/async-array-loops.md similarity index 100% rename from snippets/articles/s/javascript-async-array-loops.md rename to snippets/js/s/async-array-loops.md diff --git a/snippets/articles/s/javascript-await-timeout.md b/snippets/js/s/await-timeout.md similarity index 100% rename from snippets/articles/s/javascript-await-timeout.md rename to snippets/js/s/await-timeout.md diff --git a/snippets/articles/s/javascript-blank-value.md b/snippets/js/s/blank-value.md similarity index 100% rename from snippets/articles/s/javascript-blank-value.md rename to snippets/js/s/blank-value.md diff --git a/snippets/articles/s/javascript-boolean-function.md b/snippets/js/s/boolean-function.md similarity index 100% rename from snippets/articles/s/javascript-boolean-function.md rename to snippets/js/s/boolean-function.md diff --git a/snippets/articles/s/javascript-boolean-trap.md b/snippets/js/s/boolean-trap.md similarity index 100% rename from snippets/articles/s/javascript-boolean-trap.md rename to snippets/js/s/boolean-trap.md diff --git a/snippets/articles/s/javascript-callbacks.md b/snippets/js/s/callbacks.md similarity index 100% rename from snippets/articles/s/javascript-callbacks.md rename to snippets/js/s/callbacks.md diff --git a/snippets/articles/s/javascript-classical-vs-prototypal-inheritance.md b/snippets/js/s/classical-vs-prototypal-inheritance.md similarity index 100% rename from snippets/articles/s/javascript-classical-vs-prototypal-inheritance.md rename to snippets/js/s/classical-vs-prototypal-inheritance.md diff --git a/snippets/articles/s/javascript-closures.md b/snippets/js/s/closures.md similarity index 100% rename from snippets/articles/s/javascript-closures.md rename to snippets/js/s/closures.md diff --git a/snippets/articles/s/javascript-copy-array.md b/snippets/js/s/copy-array.md similarity index 100% rename from snippets/articles/s/javascript-copy-array.md rename to snippets/js/s/copy-array.md diff --git a/snippets/articles/s/javascript-date-comparison.md b/snippets/js/s/date-comparison.md similarity index 100% rename from snippets/articles/s/javascript-date-comparison.md rename to snippets/js/s/date-comparison.md diff --git a/snippets/articles/s/javascript-deep-freeze-object.md b/snippets/js/s/deep-freeze-object.md similarity index 100% rename from snippets/articles/s/javascript-deep-freeze-object.md rename to snippets/js/s/deep-freeze-object.md diff --git a/snippets/articles/s/javascript-destructuring-assignment.md b/snippets/js/s/destructuring-assignment.md similarity index 100% rename from snippets/articles/s/javascript-destructuring-assignment.md rename to snippets/js/s/destructuring-assignment.md diff --git a/snippets/articles/s/javascript-empty-array.md b/snippets/js/s/empty-array.md similarity index 100% rename from snippets/articles/s/javascript-empty-array.md rename to snippets/js/s/empty-array.md diff --git a/snippets/articles/s/javascript-encodeuri-encodeuricomponent.md b/snippets/js/s/encodeuri-encodeuricomponent.md similarity index 100% rename from snippets/articles/s/javascript-encodeuri-encodeuricomponent.md rename to snippets/js/s/encodeuri-encodeuricomponent.md diff --git a/snippets/articles/s/javascript-enum.md b/snippets/js/s/enum.md similarity index 100% rename from snippets/articles/s/javascript-enum.md rename to snippets/js/s/enum.md diff --git a/snippets/articles/s/javascript-equality.md b/snippets/js/s/equality.md similarity index 100% rename from snippets/articles/s/javascript-equality.md rename to snippets/js/s/equality.md diff --git a/snippets/articles/s/javascript-event-bubbling-capturing-delegation.md b/snippets/js/s/event-bubbling-capturing-delegation.md similarity index 100% rename from snippets/articles/s/javascript-event-bubbling-capturing-delegation.md rename to snippets/js/s/event-bubbling-capturing-delegation.md diff --git a/snippets/articles/s/javascript-event-loop-explained.md b/snippets/js/s/event-loop-explained.md similarity index 100% rename from snippets/articles/s/javascript-event-loop-explained.md rename to snippets/js/s/event-loop-explained.md diff --git a/snippets/articles/s/javascript-evil-closures.md b/snippets/js/s/evil-closures.md similarity index 95% rename from snippets/articles/s/javascript-evil-closures.md rename to snippets/js/s/evil-closures.md index 553c5a490..2fb32179d 100644 --- a/snippets/articles/s/javascript-evil-closures.md +++ b/snippets/js/s/evil-closures.md @@ -12,7 +12,7 @@ dateModified: 2022-05-18T05:00:00-04:00 JavaScript closures are used frequently, yet often misunderstood. Understanding them in depth is crucial to be able to write clean, maintainable and bug-free code. We previously discussed what they are and how they work. -I strongly recommend you read the [previous article on closures](/articles/s/javascript-closures) if you haven't already. Instead of rehashing the same information, I would like to discuss the dangers of using closures and present my view on the topic. +I strongly recommend you read the [previous article on closures](/js/s/closures) if you haven't already. Instead of rehashing the same information, I would like to discuss the dangers of using closures and present my view on the topic. ### Hidden state diff --git a/snippets/articles/s/javascript-execute-event-handler-once.md b/snippets/js/s/execute-event-handler-once.md similarity index 100% rename from snippets/articles/s/javascript-execute-event-handler-once.md rename to snippets/js/s/execute-event-handler-once.md diff --git a/snippets/articles/s/javascript-expression-statement.md b/snippets/js/s/expression-statement.md similarity index 100% rename from snippets/articles/s/javascript-expression-statement.md rename to snippets/js/s/expression-statement.md diff --git a/snippets/articles/s/javascript-for-in-for-of-foreach.md b/snippets/js/s/for-in-for-of-foreach.md similarity index 100% rename from snippets/articles/s/javascript-for-in-for-of-foreach.md rename to snippets/js/s/for-in-for-of-foreach.md diff --git a/snippets/articles/s/javascript-for-loop-early-break.md b/snippets/js/s/for-loop-early-break.md similarity index 100% rename from snippets/articles/s/javascript-for-loop-early-break.md rename to snippets/js/s/for-loop-early-break.md diff --git a/snippets/articles/s/javascript-function-call-apply-bind.md b/snippets/js/s/function-call-apply-bind.md similarity index 100% rename from snippets/articles/s/javascript-function-call-apply-bind.md rename to snippets/js/s/function-call-apply-bind.md diff --git a/snippets/articles/s/javascript-generator-for-range.md b/snippets/js/s/generator-for-range.md similarity index 100% rename from snippets/articles/s/javascript-generator-for-range.md rename to snippets/js/s/generator-for-range.md diff --git a/snippets/articles/s/javascript-higher-order-functions.md b/snippets/js/s/higher-order-functions.md similarity index 100% rename from snippets/articles/s/javascript-higher-order-functions.md rename to snippets/js/s/higher-order-functions.md diff --git a/snippets/articles/s/javascript-iife.md b/snippets/js/s/iife.md similarity index 100% rename from snippets/articles/s/javascript-iife.md rename to snippets/js/s/iife.md diff --git a/snippets/articles/s/javascript-index-for-of-loop.md b/snippets/js/s/index-for-of-loop.md similarity index 94% rename from snippets/articles/s/javascript-index-for-of-loop.md rename to snippets/js/s/index-for-of-loop.md index 5084d3966..97a316993 100644 --- a/snippets/articles/s/javascript-index-for-of-loop.md +++ b/snippets/js/s/index-for-of-loop.md @@ -23,4 +23,4 @@ for (let [index, item] of items.entries()) { Moreover, you can use the spread operator (`...`) to convert a string into an array and then use `Array.prototype.entries()` the same way. Finally, both `Map` and `Set` prototypes provide a similar method (`Map.prototype.entries()` and `Set.prototype.entries()` respectively), which can be used the exact same way. -_If you're not familiar with `for...of` and its syntax, I highly recommending you take a look at [this article about the various iteration methods in JavaScript](/articles/s/javascript-for-in-for-of-foreach)._ +_If you're not familiar with `for...of` and its syntax, I highly recommending you take a look at [this article about the various iteration methods in JavaScript](/js/s/for-in-for-of-foreach)._ diff --git a/snippets/articles/s/javascript-iterable-to-array.md b/snippets/js/s/iterable-to-array.md similarity index 100% rename from snippets/articles/s/javascript-iterable-to-array.md rename to snippets/js/s/iterable-to-array.md diff --git a/snippets/articles/s/javascript-iterators.md b/snippets/js/s/iterators.md similarity index 100% rename from snippets/articles/s/javascript-iterators.md rename to snippets/js/s/iterators.md diff --git a/snippets/articles/s/javascript-json-stringify-pick-keys.md b/snippets/js/s/json-stringify-pick-keys.md similarity index 100% rename from snippets/articles/s/javascript-json-stringify-pick-keys.md rename to snippets/js/s/json-stringify-pick-keys.md diff --git a/snippets/articles/s/javascript-make-iterable.md b/snippets/js/s/make-iterable.md similarity index 100% rename from snippets/articles/s/javascript-make-iterable.md rename to snippets/js/s/make-iterable.md diff --git a/snippets/articles/s/javascript-memoization.md b/snippets/js/s/memoization.md similarity index 100% rename from snippets/articles/s/javascript-memoization.md rename to snippets/js/s/memoization.md diff --git a/snippets/articles/s/javascript-merge-arrays.md b/snippets/js/s/merge-arrays.md similarity index 100% rename from snippets/articles/s/javascript-merge-arrays.md rename to snippets/js/s/merge-arrays.md diff --git a/snippets/articles/s/javascript-modify-url-without-reload.md b/snippets/js/s/modify-url-without-reload.md similarity index 100% rename from snippets/articles/s/javascript-modify-url-without-reload.md rename to snippets/js/s/modify-url-without-reload.md diff --git a/snippets/articles/s/javascript-module-cheatsheet.md b/snippets/js/s/module-cheatsheet.md similarity index 100% rename from snippets/articles/s/javascript-module-cheatsheet.md rename to snippets/js/s/module-cheatsheet.md diff --git a/snippets/articles/s/javascript-naming-conventions.md b/snippets/js/s/naming-conventions.md similarity index 100% rename from snippets/articles/s/javascript-naming-conventions.md rename to snippets/js/s/naming-conventions.md diff --git a/snippets/articles/s/javascript-nullish-coalescing-optional-chaining.md b/snippets/js/s/nullish-coalescing-optional-chaining.md similarity index 100% rename from snippets/articles/s/javascript-nullish-coalescing-optional-chaining.md rename to snippets/js/s/nullish-coalescing-optional-chaining.md diff --git a/snippets/articles/s/javascript-numeric-separator.md b/snippets/js/s/numeric-separator.md similarity index 100% rename from snippets/articles/s/javascript-numeric-separator.md rename to snippets/js/s/numeric-separator.md diff --git a/snippets/articles/s/javascript-object-array-proxy.md b/snippets/js/s/object-array-proxy.md similarity index 100% rename from snippets/articles/s/javascript-object-array-proxy.md rename to snippets/js/s/object-array-proxy.md diff --git a/snippets/articles/s/javascript-object-comparison.md b/snippets/js/s/object-comparison.md similarity index 100% rename from snippets/articles/s/javascript-object-comparison.md rename to snippets/js/s/object-comparison.md diff --git a/snippets/articles/s/javascript-object-is-triple-equals.md b/snippets/js/s/object-is-triple-equals.md similarity index 100% rename from snippets/articles/s/javascript-object-is-triple-equals.md rename to snippets/js/s/object-is-triple-equals.md diff --git a/snippets/articles/s/javascript-pass-by-reference-or-pass-by-value.md b/snippets/js/s/pass-by-reference-or-pass-by-value.md similarity index 100% rename from snippets/articles/s/javascript-pass-by-reference-or-pass-by-value.md rename to snippets/js/s/pass-by-reference-or-pass-by-value.md diff --git a/snippets/articles/s/javascript-prefix-postfix-operators.md b/snippets/js/s/prefix-postfix-operators.md similarity index 100% rename from snippets/articles/s/javascript-prefix-postfix-operators.md rename to snippets/js/s/prefix-postfix-operators.md diff --git a/snippets/articles/s/javascript-pretty-print-json.md b/snippets/js/s/pretty-print-json.md similarity index 100% rename from snippets/articles/s/javascript-pretty-print-json.md rename to snippets/js/s/pretty-print-json.md diff --git a/snippets/articles/s/javascript-prevent-string-being-escaped.md b/snippets/js/s/prevent-string-being-escaped.md similarity index 100% rename from snippets/articles/s/javascript-prevent-string-being-escaped.md rename to snippets/js/s/prevent-string-being-escaped.md diff --git a/snippets/articles/s/javascript-primitive-instanceof.md b/snippets/js/s/primitive-instanceof.md similarity index 100% rename from snippets/articles/s/javascript-primitive-instanceof.md rename to snippets/js/s/primitive-instanceof.md diff --git a/snippets/articles/s/javascript-promise-then-catch.md b/snippets/js/s/promise-then-catch.md similarity index 100% rename from snippets/articles/s/javascript-promise-then-catch.md rename to snippets/js/s/promise-then-catch.md diff --git a/snippets/articles/s/javascript-promise-then-finally.md b/snippets/js/s/promise-then-finally.md similarity index 100% rename from snippets/articles/s/javascript-promise-then-finally.md rename to snippets/js/s/promise-then-finally.md diff --git a/snippets/articles/s/javascript-promises.md b/snippets/js/s/promises.md similarity index 100% rename from snippets/articles/s/javascript-promises.md rename to snippets/js/s/promises.md diff --git a/snippets/articles/s/javascript-property-enumerability.md b/snippets/js/s/property-enumerability.md similarity index 100% rename from snippets/articles/s/javascript-property-enumerability.md rename to snippets/js/s/property-enumerability.md diff --git a/snippets/articles/s/javascript-pure-functions.md b/snippets/js/s/pure-functions.md similarity index 100% rename from snippets/articles/s/javascript-pure-functions.md rename to snippets/js/s/pure-functions.md diff --git a/snippets/articles/s/javascript-query-selector-shorthand.md b/snippets/js/s/query-selector-shorthand.md similarity index 100% rename from snippets/articles/s/javascript-query-selector-shorthand.md rename to snippets/js/s/query-selector-shorthand.md diff --git a/snippets/articles/s/javascript-random-value-pure-functions.md b/snippets/js/s/random-value-pure-functions.md similarity index 100% rename from snippets/articles/s/javascript-random-value-pure-functions.md rename to snippets/js/s/random-value-pure-functions.md diff --git a/snippets/articles/s/javascript-recursion.md b/snippets/js/s/recursion.md similarity index 100% rename from snippets/articles/s/javascript-recursion.md rename to snippets/js/s/recursion.md diff --git a/snippets/articles/s/javascript-reload-page.md b/snippets/js/s/reload-page.md similarity index 100% rename from snippets/articles/s/javascript-reload-page.md rename to snippets/js/s/reload-page.md diff --git a/snippets/articles/s/javascript-remove-object-property.md b/snippets/js/s/remove-object-property.md similarity index 100% rename from snippets/articles/s/javascript-remove-object-property.md rename to snippets/js/s/remove-object-property.md diff --git a/snippets/articles/s/javascript-return-constructor.md b/snippets/js/s/return-constructor.md similarity index 100% rename from snippets/articles/s/javascript-return-constructor.md rename to snippets/js/s/return-constructor.md diff --git a/snippets/articles/s/javascript-shallow-deep-clone.md b/snippets/js/s/shallow-deep-clone.md similarity index 100% rename from snippets/articles/s/javascript-shallow-deep-clone.md rename to snippets/js/s/shallow-deep-clone.md diff --git a/snippets/articles/s/javascript-singleton-proxy.md b/snippets/js/s/singleton-proxy.md similarity index 100% rename from snippets/articles/s/javascript-singleton-proxy.md rename to snippets/js/s/singleton-proxy.md diff --git a/snippets/articles/s/javascript-sleep.md b/snippets/js/s/sleep.md similarity index 100% rename from snippets/articles/s/javascript-sleep.md rename to snippets/js/s/sleep.md diff --git a/snippets/articles/s/javascript-spread-rest-syntax.md b/snippets/js/s/spread-rest-syntax.md similarity index 100% rename from snippets/articles/s/javascript-spread-rest-syntax.md rename to snippets/js/s/spread-rest-syntax.md diff --git a/snippets/articles/s/javascript-store-dom-items.md b/snippets/js/s/store-dom-items.md similarity index 100% rename from snippets/articles/s/javascript-store-dom-items.md rename to snippets/js/s/store-dom-items.md diff --git a/snippets/articles/s/javascript-string-contains-substring.md b/snippets/js/s/string-contains-substring.md similarity index 100% rename from snippets/articles/s/javascript-string-contains-substring.md rename to snippets/js/s/string-contains-substring.md diff --git a/snippets/articles/s/javascript-string-immutability.md b/snippets/js/s/string-immutability.md similarity index 100% rename from snippets/articles/s/javascript-string-immutability.md rename to snippets/js/s/string-immutability.md diff --git a/snippets/articles/s/javascript-string-to-boolean.md b/snippets/js/s/string-to-boolean.md similarity index 100% rename from snippets/articles/s/javascript-string-to-boolean.md rename to snippets/js/s/string-to-boolean.md diff --git a/snippets/articles/s/javascript-swap-two-variables.md b/snippets/js/s/swap-two-variables.md similarity index 100% rename from snippets/articles/s/javascript-swap-two-variables.md rename to snippets/js/s/swap-two-variables.md diff --git a/snippets/articles/s/javascript-switch-object.md b/snippets/js/s/switch-object.md similarity index 100% rename from snippets/articles/s/javascript-switch-object.md rename to snippets/js/s/switch-object.md diff --git a/snippets/articles/s/javascript-sync-async.md b/snippets/js/s/sync-async.md similarity index 100% rename from snippets/articles/s/javascript-sync-async.md rename to snippets/js/s/sync-async.md diff --git a/snippets/articles/s/javascript-target-blank.md b/snippets/js/s/target-blank.md similarity index 100% rename from snippets/articles/s/javascript-target-blank.md rename to snippets/js/s/target-blank.md diff --git a/snippets/articles/s/javascript-ternary-operator.md b/snippets/js/s/ternary-operator.md similarity index 100% rename from snippets/articles/s/javascript-ternary-operator.md rename to snippets/js/s/ternary-operator.md diff --git a/snippets/articles/s/javascript-this.md b/snippets/js/s/this.md similarity index 100% rename from snippets/articles/s/javascript-this.md rename to snippets/js/s/this.md diff --git a/snippets/articles/s/javascript-truthy-falsy-values.md b/snippets/js/s/truthy-falsy-values.md similarity index 100% rename from snippets/articles/s/javascript-truthy-falsy-values.md rename to snippets/js/s/truthy-falsy-values.md diff --git a/snippets/articles/s/javascript-undeclared-undefined-null.md b/snippets/js/s/undeclared-undefined-null.md similarity index 100% rename from snippets/articles/s/javascript-undeclared-undefined-null.md rename to snippets/js/s/undeclared-undefined-null.md diff --git a/snippets/articles/s/javascript-use-strict.md b/snippets/js/s/use-strict.md similarity index 100% rename from snippets/articles/s/javascript-use-strict.md rename to snippets/js/s/use-strict.md diff --git a/snippets/articles/s/javascript-value-as-number.md b/snippets/js/s/value-as-number.md similarity index 100% rename from snippets/articles/s/javascript-value-as-number.md rename to snippets/js/s/value-as-number.md diff --git a/snippets/articles/s/javascript-value-not-equal-to-itself.md b/snippets/js/s/value-not-equal-to-itself.md similarity index 100% rename from snippets/articles/s/javascript-value-not-equal-to-itself.md rename to snippets/js/s/value-not-equal-to-itself.md diff --git a/snippets/articles/s/javascript-var-let-const.md b/snippets/js/s/var-let-const.md similarity index 91% rename from snippets/articles/s/javascript-var-let-const.md rename to snippets/js/s/var-let-const.md index 0a362e925..ac63c2022 100644 --- a/snippets/articles/s/javascript-var-let-const.md +++ b/snippets/js/s/var-let-const.md @@ -33,7 +33,7 @@ const scopeExample = () => { }; ``` -If you want to learn more, we have [an article covering JavaScript variables and scopes in more depth](/articles/s/javascript-variable-scope). +If you want to learn more, we have [an article covering JavaScript variables and scopes in more depth](/js/s/variable-scope). ### Hoisting @@ -51,7 +51,7 @@ const hoistingExample = () => { }; ``` -If you want to learn more, we have [an article covering JavaScript hoisting in more depth](/articles/s/javascript-variable-hoisting). +If you want to learn more, we have [an article covering JavaScript hoisting in more depth](/js/s/variable-hoisting). ### Global object property @@ -78,4 +78,4 @@ let b = 'let1'; let b = 'let2'; // SyntaxError ``` -If you want to learn more, we have [an article covering JavaScript's strict mode in more depth](/articles/s/javascript-use-strict). +If you want to learn more, we have [an article covering JavaScript's strict mode in more depth](/js/s/use-strict). diff --git a/snippets/articles/s/javascript-variable-hoisting.md b/snippets/js/s/variable-hoisting.md similarity index 100% rename from snippets/articles/s/javascript-variable-hoisting.md rename to snippets/js/s/variable-hoisting.md diff --git a/snippets/articles/s/javascript-variable-scope.md b/snippets/js/s/variable-scope.md similarity index 100% rename from snippets/articles/s/javascript-variable-scope.md rename to snippets/js/s/variable-scope.md diff --git a/snippets/articles/s/javascript-void-links.md b/snippets/js/s/void-links.md similarity index 100% rename from snippets/articles/s/javascript-void-links.md rename to snippets/js/s/void-links.md From 2e31d65a39004926d42cec4ef73b8e932dd966b8 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:28:40 +0300 Subject: [PATCH 03/13] Rename snippets with potential naming conflicts --- collections/js/dom-manipulation.yaml | 2 +- .../s/{js-create-element.md => js-create-html-elements.md} | 0 snippets/js/s/{callbacks.md => callback-pitfalls.md} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename snippets/articles/s/{js-create-element.md => js-create-html-elements.md} (100%) rename snippets/js/s/{callbacks.md => callback-pitfalls.md} (100%) diff --git a/collections/js/dom-manipulation.yaml b/collections/js/dom-manipulation.yaml index 0839aa43b..c59d3c4c7 100644 --- a/collections/js/dom-manipulation.yaml +++ b/collections/js/dom-manipulation.yaml @@ -2,7 +2,7 @@ slug: js/dom-manipulation name: JavaScript DOM Manipulation featured: true snippetIds: - - articles/s/js-create-element + - articles/s/js-create-html-elements - js/s/create-element - js/s/remove-element - js/s/insert-after diff --git a/snippets/articles/s/js-create-element.md b/snippets/articles/s/js-create-html-elements.md similarity index 100% rename from snippets/articles/s/js-create-element.md rename to snippets/articles/s/js-create-html-elements.md diff --git a/snippets/js/s/callbacks.md b/snippets/js/s/callback-pitfalls.md similarity index 100% rename from snippets/js/s/callbacks.md rename to snippets/js/s/callback-pitfalls.md From 00f280bd160e6459e1bb0ae3e76e16fbd9485760 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:29:52 +0300 Subject: [PATCH 04/13] Rename articles prefixed with `js-` --- collections/js/array-initialization.yaml | 2 +- collections/js/array-methods.yaml | 6 ++--- collections/js/data-structures.yaml | 20 ++++++++-------- collections/js/dom-manipulation.yaml | 2 +- collections/js/dom-querying.yaml | 2 +- collections/js/interviews.yaml | 8 +++---- collections/js/performance.yaml | 8 +++---- collections/js/proxy.yaml | 14 +++++------ collections/js/url.yaml | 6 ++--- snippets/articles/s/big-o-cheatsheet.md | 24 +++++++++---------- snippets/articles/s/cors-explained.md | 2 +- .../js-abort-fetch.md => js/s/abort-fetch.md} | 0 .../s/append-elements-to-array.md} | 0 .../s/array-filtering-tips.md} | 0 .../s/array-initialization.md} | 0 .../s/array-map-vs-foreach.md} | 0 .../s/array-min-max.md} | 0 .../s/array-sorting-shorthand.md} | 0 .../js-async-defer.md => js/s/async-defer.md} | 0 .../s/js-callbacks.md => js/s/callbacks.md} | 0 .../s/cannot-extend-proxy-object.md} | 0 ...compare-string-case-accent-insensitive.md} | 0 .../s/construct-url.md} | 2 +- .../s/create-html-elements.md} | 0 .../s/data-structures-binary-search-tree.md} | 0 .../s/data-structures-binary-tree.md} | 0 .../s/data-structures-doubly-linked-list.md} | 0 .../s/data-structures-graph.md} | 0 .../s/data-structures-linked-list.md} | 0 .../s/data-structures-queue.md} | 0 .../s/data-structures-stack.md} | 0 .../s/data-structures-tree.md} | 0 .../s/decimal-to-hex.md} | 0 .../s/detect-undefined-object-property.md} | 0 .../s/double-negation-operator.md} | 0 .../s/dynamic-getter-chain-proxy.md} | 2 +- .../s/dynamic-getter-setter-proxy.md} | 0 .../s/dynamic-properties-are-slow.md} | 0 .../s/edit-url-params.md} | 0 .../s/element-from-point.md} | 0 .../s/email-validation.md} | 0 .../s/fast-remove-array-element.md} | 0 .../s/frequency-map-data-structure.md} | 0 .../s/immutable-object-proxy.md} | 0 snippets/js/s/iterators.md | 2 +- .../s/last-element-of-array.md} | 0 .../s/locale-sensitive-string-truncation.md} | 0 .../s/map-vs-object.md} | 0 .../s/native-data-structures.md} | 0 .../s/object-freeze-vs-seal.md} | 0 .../s/proxy-array-negative-index.md} | 0 .../s/proxy-introduction.md} | 0 .../s/remove-array-duplicates.md} | 0 .../s/remove-element-from-array.md} | 2 +- .../s/remove-trailing-zeros.md} | 0 .../s/replace-all-occurences-of-string.md} | 0 .../s/spread-operator-tricks.md} | 0 .../s/static-instance-methods.md} | 0 .../s/textcontent-or-innertext.md} | 0 .../s/timeout-interval-delay.md} | 0 .../s/typecheck-array.md} | 0 .../s/typecheck-proxy.md} | 0 .../s/window-location-cheatsheet.md} | 0 63 files changed, 51 insertions(+), 51 deletions(-) rename snippets/{articles/s/js-abort-fetch.md => js/s/abort-fetch.md} (100%) rename snippets/{articles/s/js-append-elements-to-array.md => js/s/append-elements-to-array.md} (100%) rename snippets/{articles/s/js-array-filtering-tips.md => js/s/array-filtering-tips.md} (100%) rename snippets/{articles/s/js-array-initialization.md => js/s/array-initialization.md} (100%) rename snippets/{articles/s/js-array-map-vs-foreach.md => js/s/array-map-vs-foreach.md} (100%) rename snippets/{articles/s/js-array-min-max.md => js/s/array-min-max.md} (100%) rename snippets/{articles/s/js-array-sorting-shorthand.md => js/s/array-sorting-shorthand.md} (100%) rename snippets/{articles/s/js-async-defer.md => js/s/async-defer.md} (100%) rename snippets/{articles/s/js-callbacks.md => js/s/callbacks.md} (100%) rename snippets/{articles/s/js-cannot-extend-proxy-object.md => js/s/cannot-extend-proxy-object.md} (100%) rename snippets/{articles/s/js-compare-string-case-accent-insensitive.md => js/s/compare-string-case-accent-insensitive.md} (100%) rename snippets/{articles/s/js-construct-url.md => js/s/construct-url.md} (95%) rename snippets/{articles/s/js-create-html-elements.md => js/s/create-html-elements.md} (100%) rename snippets/{articles/s/js-data-structures-binary-search-tree.md => js/s/data-structures-binary-search-tree.md} (100%) rename snippets/{articles/s/js-data-structures-binary-tree.md => js/s/data-structures-binary-tree.md} (100%) rename snippets/{articles/s/js-data-structures-doubly-linked-list.md => js/s/data-structures-doubly-linked-list.md} (100%) rename snippets/{articles/s/js-data-structures-graph.md => js/s/data-structures-graph.md} (100%) rename snippets/{articles/s/js-data-structures-linked-list.md => js/s/data-structures-linked-list.md} (100%) rename snippets/{articles/s/js-data-structures-queue.md => js/s/data-structures-queue.md} (100%) rename snippets/{articles/s/js-data-structures-stack.md => js/s/data-structures-stack.md} (100%) rename snippets/{articles/s/js-data-structures-tree.md => js/s/data-structures-tree.md} (100%) rename snippets/{articles/s/js-decimal-to-hex.md => js/s/decimal-to-hex.md} (100%) rename snippets/{articles/s/js-detect-undefined-object-property.md => js/s/detect-undefined-object-property.md} (100%) rename snippets/{articles/s/js-double-negation-operator.md => js/s/double-negation-operator.md} (100%) rename snippets/{articles/s/js-dynamic-getter-chain-proxy.md => js/s/dynamic-getter-chain-proxy.md} (95%) rename snippets/{articles/s/js-dynamic-getter-setter-proxy.md => js/s/dynamic-getter-setter-proxy.md} (100%) rename snippets/{articles/s/js-dynamic-properties-are-slow.md => js/s/dynamic-properties-are-slow.md} (100%) rename snippets/{articles/s/js-edit-url-params.md => js/s/edit-url-params.md} (100%) rename snippets/{articles/s/js-element-from-point.md => js/s/element-from-point.md} (100%) rename snippets/{articles/s/js-email-validation.md => js/s/email-validation.md} (100%) rename snippets/{articles/s/js-fast-remove-array-element.md => js/s/fast-remove-array-element.md} (100%) rename snippets/{articles/s/js-frequency-map-data-structure.md => js/s/frequency-map-data-structure.md} (100%) rename snippets/{articles/s/js-immutable-object-proxy.md => js/s/immutable-object-proxy.md} (100%) rename snippets/{articles/s/js-last-element-of-array.md => js/s/last-element-of-array.md} (100%) rename snippets/{articles/s/js-locale-sensitive-string-truncation.md => js/s/locale-sensitive-string-truncation.md} (100%) rename snippets/{articles/s/js-map-vs-object.md => js/s/map-vs-object.md} (100%) rename snippets/{articles/s/js-native-data-structures.md => js/s/native-data-structures.md} (100%) rename snippets/{articles/s/js-object-freeze-vs-seal.md => js/s/object-freeze-vs-seal.md} (100%) rename snippets/{articles/s/js-proxy-array-negative-index.md => js/s/proxy-array-negative-index.md} (100%) rename snippets/{articles/s/js-proxy-introduction.md => js/s/proxy-introduction.md} (100%) rename snippets/{articles/s/js-remove-array-duplicates.md => js/s/remove-array-duplicates.md} (100%) rename snippets/{articles/s/js-remove-element-from-array.md => js/s/remove-element-from-array.md} (94%) rename snippets/{articles/s/js-remove-trailing-zeros.md => js/s/remove-trailing-zeros.md} (100%) rename snippets/{articles/s/js-replace-all-occurences-of-string.md => js/s/replace-all-occurences-of-string.md} (100%) rename snippets/{articles/s/js-spread-operator-tricks.md => js/s/spread-operator-tricks.md} (100%) rename snippets/{articles/s/js-static-instance-methods.md => js/s/static-instance-methods.md} (100%) rename snippets/{articles/s/js-textcontent-or-innertext.md => js/s/textcontent-or-innertext.md} (100%) rename snippets/{articles/s/js-timeout-interval-delay.md => js/s/timeout-interval-delay.md} (100%) rename snippets/{articles/s/js-typecheck-array.md => js/s/typecheck-array.md} (100%) rename snippets/{articles/s/js-typecheck-proxy.md => js/s/typecheck-proxy.md} (100%) rename snippets/{articles/s/js-window-location-cheatsheet.md => js/s/window-location-cheatsheet.md} (100%) diff --git a/collections/js/array-initialization.yaml b/collections/js/array-initialization.yaml index ce70236c7..2b941567e 100644 --- a/collections/js/array-initialization.yaml +++ b/collections/js/array-initialization.yaml @@ -2,7 +2,7 @@ slug: js/array-initialization name: JavaScript Array Initialization featured: true snippetIds: - - articles/s/js-array-initialization + - js/s/array-initialization - js/s/initialize-array-with-values - js/s/initialize-array-with-range - js/s/initialize-array-with-range-right diff --git a/collections/js/array-methods.yaml b/collections/js/array-methods.yaml index 3a37e5602..3df13c32b 100644 --- a/collections/js/array-methods.yaml +++ b/collections/js/array-methods.yaml @@ -2,15 +2,15 @@ slug: js/array-methods name: JavaScript Array Methods featured: true snippetIds: - - articles/s/js-array-map-vs-foreach + - js/s/array-map-vs-foreach - articles/s/4-javascript-array-methods - js/s/array-comparison - js/s/index-for-of-loop - js/s/for-loop-early-break - - articles/s/js-array-initialization + - js/s/array-initialization - articles/s/code-anatomy-chaining-reduce-for-loop - js/s/async-array-loops - - articles/s/js-typecheck-array + - js/s/typecheck-array splash: laptop-lamp.png description: >- JavaScript arrays offer a lot of data manipulation and transformation methods. diff --git a/collections/js/data-structures.yaml b/collections/js/data-structures.yaml index 06a67cceb..910dc9ef0 100644 --- a/collections/js/data-structures.yaml +++ b/collections/js/data-structures.yaml @@ -4,16 +4,16 @@ miniName: Data Structures parent: js featured: true snippetIds: - - articles/s/js-native-data-structures - - articles/s/js-data-structures-queue - - articles/s/js-data-structures-stack - - articles/s/js-data-structures-linked-list - - articles/s/js-data-structures-doubly-linked-list - - articles/s/js-data-structures-graph - - articles/s/js-data-structures-tree - - articles/s/js-data-structures-binary-tree - - articles/s/js-data-structures-binary-search-tree - - articles/s/js-frequency-map-data-structure + - js/s/native-data-structures + - js/s/data-structures-queue + - js/s/data-structures-stack + - js/s/data-structures-linked-list + - js/s/data-structures-doubly-linked-list + - js/s/data-structures-graph + - js/s/data-structures-tree + - js/s/data-structures-binary-tree + - js/s/data-structures-binary-search-tree + - js/s/frequency-map-data-structure - articles/s/big-o-cheatsheet splash: purple-flower.png description: >- diff --git a/collections/js/dom-manipulation.yaml b/collections/js/dom-manipulation.yaml index c59d3c4c7..4d47acf6e 100644 --- a/collections/js/dom-manipulation.yaml +++ b/collections/js/dom-manipulation.yaml @@ -2,7 +2,7 @@ slug: js/dom-manipulation name: JavaScript DOM Manipulation featured: true snippetIds: - - articles/s/js-create-html-elements + - js/s/create-html-elements - js/s/create-element - js/s/remove-element - js/s/insert-after diff --git a/collections/js/dom-querying.yaml b/collections/js/dom-querying.yaml index c94407e32..e38bfc216 100644 --- a/collections/js/dom-querying.yaml +++ b/collections/js/dom-querying.yaml @@ -13,7 +13,7 @@ snippetIds: - js/s/element-is-visible-in-viewport - articles/s/select-focused-dom-element - js/s/get-elements-bigger-than-viewport - - articles/s/js-element-from-point + - js/s/element-from-point - js/s/element-is-focused - js/s/get-vertical-offset - js/s/store-dom-items diff --git a/collections/js/interviews.yaml b/collections/js/interviews.yaml index e7f5bcdaf..31365e471 100644 --- a/collections/js/interviews.yaml +++ b/collections/js/interviews.yaml @@ -10,7 +10,7 @@ snippetIds: - js/s/undeclared-undefined-null - js/s/variable-hoisting - js/s/variable-scope - - articles/s/js-callbacks + - js/s/callbacks - js/s/pass-by-reference-or-pass-by-value - js/s/promises - js/s/sync-async @@ -21,17 +21,17 @@ snippetIds: - js/s/object-comparison - js/s/array-comparison - js/s/array-includes-value - - articles/s/js-array-map-vs-foreach + - js/s/array-map-vs-foreach - js/s/event-bubbling-capturing-delegation - js/s/value-not-equal-to-itself - js/s/blank-value - js/s/string-immutability - - articles/s/js-static-instance-methods + - js/s/static-instance-methods - js/s/arrow-functions - js/s/pure-functions - js/s/recursion - js/s/use-strict - - articles/s/js-async-defer + - js/s/async-defer - js/s/closures - js/s/iife - js/s/event-loop-explained diff --git a/collections/js/performance.yaml b/collections/js/performance.yaml index 72795c792..2ef835923 100644 --- a/collections/js/performance.yaml +++ b/collections/js/performance.yaml @@ -4,13 +4,13 @@ featured: true snippetIds: - js/s/store-dom-items - articles/s/passive-scroll-listener-performance - - articles/s/js-textcontent-or-innertext + - js/s/textcontent-or-innertext - js/s/memoization - - articles/s/js-array-filtering-tips - - articles/s/js-fast-remove-array-element + - js/s/array-filtering-tips + - js/s/fast-remove-array-element - articles/s/code-anatomy-optimizing-recursion - js/s/switch-object - - articles/s/js-dynamic-properties-are-slow + - js/s/dynamic-properties-are-slow - articles/s/big-o-cheatsheet splash: do-more-computer.png description: >- diff --git a/collections/js/proxy.yaml b/collections/js/proxy.yaml index 3a0e47ba9..4a5076282 100644 --- a/collections/js/proxy.yaml +++ b/collections/js/proxy.yaml @@ -2,15 +2,15 @@ slug: js/proxy name: JavaScript Proxy featured: true snippetIds: - - articles/s/js-proxy-introduction - - articles/s/js-dynamic-getter-setter-proxy - - articles/s/js-immutable-object-proxy + - js/s/proxy-introduction + - js/s/dynamic-getter-setter-proxy + - js/s/immutable-object-proxy - js/s/singleton-proxy - - articles/s/js-dynamic-getter-chain-proxy + - js/s/dynamic-getter-chain-proxy - js/s/object-array-proxy - - articles/s/js-proxy-array-negative-index - - articles/s/js-cannot-extend-proxy-object - - articles/s/js-typecheck-proxy + - js/s/proxy-array-negative-index + - js/s/cannot-extend-proxy-object + - js/s/typecheck-proxy splash: laptop-coffee.png description: >- The JavaScript Proxy object can be a very powerful tool to extend the diff --git a/collections/js/url.yaml b/collections/js/url.yaml index 595e2d76a..d96724984 100644 --- a/collections/js/url.yaml +++ b/collections/js/url.yaml @@ -3,10 +3,10 @@ name: URLs in JavaScript featured: true snippetIds: - js/s/modify-url-without-reload - - articles/s/js-construct-url - - articles/s/js-edit-url-params + - js/s/construct-url + - js/s/edit-url-params - js/s/reload-page - - articles/s/js-window-location-cheatsheet + - js/s/window-location-cheatsheet - js/s/current-url - js/s/https-redirect - js/s/get-url-parameters diff --git a/snippets/articles/s/big-o-cheatsheet.md b/snippets/articles/s/big-o-cheatsheet.md index efc945464..75a38630d 100644 --- a/snippets/articles/s/big-o-cheatsheet.md +++ b/snippets/articles/s/big-o-cheatsheet.md @@ -27,27 +27,27 @@ Different data structures have different time complexities for the same operatio | Data Structure | Access | Search | Insertion | Deletion | | --- | --- | --- | --- | --- | -| [**Array**](/articles/s/js-native-data-structures) | Θ(1) | Θ(n) | Θ(n) | Θ(n) | -| [**Queue**](/articles/s/js-data-structures-queue) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | -| [**Stack**](/articles/s/js-data-structures-stack) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | -| [**Linked List**](/articles/s/js-data-structures-linked-list) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | -| [**Doubly Linked List**](/articles/s/js-data-structures-doubly-linked-list) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | +| [**Array**](/js/s/native-data-structures) | Θ(1) | Θ(n) | Θ(n) | Θ(n) | +| [**Queue**](/js/s/data-structures-queue) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | +| [**Stack**](/js/s/data-structures-stack) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | +| [**Linked List**](/js/s/data-structures-linked-list) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | +| [**Doubly Linked List**](/js/s/data-structures-doubly-linked-list) | Θ(n) | Θ(n) | Θ(1) | Θ(1) | | **Skip List** | Θ(log n) | Θ(log n) | Θ(log n) | Θ(log n) | | **Hash Table** | N/A | Θ(1) | Θ(1) | Θ(1) | -| [**Binary Search Tree**](/articles/s/js-data-structures-binary-search-tree) | Θ(log n) | Θ(log n) | Θ(log n) | Θ(log n) | +| [**Binary Search Tree**](/js/s/data-structures-binary-search-tree) | Θ(log n) | Θ(log n) | Θ(log n) | Θ(log n) | #### Worst time complexity | Data Structure | Access | Search | Insertion | Deletion | | --- | --- | --- | --- | --- | -| [**Array**](/articles/s/js-native-data-structures) | O(1) | O(n) | O(n) | O(n) | -| [**Queue**](/articles/s/js-data-structures-queue) | O(n) | O(n) | O(1) | O(1) | -| [**Stack**](/articles/s/js-data-structures-stack) | O(n) | O(n) | O(1) | O(1) | -| [**Linked List**](/articles/s/js-data-structures-linked-list) | O(n) | O(n) | O(1) | O(1) | -| [**Doubly Linked List**](/articles/s/js-data-structures-doubly-linked-list) | O(n) | O(n) | O(1) | O(1) | +| [**Array**](/js/s/native-data-structures) | O(1) | O(n) | O(n) | O(n) | +| [**Queue**](/js/s/data-structures-queue) | O(n) | O(n) | O(1) | O(1) | +| [**Stack**](/js/s/data-structures-stack) | O(n) | O(n) | O(1) | O(1) | +| [**Linked List**](/js/s/data-structures-linked-list) | O(n) | O(n) | O(1) | O(1) | +| [**Doubly Linked List**](/js/s/data-structures-doubly-linked-list) | O(n) | O(n) | O(1) | O(1) | | **Skip List** | O(n) | O(n) | O(n) | O(n) | | **Hash Table** | N/A | O(n) | O(n) | O(n) | -| [**Binary Search Tree**](/articles/s/js-data-structures-binary-search-tree) | O(n) | O(n) | O(n) | O(n) | +| [**Binary Search Tree**](/js/s/data-structures-binary-search-tree) | O(n) | O(n) | O(n) | O(n) | ### Array sorting algorithms diff --git a/snippets/articles/s/cors-explained.md b/snippets/articles/s/cors-explained.md index b6df95bbe..7aa1eb630 100644 --- a/snippets/articles/s/cors-explained.md +++ b/snippets/articles/s/cors-explained.md @@ -10,7 +10,7 @@ excerpt: CORS (Cross-Origin Resource Sharing) trips up many developers, but it's dateModified: 2023-05-07T05:00:00-04:00 --- -When it comes to HTTP, an **origin** is defined by several different aspects of a URL. As mentioned in a [previous article](/articles/s/js-window-location-cheatsheet/), the origin is composed of the following: +When it comes to HTTP, an **origin** is defined by several different aspects of a URL. As mentioned in a [previous article](/js/s/window-location-cheatsheet/), the origin is composed of the following: - The **protocol** (e.g. `http` or `https`) - The **hostname** (e.g. `30secondsofcode.org`) diff --git a/snippets/articles/s/js-abort-fetch.md b/snippets/js/s/abort-fetch.md similarity index 100% rename from snippets/articles/s/js-abort-fetch.md rename to snippets/js/s/abort-fetch.md diff --git a/snippets/articles/s/js-append-elements-to-array.md b/snippets/js/s/append-elements-to-array.md similarity index 100% rename from snippets/articles/s/js-append-elements-to-array.md rename to snippets/js/s/append-elements-to-array.md diff --git a/snippets/articles/s/js-array-filtering-tips.md b/snippets/js/s/array-filtering-tips.md similarity index 100% rename from snippets/articles/s/js-array-filtering-tips.md rename to snippets/js/s/array-filtering-tips.md diff --git a/snippets/articles/s/js-array-initialization.md b/snippets/js/s/array-initialization.md similarity index 100% rename from snippets/articles/s/js-array-initialization.md rename to snippets/js/s/array-initialization.md diff --git a/snippets/articles/s/js-array-map-vs-foreach.md b/snippets/js/s/array-map-vs-foreach.md similarity index 100% rename from snippets/articles/s/js-array-map-vs-foreach.md rename to snippets/js/s/array-map-vs-foreach.md diff --git a/snippets/articles/s/js-array-min-max.md b/snippets/js/s/array-min-max.md similarity index 100% rename from snippets/articles/s/js-array-min-max.md rename to snippets/js/s/array-min-max.md diff --git a/snippets/articles/s/js-array-sorting-shorthand.md b/snippets/js/s/array-sorting-shorthand.md similarity index 100% rename from snippets/articles/s/js-array-sorting-shorthand.md rename to snippets/js/s/array-sorting-shorthand.md diff --git a/snippets/articles/s/js-async-defer.md b/snippets/js/s/async-defer.md similarity index 100% rename from snippets/articles/s/js-async-defer.md rename to snippets/js/s/async-defer.md diff --git a/snippets/articles/s/js-callbacks.md b/snippets/js/s/callbacks.md similarity index 100% rename from snippets/articles/s/js-callbacks.md rename to snippets/js/s/callbacks.md diff --git a/snippets/articles/s/js-cannot-extend-proxy-object.md b/snippets/js/s/cannot-extend-proxy-object.md similarity index 100% rename from snippets/articles/s/js-cannot-extend-proxy-object.md rename to snippets/js/s/cannot-extend-proxy-object.md diff --git a/snippets/articles/s/js-compare-string-case-accent-insensitive.md b/snippets/js/s/compare-string-case-accent-insensitive.md similarity index 100% rename from snippets/articles/s/js-compare-string-case-accent-insensitive.md rename to snippets/js/s/compare-string-case-accent-insensitive.md diff --git a/snippets/articles/s/js-construct-url.md b/snippets/js/s/construct-url.md similarity index 95% rename from snippets/articles/s/js-construct-url.md rename to snippets/js/s/construct-url.md index 1ff3793fe..066d69e05 100644 --- a/snippets/articles/s/js-construct-url.md +++ b/snippets/js/s/construct-url.md @@ -63,4 +63,4 @@ url.toString(); Admittedly, using the `URL` object can be a bit more verbose, but it's a worthwhile tradeoff. The code is much more readable and maintainable, and it's less prone to errors. Query parameters are now encoded properly, and delimiters are added automatically. -While query parameters are the most common issue when dealing with URLs, the `URL` object can be useful in many other situations. For example, you can change the protocol, hostname, port, path, hash, etc. of a URL, or even parse an existing URL into its components. If you're interested, you should check out previous articles about how you can [edit URL parameters](/articles/s/js-edit-url-params) and the [`window.location` cheat sheet](/articles/s/js-window-location-cheatsheet). +While query parameters are the most common issue when dealing with URLs, the `URL` object can be useful in many other situations. For example, you can change the protocol, hostname, port, path, hash, etc. of a URL, or even parse an existing URL into its components. If you're interested, you should check out previous articles about how you can [edit URL parameters](/js/s/edit-url-params) and the [`window.location` cheat sheet](/js/s/window-location-cheatsheet). diff --git a/snippets/articles/s/js-create-html-elements.md b/snippets/js/s/create-html-elements.md similarity index 100% rename from snippets/articles/s/js-create-html-elements.md rename to snippets/js/s/create-html-elements.md diff --git a/snippets/articles/s/js-data-structures-binary-search-tree.md b/snippets/js/s/data-structures-binary-search-tree.md similarity index 100% rename from snippets/articles/s/js-data-structures-binary-search-tree.md rename to snippets/js/s/data-structures-binary-search-tree.md diff --git a/snippets/articles/s/js-data-structures-binary-tree.md b/snippets/js/s/data-structures-binary-tree.md similarity index 100% rename from snippets/articles/s/js-data-structures-binary-tree.md rename to snippets/js/s/data-structures-binary-tree.md diff --git a/snippets/articles/s/js-data-structures-doubly-linked-list.md b/snippets/js/s/data-structures-doubly-linked-list.md similarity index 100% rename from snippets/articles/s/js-data-structures-doubly-linked-list.md rename to snippets/js/s/data-structures-doubly-linked-list.md diff --git a/snippets/articles/s/js-data-structures-graph.md b/snippets/js/s/data-structures-graph.md similarity index 100% rename from snippets/articles/s/js-data-structures-graph.md rename to snippets/js/s/data-structures-graph.md diff --git a/snippets/articles/s/js-data-structures-linked-list.md b/snippets/js/s/data-structures-linked-list.md similarity index 100% rename from snippets/articles/s/js-data-structures-linked-list.md rename to snippets/js/s/data-structures-linked-list.md diff --git a/snippets/articles/s/js-data-structures-queue.md b/snippets/js/s/data-structures-queue.md similarity index 100% rename from snippets/articles/s/js-data-structures-queue.md rename to snippets/js/s/data-structures-queue.md diff --git a/snippets/articles/s/js-data-structures-stack.md b/snippets/js/s/data-structures-stack.md similarity index 100% rename from snippets/articles/s/js-data-structures-stack.md rename to snippets/js/s/data-structures-stack.md diff --git a/snippets/articles/s/js-data-structures-tree.md b/snippets/js/s/data-structures-tree.md similarity index 100% rename from snippets/articles/s/js-data-structures-tree.md rename to snippets/js/s/data-structures-tree.md diff --git a/snippets/articles/s/js-decimal-to-hex.md b/snippets/js/s/decimal-to-hex.md similarity index 100% rename from snippets/articles/s/js-decimal-to-hex.md rename to snippets/js/s/decimal-to-hex.md diff --git a/snippets/articles/s/js-detect-undefined-object-property.md b/snippets/js/s/detect-undefined-object-property.md similarity index 100% rename from snippets/articles/s/js-detect-undefined-object-property.md rename to snippets/js/s/detect-undefined-object-property.md diff --git a/snippets/articles/s/js-double-negation-operator.md b/snippets/js/s/double-negation-operator.md similarity index 100% rename from snippets/articles/s/js-double-negation-operator.md rename to snippets/js/s/double-negation-operator.md diff --git a/snippets/articles/s/js-dynamic-getter-chain-proxy.md b/snippets/js/s/dynamic-getter-chain-proxy.md similarity index 95% rename from snippets/articles/s/js-dynamic-getter-chain-proxy.md rename to snippets/js/s/dynamic-getter-chain-proxy.md index a6c8d4eca..f4c202fce 100644 --- a/snippets/articles/s/js-dynamic-getter-chain-proxy.md +++ b/snippets/js/s/dynamic-getter-chain-proxy.md @@ -12,7 +12,7 @@ dateModified: 2023-05-28T05:00:00-04:00 The dawn of ES6 brought about jQuery's fall from grace, as a lot of the conveniences it afforded developers were now available in the language itself. However, jQuery's API design was convenient in many ways that native JavaScript often isn't. One of the most practical things jQuery offered was its ability to chain methods together, minimizing duplication and making code more readable. -Looking at the use case at hand, I thought that I could stitch together a general-purpose solution using JavaScript's `Proxy` object. In fact, I think that the concept of dynamic getters and setters that I described in [my previous post](/articles/s/js-dynamic-getter-setter-proxy) is a great place to start. +Looking at the use case at hand, I thought that I could stitch together a general-purpose solution using JavaScript's `Proxy` object. In fact, I think that the concept of dynamic getters and setters that I described in [my previous post](/js/s/dynamic-getter-setter-proxy) is a great place to start. To recap, intercepting the behavior of the `get` and `set` traps of a `Proxy` object allows us to create dynamic accessors for objects. This is particularly useful when the shape of the data is not known in advance, or when the value of a property needs to be manipulated before it is returned. diff --git a/snippets/articles/s/js-dynamic-getter-setter-proxy.md b/snippets/js/s/dynamic-getter-setter-proxy.md similarity index 100% rename from snippets/articles/s/js-dynamic-getter-setter-proxy.md rename to snippets/js/s/dynamic-getter-setter-proxy.md diff --git a/snippets/articles/s/js-dynamic-properties-are-slow.md b/snippets/js/s/dynamic-properties-are-slow.md similarity index 100% rename from snippets/articles/s/js-dynamic-properties-are-slow.md rename to snippets/js/s/dynamic-properties-are-slow.md diff --git a/snippets/articles/s/js-edit-url-params.md b/snippets/js/s/edit-url-params.md similarity index 100% rename from snippets/articles/s/js-edit-url-params.md rename to snippets/js/s/edit-url-params.md diff --git a/snippets/articles/s/js-element-from-point.md b/snippets/js/s/element-from-point.md similarity index 100% rename from snippets/articles/s/js-element-from-point.md rename to snippets/js/s/element-from-point.md diff --git a/snippets/articles/s/js-email-validation.md b/snippets/js/s/email-validation.md similarity index 100% rename from snippets/articles/s/js-email-validation.md rename to snippets/js/s/email-validation.md diff --git a/snippets/articles/s/js-fast-remove-array-element.md b/snippets/js/s/fast-remove-array-element.md similarity index 100% rename from snippets/articles/s/js-fast-remove-array-element.md rename to snippets/js/s/fast-remove-array-element.md diff --git a/snippets/articles/s/js-frequency-map-data-structure.md b/snippets/js/s/frequency-map-data-structure.md similarity index 100% rename from snippets/articles/s/js-frequency-map-data-structure.md rename to snippets/js/s/frequency-map-data-structure.md diff --git a/snippets/articles/s/js-immutable-object-proxy.md b/snippets/js/s/immutable-object-proxy.md similarity index 100% rename from snippets/articles/s/js-immutable-object-proxy.md rename to snippets/js/s/immutable-object-proxy.md diff --git a/snippets/js/s/iterators.md b/snippets/js/s/iterators.md index b8d5cd7a9..d7ea905c5 100644 --- a/snippets/js/s/iterators.md +++ b/snippets/js/s/iterators.md @@ -54,7 +54,7 @@ for (let item of myList) { } ``` -In the above example, we implement a [`LinkedList` data structure](/articles/s/js-data-structures-linked-list), that internally uses a `data` array. Each item in it has a `value` and some implementation-specific properties used to determine its position in the sequence. Objects constructed from this class are not iterable by default. To define an iterator we use `Symbol.iterator` and set it up so that the returned sequence is in order based on the internal implementation of the class, while the returned items only return their `value`. +In the above example, we implement a [`LinkedList` data structure](/js/s/data-structures-linked-list), that internally uses a `data` array. Each item in it has a `value` and some implementation-specific properties used to determine its position in the sequence. Objects constructed from this class are not iterable by default. To define an iterator we use `Symbol.iterator` and set it up so that the returned sequence is in order based on the internal implementation of the class, while the returned items only return their `value`. On a related note, iterators are just functions, meaning they can be called like any other function (e.g. to delegate the iteration to an existing iterator), while also not being restricted to the `Symbol.iterator` name. This allows us to define multiple iterators for the same object. Here's an example of these concepts at play: diff --git a/snippets/articles/s/js-last-element-of-array.md b/snippets/js/s/last-element-of-array.md similarity index 100% rename from snippets/articles/s/js-last-element-of-array.md rename to snippets/js/s/last-element-of-array.md diff --git a/snippets/articles/s/js-locale-sensitive-string-truncation.md b/snippets/js/s/locale-sensitive-string-truncation.md similarity index 100% rename from snippets/articles/s/js-locale-sensitive-string-truncation.md rename to snippets/js/s/locale-sensitive-string-truncation.md diff --git a/snippets/articles/s/js-map-vs-object.md b/snippets/js/s/map-vs-object.md similarity index 100% rename from snippets/articles/s/js-map-vs-object.md rename to snippets/js/s/map-vs-object.md diff --git a/snippets/articles/s/js-native-data-structures.md b/snippets/js/s/native-data-structures.md similarity index 100% rename from snippets/articles/s/js-native-data-structures.md rename to snippets/js/s/native-data-structures.md diff --git a/snippets/articles/s/js-object-freeze-vs-seal.md b/snippets/js/s/object-freeze-vs-seal.md similarity index 100% rename from snippets/articles/s/js-object-freeze-vs-seal.md rename to snippets/js/s/object-freeze-vs-seal.md diff --git a/snippets/articles/s/js-proxy-array-negative-index.md b/snippets/js/s/proxy-array-negative-index.md similarity index 100% rename from snippets/articles/s/js-proxy-array-negative-index.md rename to snippets/js/s/proxy-array-negative-index.md diff --git a/snippets/articles/s/js-proxy-introduction.md b/snippets/js/s/proxy-introduction.md similarity index 100% rename from snippets/articles/s/js-proxy-introduction.md rename to snippets/js/s/proxy-introduction.md diff --git a/snippets/articles/s/js-remove-array-duplicates.md b/snippets/js/s/remove-array-duplicates.md similarity index 100% rename from snippets/articles/s/js-remove-array-duplicates.md rename to snippets/js/s/remove-array-duplicates.md diff --git a/snippets/articles/s/js-remove-element-from-array.md b/snippets/js/s/remove-element-from-array.md similarity index 94% rename from snippets/articles/s/js-remove-element-from-array.md rename to snippets/js/s/remove-element-from-array.md index adf0c2b7d..d407b82a1 100644 --- a/snippets/articles/s/js-remove-element-from-array.md +++ b/snippets/js/s/remove-element-from-array.md @@ -40,5 +40,5 @@ Most of the time, `Array.prototype.filter()` is the best option for removing ele ### Alternative options -The previous two options should cover the vast majority of use cases. Yet, there are some other options available for removing elements from an array, which might be preferable in certain cases. For example, if you like the interface of `Array.prototype.splice()` but need immutability, the [shank snippet](/js/s/shank) might be the solution for you. Similarly, when working with large unsorted arrays, there's a [fast removal trick](/articles/s/js-fast-remove-array-element) that might be of interest to you. +The previous two options should cover the vast majority of use cases. Yet, there are some other options available for removing elements from an array, which might be preferable in certain cases. For example, if you like the interface of `Array.prototype.splice()` but need immutability, the [shank snippet](/js/s/shank) might be the solution for you. Similarly, when working with large unsorted arrays, there's a [fast removal trick](/js/s/fast-remove-array-element) that might be of interest to you. diff --git a/snippets/articles/s/js-remove-trailing-zeros.md b/snippets/js/s/remove-trailing-zeros.md similarity index 100% rename from snippets/articles/s/js-remove-trailing-zeros.md rename to snippets/js/s/remove-trailing-zeros.md diff --git a/snippets/articles/s/js-replace-all-occurences-of-string.md b/snippets/js/s/replace-all-occurences-of-string.md similarity index 100% rename from snippets/articles/s/js-replace-all-occurences-of-string.md rename to snippets/js/s/replace-all-occurences-of-string.md diff --git a/snippets/articles/s/js-spread-operator-tricks.md b/snippets/js/s/spread-operator-tricks.md similarity index 100% rename from snippets/articles/s/js-spread-operator-tricks.md rename to snippets/js/s/spread-operator-tricks.md diff --git a/snippets/articles/s/js-static-instance-methods.md b/snippets/js/s/static-instance-methods.md similarity index 100% rename from snippets/articles/s/js-static-instance-methods.md rename to snippets/js/s/static-instance-methods.md diff --git a/snippets/articles/s/js-textcontent-or-innertext.md b/snippets/js/s/textcontent-or-innertext.md similarity index 100% rename from snippets/articles/s/js-textcontent-or-innertext.md rename to snippets/js/s/textcontent-or-innertext.md diff --git a/snippets/articles/s/js-timeout-interval-delay.md b/snippets/js/s/timeout-interval-delay.md similarity index 100% rename from snippets/articles/s/js-timeout-interval-delay.md rename to snippets/js/s/timeout-interval-delay.md diff --git a/snippets/articles/s/js-typecheck-array.md b/snippets/js/s/typecheck-array.md similarity index 100% rename from snippets/articles/s/js-typecheck-array.md rename to snippets/js/s/typecheck-array.md diff --git a/snippets/articles/s/js-typecheck-proxy.md b/snippets/js/s/typecheck-proxy.md similarity index 100% rename from snippets/articles/s/js-typecheck-proxy.md rename to snippets/js/s/typecheck-proxy.md diff --git a/snippets/articles/s/js-window-location-cheatsheet.md b/snippets/js/s/window-location-cheatsheet.md similarity index 100% rename from snippets/articles/s/js-window-location-cheatsheet.md rename to snippets/js/s/window-location-cheatsheet.md From a55cf4511201ebb4bbbb3a97bfb1c6c0c877cac9 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:32:28 +0300 Subject: [PATCH 05/13] Rename articles prefixed with `python-` --- .../{articles/s/python-bare-except.md => python/s/bare-except.md} | 0 .../s/dict-getkey-vs-dictkey.md} | 0 .../{articles/s/python-empty-list.md => python/s/empty-list.md} | 0 .../{articles/s/python-file-close.md => python/s/file-close.md} | 0 .../s/fstrings-str-format.md} | 0 .../python-identity-equality.md => python/s/identity-equality.md} | 0 .../s/python-lists-tuples.md => python/s/lists-tuples.md} | 0 .../{articles/s/python-lowercase.md => python/s/lowercase.md} | 0 .../s/mutable-default-arguments.md} | 0 .../s/python-named-tuples.md => python/s/named-tuples.md} | 0 .../s/python-slice-assignment.md => python/s/slice-assignment.md} | 0 .../s/python-slice-notation.md => python/s/slice-notation.md} | 0 .../s/sort-dictionary-tuple-key.md} | 0 .../s/sortedlist-vs-list-sort.md} | 0 .../s/python-string-is-empty.md => python/s/string-is-empty.md} | 0 .../s/python-swap-variables.md => python/s/swap-variables.md} | 0 .../s/python-trim-whitespace.md => python/s/trim-whitespace.md} | 0 17 files changed, 0 insertions(+), 0 deletions(-) rename snippets/{articles/s/python-bare-except.md => python/s/bare-except.md} (100%) rename snippets/{articles/s/python-dict-getkey-vs-dictkey.md => python/s/dict-getkey-vs-dictkey.md} (100%) rename snippets/{articles/s/python-empty-list.md => python/s/empty-list.md} (100%) rename snippets/{articles/s/python-file-close.md => python/s/file-close.md} (100%) rename snippets/{articles/s/python-fstrings-str-format.md => python/s/fstrings-str-format.md} (100%) rename snippets/{articles/s/python-identity-equality.md => python/s/identity-equality.md} (100%) rename snippets/{articles/s/python-lists-tuples.md => python/s/lists-tuples.md} (100%) rename snippets/{articles/s/python-lowercase.md => python/s/lowercase.md} (100%) rename snippets/{articles/s/python-mutable-default-arguments.md => python/s/mutable-default-arguments.md} (100%) rename snippets/{articles/s/python-named-tuples.md => python/s/named-tuples.md} (100%) rename snippets/{articles/s/python-slice-assignment.md => python/s/slice-assignment.md} (100%) rename snippets/{articles/s/python-slice-notation.md => python/s/slice-notation.md} (100%) rename snippets/{articles/s/python-sort-dictionary-tuple-key.md => python/s/sort-dictionary-tuple-key.md} (100%) rename snippets/{articles/s/python-sortedlist-vs-list-sort.md => python/s/sortedlist-vs-list-sort.md} (100%) rename snippets/{articles/s/python-string-is-empty.md => python/s/string-is-empty.md} (100%) rename snippets/{articles/s/python-swap-variables.md => python/s/swap-variables.md} (100%) rename snippets/{articles/s/python-trim-whitespace.md => python/s/trim-whitespace.md} (100%) diff --git a/snippets/articles/s/python-bare-except.md b/snippets/python/s/bare-except.md similarity index 100% rename from snippets/articles/s/python-bare-except.md rename to snippets/python/s/bare-except.md diff --git a/snippets/articles/s/python-dict-getkey-vs-dictkey.md b/snippets/python/s/dict-getkey-vs-dictkey.md similarity index 100% rename from snippets/articles/s/python-dict-getkey-vs-dictkey.md rename to snippets/python/s/dict-getkey-vs-dictkey.md diff --git a/snippets/articles/s/python-empty-list.md b/snippets/python/s/empty-list.md similarity index 100% rename from snippets/articles/s/python-empty-list.md rename to snippets/python/s/empty-list.md diff --git a/snippets/articles/s/python-file-close.md b/snippets/python/s/file-close.md similarity index 100% rename from snippets/articles/s/python-file-close.md rename to snippets/python/s/file-close.md diff --git a/snippets/articles/s/python-fstrings-str-format.md b/snippets/python/s/fstrings-str-format.md similarity index 100% rename from snippets/articles/s/python-fstrings-str-format.md rename to snippets/python/s/fstrings-str-format.md diff --git a/snippets/articles/s/python-identity-equality.md b/snippets/python/s/identity-equality.md similarity index 100% rename from snippets/articles/s/python-identity-equality.md rename to snippets/python/s/identity-equality.md diff --git a/snippets/articles/s/python-lists-tuples.md b/snippets/python/s/lists-tuples.md similarity index 100% rename from snippets/articles/s/python-lists-tuples.md rename to snippets/python/s/lists-tuples.md diff --git a/snippets/articles/s/python-lowercase.md b/snippets/python/s/lowercase.md similarity index 100% rename from snippets/articles/s/python-lowercase.md rename to snippets/python/s/lowercase.md diff --git a/snippets/articles/s/python-mutable-default-arguments.md b/snippets/python/s/mutable-default-arguments.md similarity index 100% rename from snippets/articles/s/python-mutable-default-arguments.md rename to snippets/python/s/mutable-default-arguments.md diff --git a/snippets/articles/s/python-named-tuples.md b/snippets/python/s/named-tuples.md similarity index 100% rename from snippets/articles/s/python-named-tuples.md rename to snippets/python/s/named-tuples.md diff --git a/snippets/articles/s/python-slice-assignment.md b/snippets/python/s/slice-assignment.md similarity index 100% rename from snippets/articles/s/python-slice-assignment.md rename to snippets/python/s/slice-assignment.md diff --git a/snippets/articles/s/python-slice-notation.md b/snippets/python/s/slice-notation.md similarity index 100% rename from snippets/articles/s/python-slice-notation.md rename to snippets/python/s/slice-notation.md diff --git a/snippets/articles/s/python-sort-dictionary-tuple-key.md b/snippets/python/s/sort-dictionary-tuple-key.md similarity index 100% rename from snippets/articles/s/python-sort-dictionary-tuple-key.md rename to snippets/python/s/sort-dictionary-tuple-key.md diff --git a/snippets/articles/s/python-sortedlist-vs-list-sort.md b/snippets/python/s/sortedlist-vs-list-sort.md similarity index 100% rename from snippets/articles/s/python-sortedlist-vs-list-sort.md rename to snippets/python/s/sortedlist-vs-list-sort.md diff --git a/snippets/articles/s/python-string-is-empty.md b/snippets/python/s/string-is-empty.md similarity index 100% rename from snippets/articles/s/python-string-is-empty.md rename to snippets/python/s/string-is-empty.md diff --git a/snippets/articles/s/python-swap-variables.md b/snippets/python/s/swap-variables.md similarity index 100% rename from snippets/articles/s/python-swap-variables.md rename to snippets/python/s/swap-variables.md diff --git a/snippets/articles/s/python-trim-whitespace.md b/snippets/python/s/trim-whitespace.md similarity index 100% rename from snippets/articles/s/python-trim-whitespace.md rename to snippets/python/s/trim-whitespace.md From 54904baa747a4681d3d6c7ad99d7cd6ee64618a1 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:33:36 +0300 Subject: [PATCH 06/13] Rename articles prefixed with `react-` --- collections/react/rendering.yaml | 6 +++--- .../s/conditional-classname.md} | 0 .../s/proptypes-objectof-vs-shape.md} | 0 .../s/redux-readable-reducers.md} | 0 .../s/rendering-basics.md} | 0 .../s/rendering-optimization.md} | 0 .../react-rendering-state.md => react/s/rendering-state.md} | 0 .../react-selected-option.md => react/s/selected-option.md} | 0 .../s/use-effect-primitive-dependencies.md} | 0 .../s/use-interval-explained.md} | 0 .../s/use-state-with-label.md} | 0 11 files changed, 3 insertions(+), 3 deletions(-) rename snippets/{articles/s/react-conditional-classname.md => react/s/conditional-classname.md} (100%) rename snippets/{articles/s/react-proptypes-objectof-vs-shape.md => react/s/proptypes-objectof-vs-shape.md} (100%) rename snippets/{articles/s/react-redux-readable-reducers.md => react/s/redux-readable-reducers.md} (100%) rename snippets/{articles/s/react-rendering-basics.md => react/s/rendering-basics.md} (100%) rename snippets/{articles/s/react-rendering-optimization.md => react/s/rendering-optimization.md} (100%) rename snippets/{articles/s/react-rendering-state.md => react/s/rendering-state.md} (100%) rename snippets/{articles/s/react-selected-option.md => react/s/selected-option.md} (100%) rename snippets/{articles/s/react-use-effect-primitive-dependencies.md => react/s/use-effect-primitive-dependencies.md} (100%) rename snippets/{articles/s/react-use-interval-explained.md => react/s/use-interval-explained.md} (100%) rename snippets/{articles/s/react-use-state-with-label.md => react/s/use-state-with-label.md} (100%) diff --git a/collections/react/rendering.yaml b/collections/react/rendering.yaml index e687ca814..7c8cbf059 100644 --- a/collections/react/rendering.yaml +++ b/collections/react/rendering.yaml @@ -4,9 +4,9 @@ miniName: Rendering parent: react featured: true snippetIds: - - articles/s/react-rendering-basics - - articles/s/react-rendering-optimization - - articles/s/react-rendering-state + - react/s/rendering-basics + - react/s/rendering-optimization + - react/s/rendering-state splash: glasses-comic.png description: >- Understanding of the rendering process is a crucial piece of knowledge when diff --git a/snippets/articles/s/react-conditional-classname.md b/snippets/react/s/conditional-classname.md similarity index 100% rename from snippets/articles/s/react-conditional-classname.md rename to snippets/react/s/conditional-classname.md diff --git a/snippets/articles/s/react-proptypes-objectof-vs-shape.md b/snippets/react/s/proptypes-objectof-vs-shape.md similarity index 100% rename from snippets/articles/s/react-proptypes-objectof-vs-shape.md rename to snippets/react/s/proptypes-objectof-vs-shape.md diff --git a/snippets/articles/s/react-redux-readable-reducers.md b/snippets/react/s/redux-readable-reducers.md similarity index 100% rename from snippets/articles/s/react-redux-readable-reducers.md rename to snippets/react/s/redux-readable-reducers.md diff --git a/snippets/articles/s/react-rendering-basics.md b/snippets/react/s/rendering-basics.md similarity index 100% rename from snippets/articles/s/react-rendering-basics.md rename to snippets/react/s/rendering-basics.md diff --git a/snippets/articles/s/react-rendering-optimization.md b/snippets/react/s/rendering-optimization.md similarity index 100% rename from snippets/articles/s/react-rendering-optimization.md rename to snippets/react/s/rendering-optimization.md diff --git a/snippets/articles/s/react-rendering-state.md b/snippets/react/s/rendering-state.md similarity index 100% rename from snippets/articles/s/react-rendering-state.md rename to snippets/react/s/rendering-state.md diff --git a/snippets/articles/s/react-selected-option.md b/snippets/react/s/selected-option.md similarity index 100% rename from snippets/articles/s/react-selected-option.md rename to snippets/react/s/selected-option.md diff --git a/snippets/articles/s/react-use-effect-primitive-dependencies.md b/snippets/react/s/use-effect-primitive-dependencies.md similarity index 100% rename from snippets/articles/s/react-use-effect-primitive-dependencies.md rename to snippets/react/s/use-effect-primitive-dependencies.md diff --git a/snippets/articles/s/react-use-interval-explained.md b/snippets/react/s/use-interval-explained.md similarity index 100% rename from snippets/articles/s/react-use-interval-explained.md rename to snippets/react/s/use-interval-explained.md diff --git a/snippets/articles/s/react-use-state-with-label.md b/snippets/react/s/use-state-with-label.md similarity index 100% rename from snippets/articles/s/react-use-state-with-label.md rename to snippets/react/s/use-state-with-label.md From 45d1fa023a2567a76ef51d40a504459d20fd03b9 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:34:43 +0300 Subject: [PATCH 07/13] Rename articles prefixed with `css-` --- collections/css/centering.yaml | 2 +- snippets/{articles/s/css-centering.md => css/s/centering.md} | 0 snippets/{articles/s/css-clamp.md => css/s/clamp.md} | 0 .../{articles/s/css-code-reviews.md => css/s/code-reviews.md} | 0 .../{articles/s/css-current-color.md => css/s/current-color.md} | 0 .../s/css-easing-variables.md => css/s/easing-variables.md} | 0 .../s/footer-at-the-bottom.md} | 0 .../s/inherited-properties-cheatsheet.md} | 0 .../s/nested-border-radius.md} | 0 .../s/css-print-stylesheet.md => css/s/print-stylesheet.md} | 0 .../s/css-pseudo-classes.md => css/s/pseudo-classes.md} | 0 snippets/{articles/s/css-reset.md => css/s/reset.md} | 0 .../{articles/s/css-root-vs-html.md => css/s/root-vs-html.md} | 0 .../s/css-select-any-link.md => css/s/select-any-link.md} | 0 .../css-style-default-links.md => css/s/style-default-links.md} | 2 +- .../s/unitless-line-height.md} | 0 .../s/css-units-cheatsheet.md => css/s/units-cheatsheet.md} | 0 snippets/{articles/s/css-variables.md => css/s/variables.md} | 0 18 files changed, 2 insertions(+), 2 deletions(-) rename snippets/{articles/s/css-centering.md => css/s/centering.md} (100%) rename snippets/{articles/s/css-clamp.md => css/s/clamp.md} (100%) rename snippets/{articles/s/css-code-reviews.md => css/s/code-reviews.md} (100%) rename snippets/{articles/s/css-current-color.md => css/s/current-color.md} (100%) rename snippets/{articles/s/css-easing-variables.md => css/s/easing-variables.md} (100%) rename snippets/{articles/s/css-footer-at-the-bottom.md => css/s/footer-at-the-bottom.md} (100%) rename snippets/{articles/s/css-inherited-properties-cheatsheet.md => css/s/inherited-properties-cheatsheet.md} (100%) rename snippets/{articles/s/css-nested-border-radius.md => css/s/nested-border-radius.md} (100%) rename snippets/{articles/s/css-print-stylesheet.md => css/s/print-stylesheet.md} (100%) rename snippets/{articles/s/css-pseudo-classes.md => css/s/pseudo-classes.md} (100%) rename snippets/{articles/s/css-reset.md => css/s/reset.md} (100%) rename snippets/{articles/s/css-root-vs-html.md => css/s/root-vs-html.md} (100%) rename snippets/{articles/s/css-select-any-link.md => css/s/select-any-link.md} (100%) rename snippets/{articles/s/css-style-default-links.md => css/s/style-default-links.md} (91%) rename snippets/{articles/s/css-unitless-line-height.md => css/s/unitless-line-height.md} (100%) rename snippets/{articles/s/css-units-cheatsheet.md => css/s/units-cheatsheet.md} (100%) rename snippets/{articles/s/css-variables.md => css/s/variables.md} (100%) diff --git a/collections/css/centering.yaml b/collections/css/centering.yaml index 7d9e3cca6..0bd1896b0 100644 --- a/collections/css/centering.yaml +++ b/collections/css/centering.yaml @@ -2,7 +2,7 @@ slug: css/centering name: CSS Centering featured: true snippetIds: - - articles/s/css-centering + - css/s/centering - css/s/flexbox-centering - css/s/grid-centering - css/s/transform-centering diff --git a/snippets/articles/s/css-centering.md b/snippets/css/s/centering.md similarity index 100% rename from snippets/articles/s/css-centering.md rename to snippets/css/s/centering.md diff --git a/snippets/articles/s/css-clamp.md b/snippets/css/s/clamp.md similarity index 100% rename from snippets/articles/s/css-clamp.md rename to snippets/css/s/clamp.md diff --git a/snippets/articles/s/css-code-reviews.md b/snippets/css/s/code-reviews.md similarity index 100% rename from snippets/articles/s/css-code-reviews.md rename to snippets/css/s/code-reviews.md diff --git a/snippets/articles/s/css-current-color.md b/snippets/css/s/current-color.md similarity index 100% rename from snippets/articles/s/css-current-color.md rename to snippets/css/s/current-color.md diff --git a/snippets/articles/s/css-easing-variables.md b/snippets/css/s/easing-variables.md similarity index 100% rename from snippets/articles/s/css-easing-variables.md rename to snippets/css/s/easing-variables.md diff --git a/snippets/articles/s/css-footer-at-the-bottom.md b/snippets/css/s/footer-at-the-bottom.md similarity index 100% rename from snippets/articles/s/css-footer-at-the-bottom.md rename to snippets/css/s/footer-at-the-bottom.md diff --git a/snippets/articles/s/css-inherited-properties-cheatsheet.md b/snippets/css/s/inherited-properties-cheatsheet.md similarity index 100% rename from snippets/articles/s/css-inherited-properties-cheatsheet.md rename to snippets/css/s/inherited-properties-cheatsheet.md diff --git a/snippets/articles/s/css-nested-border-radius.md b/snippets/css/s/nested-border-radius.md similarity index 100% rename from snippets/articles/s/css-nested-border-radius.md rename to snippets/css/s/nested-border-radius.md diff --git a/snippets/articles/s/css-print-stylesheet.md b/snippets/css/s/print-stylesheet.md similarity index 100% rename from snippets/articles/s/css-print-stylesheet.md rename to snippets/css/s/print-stylesheet.md diff --git a/snippets/articles/s/css-pseudo-classes.md b/snippets/css/s/pseudo-classes.md similarity index 100% rename from snippets/articles/s/css-pseudo-classes.md rename to snippets/css/s/pseudo-classes.md diff --git a/snippets/articles/s/css-reset.md b/snippets/css/s/reset.md similarity index 100% rename from snippets/articles/s/css-reset.md rename to snippets/css/s/reset.md diff --git a/snippets/articles/s/css-root-vs-html.md b/snippets/css/s/root-vs-html.md similarity index 100% rename from snippets/articles/s/css-root-vs-html.md rename to snippets/css/s/root-vs-html.md diff --git a/snippets/articles/s/css-select-any-link.md b/snippets/css/s/select-any-link.md similarity index 100% rename from snippets/articles/s/css-select-any-link.md rename to snippets/css/s/select-any-link.md diff --git a/snippets/articles/s/css-style-default-links.md b/snippets/css/s/style-default-links.md similarity index 91% rename from snippets/articles/s/css-style-default-links.md rename to snippets/css/s/style-default-links.md index f7e4000dc..7f51a897c 100644 --- a/snippets/articles/s/css-style-default-links.md +++ b/snippets/css/s/style-default-links.md @@ -19,4 +19,4 @@ a[href]:not([class]) { } ``` -As a bonus tip, you can use [the previous tip about selecting any link](/articles/s/css-select-any-link) to further enhance this solution. +As a bonus tip, you can use [the previous tip about selecting any link](/css/s/select-any-link) to further enhance this solution. diff --git a/snippets/articles/s/css-unitless-line-height.md b/snippets/css/s/unitless-line-height.md similarity index 100% rename from snippets/articles/s/css-unitless-line-height.md rename to snippets/css/s/unitless-line-height.md diff --git a/snippets/articles/s/css-units-cheatsheet.md b/snippets/css/s/units-cheatsheet.md similarity index 100% rename from snippets/articles/s/css-units-cheatsheet.md rename to snippets/css/s/units-cheatsheet.md diff --git a/snippets/articles/s/css-variables.md b/snippets/css/s/variables.md similarity index 100% rename from snippets/articles/s/css-variables.md rename to snippets/css/s/variables.md From 2d58c1dfd70ea8d11825a2fe1f8e526546ef7d49 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 18 May 2023 23:57:15 +0300 Subject: [PATCH 08/13] Rename language articles --- collections/js/array-methods.yaml | 4 ++-- collections/js/data-structures.yaml | 2 +- collections/js/dom-querying.yaml | 2 +- collections/js/event-handling.yaml | 4 ++-- collections/js/http-requests.yaml | 2 +- collections/js/interviews.yaml | 2 +- collections/js/performance.yaml | 6 +++--- collections/js/promises.yaml | 2 +- collections/js/web-storage-essentials.yaml | 2 +- collections/react/testing.yaml | 8 ++++---- snippets/{articles => css}/s/25-css-gradients.md | 0 snippets/{articles => css}/s/flexbox-cheatsheet.md | 0 .../s/perfect-transition-duration.md} | 0 snippets/{articles => css}/s/typographic-scale-basics.md | 0 snippets/{articles/s/git-aliases.md => git/s/aliases.md} | 0 .../s/commit-different-date.md} | 0 .../s/git-fast-forward.md => git/s/fast-forward.md} | 0 snippets/{articles => git}/s/github-co-authors.md | 0 .../s/10-vs-code-extensions-for-js-developers.md | 0 .../s/4-array-methods.md} | 0 .../s/6-regexp-tricks.md} | 0 .../s/async-cheatsheet.md} | 0 snippets/{articles => js}/s/big-o-cheatsheet.md | 0 .../s/code-anatomy-chaining-reduce-for-loop.md | 0 .../s/code-anatomy-optimizing-recursion.md | 0 snippets/{articles => js}/s/common-regexp-cheatsheet.md | 0 snippets/{articles => js}/s/console-log-cheatsheet.md | 0 .../{articles => js}/s/cookies-local-storage-session.md | 0 .../s/copy-text-to-clipboard.md} | 0 snippets/{articles => js}/s/cors-explained.md | 0 snippets/{articles => js}/s/detect-caps-lock-is-on.md | 0 snippets/{articles => js}/s/eslint-refactor-for-in.md | 0 snippets/{articles => js}/s/jest-mock-global-methods.md | 0 snippets/{articles => js}/s/nodejs-chrome-debugging.md | 0 snippets/{articles => js}/s/nodejs-static-file-server.md | 0 .../{articles => js}/s/nodejs-test-module-introduction.md | 0 .../s/passive-scroll-listener-performance.md | 0 snippets/{articles => js}/s/regexp-cheatsheet.md | 0 snippets/{articles => js}/s/select-focused-dom-element.md | 0 .../s/the-case-for-trailing-commas.md} | 0 .../s/6-f-strings-tips.md} | 0 .../s/code-anatomy-performant-python.md | 0 .../s/setup-python3-pip3-as-default.md | 0 snippets/{articles => react}/s/breaking-react.md | 0 .../s/testing-async-components.md} | 0 .../s/testing-portals.md} | 0 .../s/testing-redux-connected-components.md | 0 .../s/testing-stateful-ui-components.md | 0 48 files changed, 17 insertions(+), 17 deletions(-) rename snippets/{articles => css}/s/25-css-gradients.md (100%) rename snippets/{articles => css}/s/flexbox-cheatsheet.md (100%) rename snippets/{articles/s/perfect-css-transition-duration.md => css/s/perfect-transition-duration.md} (100%) rename snippets/{articles => css}/s/typographic-scale-basics.md (100%) rename snippets/{articles/s/git-aliases.md => git/s/aliases.md} (100%) rename snippets/{articles/s/git-commit-different-date.md => git/s/commit-different-date.md} (100%) rename snippets/{articles/s/git-fast-forward.md => git/s/fast-forward.md} (100%) rename snippets/{articles => git}/s/github-co-authors.md (100%) rename snippets/{articles => js}/s/10-vs-code-extensions-for-js-developers.md (100%) rename snippets/{articles/s/4-javascript-array-methods.md => js/s/4-array-methods.md} (100%) rename snippets/{articles/s/6-javascript-regexp-tricks.md => js/s/6-regexp-tricks.md} (100%) rename snippets/{articles/s/async-javascript-cheatsheet.md => js/s/async-cheatsheet.md} (100%) rename snippets/{articles => js}/s/big-o-cheatsheet.md (100%) rename snippets/{articles => js}/s/code-anatomy-chaining-reduce-for-loop.md (100%) rename snippets/{articles => js}/s/code-anatomy-optimizing-recursion.md (100%) rename snippets/{articles => js}/s/common-regexp-cheatsheet.md (100%) rename snippets/{articles => js}/s/console-log-cheatsheet.md (100%) rename snippets/{articles => js}/s/cookies-local-storage-session.md (100%) rename snippets/{articles/s/copy-text-to-clipboard-with-javascript.md => js/s/copy-text-to-clipboard.md} (100%) rename snippets/{articles => js}/s/cors-explained.md (100%) rename snippets/{articles => js}/s/detect-caps-lock-is-on.md (100%) rename snippets/{articles => js}/s/eslint-refactor-for-in.md (100%) rename snippets/{articles => js}/s/jest-mock-global-methods.md (100%) rename snippets/{articles => js}/s/nodejs-chrome-debugging.md (100%) rename snippets/{articles => js}/s/nodejs-static-file-server.md (100%) rename snippets/{articles => js}/s/nodejs-test-module-introduction.md (100%) rename snippets/{articles => js}/s/passive-scroll-listener-performance.md (100%) rename snippets/{articles => js}/s/regexp-cheatsheet.md (100%) rename snippets/{articles => js}/s/select-focused-dom-element.md (100%) rename snippets/{articles/s/the-case-for-javascript-trailing-commas.md => js/s/the-case-for-trailing-commas.md} (100%) rename snippets/{articles/s/6-python-f-strings-tips.md => python/s/6-f-strings-tips.md} (100%) rename snippets/{articles => python}/s/code-anatomy-performant-python.md (100%) rename snippets/{articles => python}/s/setup-python3-pip3-as-default.md (100%) rename snippets/{articles => react}/s/breaking-react.md (100%) rename snippets/{articles/s/testing-async-react-components.md => react/s/testing-async-components.md} (100%) rename snippets/{articles/s/testing-react-portals.md => react/s/testing-portals.md} (100%) rename snippets/{articles => react}/s/testing-redux-connected-components.md (100%) rename snippets/{articles => react}/s/testing-stateful-ui-components.md (100%) diff --git a/collections/js/array-methods.yaml b/collections/js/array-methods.yaml index 3df13c32b..a97f56d8a 100644 --- a/collections/js/array-methods.yaml +++ b/collections/js/array-methods.yaml @@ -3,12 +3,12 @@ name: JavaScript Array Methods featured: true snippetIds: - js/s/array-map-vs-foreach - - articles/s/4-javascript-array-methods + - js/s/4-array-methods - js/s/array-comparison - js/s/index-for-of-loop - js/s/for-loop-early-break - js/s/array-initialization - - articles/s/code-anatomy-chaining-reduce-for-loop + - js/s/code-anatomy-chaining-reduce-for-loop - js/s/async-array-loops - js/s/typecheck-array splash: laptop-lamp.png diff --git a/collections/js/data-structures.yaml b/collections/js/data-structures.yaml index 910dc9ef0..a68c40c39 100644 --- a/collections/js/data-structures.yaml +++ b/collections/js/data-structures.yaml @@ -14,7 +14,7 @@ snippetIds: - js/s/data-structures-binary-tree - js/s/data-structures-binary-search-tree - js/s/frequency-map-data-structure - - articles/s/big-o-cheatsheet + - js/s/big-o-cheatsheet splash: purple-flower.png description: >- The JavaScript data structures collection includes implementations and diff --git a/collections/js/dom-querying.yaml b/collections/js/dom-querying.yaml index e38bfc216..ddfa85167 100644 --- a/collections/js/dom-querying.yaml +++ b/collections/js/dom-querying.yaml @@ -11,7 +11,7 @@ snippetIds: - js/s/get-images - js/s/query-selector-shorthand - js/s/element-is-visible-in-viewport - - articles/s/select-focused-dom-element + - js/s/select-focused-dom-element - js/s/get-elements-bigger-than-viewport - js/s/element-from-point - js/s/element-is-focused diff --git a/collections/js/event-handling.yaml b/collections/js/event-handling.yaml index eda119195..242d56bee 100644 --- a/collections/js/event-handling.yaml +++ b/collections/js/event-handling.yaml @@ -11,10 +11,10 @@ snippetIds: - js/s/remove-event-listener-all - js/s/add-multiple-events - js/s/execute-event-handler-once - - articles/s/passive-scroll-listener-performance + - js/s/passive-scroll-listener-performance - js/s/on-scroll-stop - js/s/arrow-function-event-listeners - - articles/s/detect-caps-lock-is-on + - js/s/detect-caps-lock-is-on - js/s/trigger-event - js/s/on-user-input-change splash: monsterra.png diff --git a/collections/js/http-requests.yaml b/collections/js/http-requests.yaml index a3ebe3632..c8b866a7e 100644 --- a/collections/js/http-requests.yaml +++ b/collections/js/http-requests.yaml @@ -7,7 +7,7 @@ snippetIds: - js/s/http-put - js/s/http-delete - articles/s/http-status-codes-cheatsheet - - articles/s/cors-explained + - js/s/cors-explained splash: laptop-plants-1.png description: >- Making network requests is a crucial part of most web applications. This diff --git a/collections/js/interviews.yaml b/collections/js/interviews.yaml index 31365e471..4cca596ed 100644 --- a/collections/js/interviews.yaml +++ b/collections/js/interviews.yaml @@ -36,7 +36,7 @@ snippetIds: - js/s/iife - js/s/event-loop-explained - js/s/prefix-postfix-operators - - articles/s/cors-explained + - js/s/cors-explained splash: interview.png description: >- Preparing for a job interview requires studying to refresh your knowledge and diff --git a/collections/js/performance.yaml b/collections/js/performance.yaml index 2ef835923..714c7b463 100644 --- a/collections/js/performance.yaml +++ b/collections/js/performance.yaml @@ -3,15 +3,15 @@ name: JavaScript Performance Optimization featured: true snippetIds: - js/s/store-dom-items - - articles/s/passive-scroll-listener-performance + - js/s/passive-scroll-listener-performance - js/s/textcontent-or-innertext - js/s/memoization - js/s/array-filtering-tips - js/s/fast-remove-array-element - - articles/s/code-anatomy-optimizing-recursion + - js/s/code-anatomy-optimizing-recursion - js/s/switch-object - js/s/dynamic-properties-are-slow - - articles/s/big-o-cheatsheet + - js/s/big-o-cheatsheet splash: do-more-computer.png description: >- Enhance your website's performance with our collection of tips and tricks on diff --git a/collections/js/promises.yaml b/collections/js/promises.yaml index 73cc64c94..544d56334 100644 --- a/collections/js/promises.yaml +++ b/collections/js/promises.yaml @@ -3,7 +3,7 @@ name: JavaScript Promises featured: true snippetIds: - js/s/promises - - articles/s/async-javascript-cheatsheet + - js/s/async-cheatsheet - js/s/sync-async - js/s/promise-then-catch - js/s/promise-then-finally diff --git a/collections/js/web-storage-essentials.yaml b/collections/js/web-storage-essentials.yaml index ba8786079..82f1dc013 100644 --- a/collections/js/web-storage-essentials.yaml +++ b/collections/js/web-storage-essentials.yaml @@ -2,7 +2,7 @@ slug: js/web-storage-essentials name: Web Storage Essentials featured: true snippetIds: - - articles/s/cookies-local-storage-session + - js/s/cookies-local-storage-session - js/s/parse-cookie - js/s/serialize-cookie - js/s/is-local-storage-enabled diff --git a/collections/react/testing.yaml b/collections/react/testing.yaml index a31032b98..f500e9a85 100644 --- a/collections/react/testing.yaml +++ b/collections/react/testing.yaml @@ -4,10 +4,10 @@ shortName: Testing parent: react featured: true snippetIds: - - articles/s/testing-stateful-ui-components - - articles/s/testing-async-react-components - - articles/s/testing-react-portals - - articles/s/testing-redux-connected-components + - react/s/testing-stateful-ui-components + - react/s/testing-async-components + - react/s/testing-portals + - react/s/testing-redux-connected-components splash: headphones.png description: >- Testing React can be challenging, both in terms of figuring out the correct diff --git a/snippets/articles/s/25-css-gradients.md b/snippets/css/s/25-css-gradients.md similarity index 100% rename from snippets/articles/s/25-css-gradients.md rename to snippets/css/s/25-css-gradients.md diff --git a/snippets/articles/s/flexbox-cheatsheet.md b/snippets/css/s/flexbox-cheatsheet.md similarity index 100% rename from snippets/articles/s/flexbox-cheatsheet.md rename to snippets/css/s/flexbox-cheatsheet.md diff --git a/snippets/articles/s/perfect-css-transition-duration.md b/snippets/css/s/perfect-transition-duration.md similarity index 100% rename from snippets/articles/s/perfect-css-transition-duration.md rename to snippets/css/s/perfect-transition-duration.md diff --git a/snippets/articles/s/typographic-scale-basics.md b/snippets/css/s/typographic-scale-basics.md similarity index 100% rename from snippets/articles/s/typographic-scale-basics.md rename to snippets/css/s/typographic-scale-basics.md diff --git a/snippets/articles/s/git-aliases.md b/snippets/git/s/aliases.md similarity index 100% rename from snippets/articles/s/git-aliases.md rename to snippets/git/s/aliases.md diff --git a/snippets/articles/s/git-commit-different-date.md b/snippets/git/s/commit-different-date.md similarity index 100% rename from snippets/articles/s/git-commit-different-date.md rename to snippets/git/s/commit-different-date.md diff --git a/snippets/articles/s/git-fast-forward.md b/snippets/git/s/fast-forward.md similarity index 100% rename from snippets/articles/s/git-fast-forward.md rename to snippets/git/s/fast-forward.md diff --git a/snippets/articles/s/github-co-authors.md b/snippets/git/s/github-co-authors.md similarity index 100% rename from snippets/articles/s/github-co-authors.md rename to snippets/git/s/github-co-authors.md diff --git a/snippets/articles/s/10-vs-code-extensions-for-js-developers.md b/snippets/js/s/10-vs-code-extensions-for-js-developers.md similarity index 100% rename from snippets/articles/s/10-vs-code-extensions-for-js-developers.md rename to snippets/js/s/10-vs-code-extensions-for-js-developers.md diff --git a/snippets/articles/s/4-javascript-array-methods.md b/snippets/js/s/4-array-methods.md similarity index 100% rename from snippets/articles/s/4-javascript-array-methods.md rename to snippets/js/s/4-array-methods.md diff --git a/snippets/articles/s/6-javascript-regexp-tricks.md b/snippets/js/s/6-regexp-tricks.md similarity index 100% rename from snippets/articles/s/6-javascript-regexp-tricks.md rename to snippets/js/s/6-regexp-tricks.md diff --git a/snippets/articles/s/async-javascript-cheatsheet.md b/snippets/js/s/async-cheatsheet.md similarity index 100% rename from snippets/articles/s/async-javascript-cheatsheet.md rename to snippets/js/s/async-cheatsheet.md diff --git a/snippets/articles/s/big-o-cheatsheet.md b/snippets/js/s/big-o-cheatsheet.md similarity index 100% rename from snippets/articles/s/big-o-cheatsheet.md rename to snippets/js/s/big-o-cheatsheet.md diff --git a/snippets/articles/s/code-anatomy-chaining-reduce-for-loop.md b/snippets/js/s/code-anatomy-chaining-reduce-for-loop.md similarity index 100% rename from snippets/articles/s/code-anatomy-chaining-reduce-for-loop.md rename to snippets/js/s/code-anatomy-chaining-reduce-for-loop.md diff --git a/snippets/articles/s/code-anatomy-optimizing-recursion.md b/snippets/js/s/code-anatomy-optimizing-recursion.md similarity index 100% rename from snippets/articles/s/code-anatomy-optimizing-recursion.md rename to snippets/js/s/code-anatomy-optimizing-recursion.md diff --git a/snippets/articles/s/common-regexp-cheatsheet.md b/snippets/js/s/common-regexp-cheatsheet.md similarity index 100% rename from snippets/articles/s/common-regexp-cheatsheet.md rename to snippets/js/s/common-regexp-cheatsheet.md diff --git a/snippets/articles/s/console-log-cheatsheet.md b/snippets/js/s/console-log-cheatsheet.md similarity index 100% rename from snippets/articles/s/console-log-cheatsheet.md rename to snippets/js/s/console-log-cheatsheet.md diff --git a/snippets/articles/s/cookies-local-storage-session.md b/snippets/js/s/cookies-local-storage-session.md similarity index 100% rename from snippets/articles/s/cookies-local-storage-session.md rename to snippets/js/s/cookies-local-storage-session.md diff --git a/snippets/articles/s/copy-text-to-clipboard-with-javascript.md b/snippets/js/s/copy-text-to-clipboard.md similarity index 100% rename from snippets/articles/s/copy-text-to-clipboard-with-javascript.md rename to snippets/js/s/copy-text-to-clipboard.md diff --git a/snippets/articles/s/cors-explained.md b/snippets/js/s/cors-explained.md similarity index 100% rename from snippets/articles/s/cors-explained.md rename to snippets/js/s/cors-explained.md diff --git a/snippets/articles/s/detect-caps-lock-is-on.md b/snippets/js/s/detect-caps-lock-is-on.md similarity index 100% rename from snippets/articles/s/detect-caps-lock-is-on.md rename to snippets/js/s/detect-caps-lock-is-on.md diff --git a/snippets/articles/s/eslint-refactor-for-in.md b/snippets/js/s/eslint-refactor-for-in.md similarity index 100% rename from snippets/articles/s/eslint-refactor-for-in.md rename to snippets/js/s/eslint-refactor-for-in.md diff --git a/snippets/articles/s/jest-mock-global-methods.md b/snippets/js/s/jest-mock-global-methods.md similarity index 100% rename from snippets/articles/s/jest-mock-global-methods.md rename to snippets/js/s/jest-mock-global-methods.md diff --git a/snippets/articles/s/nodejs-chrome-debugging.md b/snippets/js/s/nodejs-chrome-debugging.md similarity index 100% rename from snippets/articles/s/nodejs-chrome-debugging.md rename to snippets/js/s/nodejs-chrome-debugging.md diff --git a/snippets/articles/s/nodejs-static-file-server.md b/snippets/js/s/nodejs-static-file-server.md similarity index 100% rename from snippets/articles/s/nodejs-static-file-server.md rename to snippets/js/s/nodejs-static-file-server.md diff --git a/snippets/articles/s/nodejs-test-module-introduction.md b/snippets/js/s/nodejs-test-module-introduction.md similarity index 100% rename from snippets/articles/s/nodejs-test-module-introduction.md rename to snippets/js/s/nodejs-test-module-introduction.md diff --git a/snippets/articles/s/passive-scroll-listener-performance.md b/snippets/js/s/passive-scroll-listener-performance.md similarity index 100% rename from snippets/articles/s/passive-scroll-listener-performance.md rename to snippets/js/s/passive-scroll-listener-performance.md diff --git a/snippets/articles/s/regexp-cheatsheet.md b/snippets/js/s/regexp-cheatsheet.md similarity index 100% rename from snippets/articles/s/regexp-cheatsheet.md rename to snippets/js/s/regexp-cheatsheet.md diff --git a/snippets/articles/s/select-focused-dom-element.md b/snippets/js/s/select-focused-dom-element.md similarity index 100% rename from snippets/articles/s/select-focused-dom-element.md rename to snippets/js/s/select-focused-dom-element.md diff --git a/snippets/articles/s/the-case-for-javascript-trailing-commas.md b/snippets/js/s/the-case-for-trailing-commas.md similarity index 100% rename from snippets/articles/s/the-case-for-javascript-trailing-commas.md rename to snippets/js/s/the-case-for-trailing-commas.md diff --git a/snippets/articles/s/6-python-f-strings-tips.md b/snippets/python/s/6-f-strings-tips.md similarity index 100% rename from snippets/articles/s/6-python-f-strings-tips.md rename to snippets/python/s/6-f-strings-tips.md diff --git a/snippets/articles/s/code-anatomy-performant-python.md b/snippets/python/s/code-anatomy-performant-python.md similarity index 100% rename from snippets/articles/s/code-anatomy-performant-python.md rename to snippets/python/s/code-anatomy-performant-python.md diff --git a/snippets/articles/s/setup-python3-pip3-as-default.md b/snippets/python/s/setup-python3-pip3-as-default.md similarity index 100% rename from snippets/articles/s/setup-python3-pip3-as-default.md rename to snippets/python/s/setup-python3-pip3-as-default.md diff --git a/snippets/articles/s/breaking-react.md b/snippets/react/s/breaking-react.md similarity index 100% rename from snippets/articles/s/breaking-react.md rename to snippets/react/s/breaking-react.md diff --git a/snippets/articles/s/testing-async-react-components.md b/snippets/react/s/testing-async-components.md similarity index 100% rename from snippets/articles/s/testing-async-react-components.md rename to snippets/react/s/testing-async-components.md diff --git a/snippets/articles/s/testing-react-portals.md b/snippets/react/s/testing-portals.md similarity index 100% rename from snippets/articles/s/testing-react-portals.md rename to snippets/react/s/testing-portals.md diff --git a/snippets/articles/s/testing-redux-connected-components.md b/snippets/react/s/testing-redux-connected-components.md similarity index 100% rename from snippets/articles/s/testing-redux-connected-components.md rename to snippets/react/s/testing-redux-connected-components.md diff --git a/snippets/articles/s/testing-stateful-ui-components.md b/snippets/react/s/testing-stateful-ui-components.md similarity index 100% rename from snippets/articles/s/testing-stateful-ui-components.md rename to snippets/react/s/testing-stateful-ui-components.md From bf824750ce01ed0a4a3bfb4f7789ac700a5fb9d3 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 19 May 2023 00:00:59 +0300 Subject: [PATCH 09/13] Rename language articles --- snippets/articles/s/8-tips-for-accessible-websites.md | 2 +- snippets/{articles => css}/s/responsive-favicon-dark-mode.md | 0 snippets/{articles => git}/s/5-tips-for-better-pull-requests.md | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename snippets/{articles => css}/s/responsive-favicon-dark-mode.md (100%) rename snippets/{articles => git}/s/5-tips-for-better-pull-requests.md (100%) diff --git a/snippets/articles/s/8-tips-for-accessible-websites.md b/snippets/articles/s/8-tips-for-accessible-websites.md index 74c291d3a..ec2e02dc7 100644 --- a/snippets/articles/s/8-tips-for-accessible-websites.md +++ b/snippets/articles/s/8-tips-for-accessible-websites.md @@ -2,7 +2,7 @@ title: 8 tips for accessible websites shortTitle: Accessibility tips type: story -language: javascript +language: html tags: [accessibility,webdev] author: chalarangelo cover: accessibility diff --git a/snippets/articles/s/responsive-favicon-dark-mode.md b/snippets/css/s/responsive-favicon-dark-mode.md similarity index 100% rename from snippets/articles/s/responsive-favicon-dark-mode.md rename to snippets/css/s/responsive-favicon-dark-mode.md diff --git a/snippets/articles/s/5-tips-for-better-pull-requests.md b/snippets/git/s/5-tips-for-better-pull-requests.md similarity index 100% rename from snippets/articles/s/5-tips-for-better-pull-requests.md rename to snippets/git/s/5-tips-for-better-pull-requests.md From 82a614e42ed5589021244598219b499eedd2c667 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 19 May 2023 20:07:51 +0300 Subject: [PATCH 10/13] Fix some title issues --- snippets/js/s/drop-right-while.md | 2 +- snippets/js/s/drop-right.md | 2 +- snippets/js/s/drop-while.md | 2 +- snippets/js/s/drop.md | 2 +- snippets/js/s/symmetric-difference-with.md | 2 +- snippets/js/s/take-right-until.md | 2 +- snippets/js/s/take-right-while.md | 2 +- snippets/js/s/take-right.md | 2 +- snippets/js/s/take-until.md | 2 +- snippets/js/s/take-while.md | 2 +- snippets/js/s/take.md | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/snippets/js/s/drop-right-while.md b/snippets/js/s/drop-right-while.md index c30ac9c99..5a7794ea1 100644 --- a/snippets/js/s/drop-right-while.md +++ b/snippets/js/s/drop-right-while.md @@ -1,5 +1,5 @@ --- -title: Drop list elements from the right based on function +title: Drop array elements from the right based on function type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/drop-right.md b/snippets/js/s/drop-right.md index ec024d275..cab06df18 100644 --- a/snippets/js/s/drop-right.md +++ b/snippets/js/s/drop-right.md @@ -1,5 +1,5 @@ --- -title: Drop list elements from the right +title: Drop array elements from the right type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/drop-while.md b/snippets/js/s/drop-while.md index a9b215bdf..41842c896 100644 --- a/snippets/js/s/drop-while.md +++ b/snippets/js/s/drop-while.md @@ -1,5 +1,5 @@ --- -title: Drop list elements from the left based on function +title: Drop array elements from the left based on function type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/drop.md b/snippets/js/s/drop.md index 9022cdcc1..20de321b7 100644 --- a/snippets/js/s/drop.md +++ b/snippets/js/s/drop.md @@ -1,5 +1,5 @@ --- -title: Drop list elements from the left +title: Drop array elements from the left type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/symmetric-difference-with.md b/snippets/js/s/symmetric-difference-with.md index 11f2f71c6..e4df9ec58 100644 --- a/snippets/js/s/symmetric-difference-with.md +++ b/snippets/js/s/symmetric-difference-with.md @@ -1,5 +1,5 @@ --- -title: Array symmetric difference +title: Array symmetric difference based on function type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/take-right-until.md b/snippets/js/s/take-right-until.md index 6c5f193de..c05013625 100644 --- a/snippets/js/s/take-right-until.md +++ b/snippets/js/s/take-right-until.md @@ -1,5 +1,5 @@ --- -title: Remove list elements from the end until condition is met +title: Remove array elements from the end until condition is met type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/take-right-while.md b/snippets/js/s/take-right-while.md index dff82e163..0f345b9ef 100644 --- a/snippets/js/s/take-right-while.md +++ b/snippets/js/s/take-right-while.md @@ -1,5 +1,5 @@ --- -title: Remove list elements from the end while condition is met +title: Remove array elements from the end while condition is met type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/take-right.md b/snippets/js/s/take-right.md index fb899c676..fc6d20c93 100644 --- a/snippets/js/s/take-right.md +++ b/snippets/js/s/take-right.md @@ -1,5 +1,5 @@ --- -title: Remove list elements from the end +title: Remove array elements from the end type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/take-until.md b/snippets/js/s/take-until.md index 60c46549d..3ee69d7fc 100644 --- a/snippets/js/s/take-until.md +++ b/snippets/js/s/take-until.md @@ -1,5 +1,5 @@ --- -title: Remove list elements until condition is met +title: Remove array elements until condition is met type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/take-while.md b/snippets/js/s/take-while.md index 04926e8c8..10a94dcbc 100644 --- a/snippets/js/s/take-while.md +++ b/snippets/js/s/take-while.md @@ -1,5 +1,5 @@ --- -title: Remove list elements while condition is met +title: Remove array elements while condition is met type: snippet language: javascript tags: [array] diff --git a/snippets/js/s/take.md b/snippets/js/s/take.md index 117df51df..4e3b21c81 100644 --- a/snippets/js/s/take.md +++ b/snippets/js/s/take.md @@ -1,5 +1,5 @@ --- -title: Remove list elements +title: Remove array elements type: snippet language: javascript tags: [array] From 9d032ce05e2e775be04f6059d0868a6271326c54 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 19 May 2023 20:23:47 +0300 Subject: [PATCH 11/13] Rename js snippets --- collections/js/array-initialization.yaml | 6 ++--- collections/js/array-set-operations.yaml | 24 +++++++++---------- collections/js/array-tricks.yaml | 24 +++++++++---------- collections/js/comparison.yaml | 10 ++++---- collections/js/css-manipulation.yaml | 18 +++++++------- collections/js/dom-manipulation.yaml | 8 +++---- collections/js/event-handling.yaml | 8 +++---- collections/js/generators.yaml | 8 +++---- collections/js/logical-operations.yaml | 6 ++--- collections/js/object-cloning.yaml | 4 ++-- collections/js/object-key-selection.yaml | 8 +++---- .../js/object-key-transformations.yaml | 8 +++---- collections/js/random-value-generators.yaml | 4 ++-- collections/js/url.yaml | 4 ++-- ...-class.md => add-class-to-html-element.md} | 0 .../js/s/{on.md => add-event-listener.md} | 0 ...nts.md => add-multiple-event-listeners.md} | 0 ...tyles.md => add-styles-to-html-element.md} | 0 ...d-week-days.md => add-weekdays-to-date.md} | 0 ...one.md => all-array-elements-are-falsy.md} | 0 ...ll.md => all-array-elements-are-truthy.md} | 0 ...{any.md => any-array-element-is-truthy.md} | 0 ...-right.md => append-function-arguments.md} | 0 ...tory.md => argument-coalescing-factory.md} | 0 .../s/{coalesce.md => argument-coalescing.md} | 0 .../s/{difference.md => array-difference.md} | 0 ...all-equal.md => array-element-equality.md} | 0 ...-unique.md => array-element-uniqueness.md} | 0 ...-duplicates.md => array-has-duplicates.md} | 0 ...{has-many.md => array-has-many-matches.md} | 0 ...has-one.md => array-has-only-one-match.md} | 0 snippets/js/s/{head.md => array-head.md} | 0 ...es-all.md => array-includes-all-values.md} | 0 ...es-any.md => array-includes-any-values.md} | 0 ...{intersection.md => array-intersection.md} | 0 ...ntained-in.md => array-is-contained-in.md} | 0 .../js/s/{is-sorted.md => array-is-sorted.md} | 0 ...{permutations.md => array-permutations.md} | 0 .../js/s/{ranking.md => array-ranking.md} | 0 snippets/js/s/{sample.md => array-sample.md} | 0 .../s/{similarity.md => array-similarity.md} | 0 ...rence.md => array-symmetric-difference.md} | 0 snippets/js/s/{tail.md => array-tail.md} | 0 ...-object.md => array-to-identity-object.md} | 0 ...-on.md => array-to-object-based-on-key.md} | 0 snippets/js/s/{union.md => array-union.md} | 0 ...d => array-unique-symmetric-difference.md} | 0 ...itial.md => array-without-last-element.md} | 0 ...ntents.md => arrays-have-same-contents.md} | 0 .../s/{intersects.md => arrays-intersect.md} | 0 ...e.md => arrays-of-consecutive-elements.md} | 0 ...-keys.md => assert-object-key-validity.md} | 0 ...ttempt.md => attempt-invoking-function.md} | 0 .../s/{average.md => average-of-numbers.md} | 0 ...d => bifurcate-array-based-on-function.md} | 0 ....md => bifurcate-array-based-on-values.md} | 0 .../s/{binary.md => binary-function-arity.md} | 0 .../s/{bind.md => bind-function-context.md} | 0 .../s/{bind-key.md => bind-object-method.md} | 0 .../s/{bind-all.md => bind-object-methods.md} | 0 .../js/s/{once.md => call-function-once.md} | 0 ...call.md => call-functions-with-context.md} | 0 ...hain-async.md => chain-async-functions.md} | 0 .../js/s/{check-prop.md => check-property.md} | 0 .../js/s/{chunkify.md => chunk-iterable.md} | 0 .../{closest.md => closest-numeric-match.md} | 0 .../s/{is-empty.md => collection-is-empty.md} | 0 .../{combine.md => combine-object-arrays.md} | 0 ...-cmd-args.md => command-line-arguments.md} | 0 .../js/s/{compact.md => compact-array.md} | 0 ...{compact-join.md => compact-join-array.md} | 0 .../js/s/{compose.md => compose-functions.md} | 0 ...hen.md => conditionally-apply-function.md} | 0 ...re.md => consecutive-element-subarrays.md} | 0 ...rge.md => converge-branching-functions.md} | 0 ...r.md => convert-function-from-variadic.md} | 0 ...nto.md => convert-function-to-variadic.md} | 0 ...-to-object.md => convert-map-to-object.md} | 0 ...ect-to-map.md => convert-object-to-map.md} | 0 ...tildify.md => convert-to-absolute-path.md} | 0 .../{copy-sign.md => copy-sign-to-number.md} | 0 ...{count-by.md => count-grouped-elements.md} | 0 ...s.md => create-directory-if-not-exists.md} | 0 .../{x-prod.md => cross-product-of-arrays.md} | 0 ...t-protocol.md => current-page-protocol.md} | 0 snippets/js/s/{curry.md => curry-function.md} | 0 ...en-dates.md => date-difference-in-days.md} | 0 ...n-dates.md => date-difference-in-hours.md} | 0 ...dates.md => date-difference-in-minutes.md} | 0 ...-dates.md => date-difference-in-months.md} | 0 ...dates.md => date-difference-in-seconds.md} | 0 ...ween.md => date-difference-in-weekdays.md} | 0 ...mestamp.md => date-from-unix-timestamp.md} | 0 ...-date.md => date-is-after-another-date.md} | 0 ...date.md => date-is-before-another-date.md} | 0 ...-dates.md => date-is-between-two-dates.md} | 0 ...ate.md => date-is-same-as-another-date.md} | 0 .../s/{is-weekday.md => date-is-weekday.md} | 0 .../s/{is-weekend.md => date-is-weekend.md} | 0 .../js/s/{tomorrow.md => date-tomorrow.md} | 0 .../js/s/{yesterday.md => date-yesterday.md} | 0 .../s/{debounce.md => debounce-function.md} | 0 ...tob.md => decode-base64-encoded-string.md} | 0 .../s/{deep-clone.md => deep-clone-object.md} | 0 ...{equals.md => deep-equality-comparison.md} | 0 ...{deep-flatten.md => deep-flatten-array.md} | 0 .../{deep-get.md => deep-get-object-value.md} | 0 ...ep-map-keys.md => deep-map-object-keys.md} | 0 .../{deep-merge.md => deep-merge-objects.md} | 0 ...> default-values-for-object-properties.md} | 0 snippets/js/s/{defer.md => defer-function.md} | 0 snippets/js/s/{delay.md => delay-function.md} | 0 .../js/s/{digitize.md => digitize-number.md} | 0 ...is-disjoint.md => disjointed-iterables.md} | 0 ...ance.md => distance-between-two-points.md} | 0 ...=> drop-array-elements-from-left-while.md} | 0 ...op.md => drop-array-elements-from-left.md} | 0 ...> drop-array-elements-from-right-while.md} | 0 ...t.md => drop-array-elements-from-right.md} | 0 .../s/{btoa.md => encode-string-to-base64.md} | 0 .../s/{every-nth.md => every-nth-element.md} | 0 ...filter-matching-and-unspecified-values.md} | 0 ...e.md => filter-non-unique-array-values.md} | 0 ... => filter-out-matching-array-elements.md} | 0 ...nique.md => filter-unique-array-values.md} | 0 ...find-key.md => find-first-matching-key.md} | 0 ...ind-first-n.md => find-first-n-matches.md} | 0 ...t-index.md => find-last-matching-index.md} | 0 ...-last-key.md => find-last-matching-key.md} | 0 ...nd-last.md => find-last-matching-value.md} | 0 ...{find-last-n.md => find-last-n-matches.md} | 0 .../s/{find-keys.md => find-matching-keys.md} | 0 .../js/s/{first-n.md => first-n-elements.md} | 0 .../js/s/{flatten.md => flatten-array.md} | 0 .../s/{flip.md => flip-function-arguments.md} | 0 .../s/{frozen-set.md => freeze-set-object.md} | 0 snippets/js/s/{ary.md => function-arity.md} | 0 ....md => function-based-array-difference.md} | 0 ... function-based-array-element-equality.md} | 0 ... function-based-array-element-grouping.md} | 0 ...unction-based-array-element-uniqueness.md} | 0 ...by.md => function-based-array-indexing.md} | 0 ...d => function-based-array-intersection.md} | 0 ...{max-by.md => function-based-array-max.md} | 0 ...ich.md => function-based-array-min-max.md} | 0 ...{min-by.md => function-based-array-min.md} | 0 ...tion-based-array-non-uniqueness-filter.md} | 0 ...ction-based-array-symmetric-difference.md} | 0 ...-with.md => function-based-array-union.md} | 0 ... => function-based-array-unique-values.md} | 0 ...function-based-array-uniqueness-filter.md} | 0 ...function-based-object-property-matches.md} | 0 ...ion-based-reversed-array-unique-values.md} | 0 ...ion-based-sorted-array-insertion-index.md} | 0 ...ased-sorted-array-last-insertion-index.md} | 0 .../s/{either.md => function-logical-or.md} | 0 .../js/s/{functions.md => function-names.md} | 0 .../s/{get.md => get-nested-object-value.md} | 0 .../{dig.md => get-nested-value-in-object.md} | 0 ...group-array-elements-based-on-function.md} | 0 .../js/s/{zip.md => group-array-elements.md} | 0 ...p-object.md => group-array-into-object.md} | 0 .../s/{sdbm.md => hash-string-into-number.md} | 0 .../js/s/{hide.md => hide-html-elements.md} | 0 ...has-class.md => html-element-has-class.md} | 0 ...ndex-of-all.md => index-of-all-matches.md} | 0 ...ize2-d-array.md => initialize-2d-array.md} | 0 ...> initialize-array-with-reversed-range.md} | 0 ...y.md => initialize-n-dimensional-array.md} | 0 ...md => insert-html-string-after-element.md} | 0 ...d => insert-html-string-before-element.md} | 0 ...t-at.md => insert-value-at-array-index.md} | 0 ....md => insertion-index-in-sorted-array.md} | 0 ...er.md => invoke-functions-on-arguments.md} | 0 ...iso-string.md => is-iso-formatted-date.md} | 0 ...ne.md => iso-format-date-with-timezone.md} | 0 .../js/s/{to-hash.md => iterable-to-hash.md} | 0 .../js/s/{times.md => iterate-n-times.md} | 0 ...or-own.md => iterate-object-properties.md} | 0 .../s/{join.md => join-array-into-string.md} | 0 .../s/{url-join.md => join-url-segments.md} | 0 .../js/s/{jso-nto-csv.md => json-to-csv.md} | 0 .../js/s/{juxt.md => juxtapose-functions.md} | 0 .../js/s/{last.md => last-array-element.md} | 0 ...> last-insertion-index-in-sorted-array.md} | 0 .../js/s/{last-n.md => last-n-elements.md} | 0 ...nerator.md => left-substring-generator.md} | 0 .../s/{log-base.md => logarithm-in-base.md} | 0 .../{complement.md => logical-complement.md} | 0 ...ngest-item.md => longest-array-element.md} | 0 .../{map-object.md => map-array-to-object.md} | 0 ...ecutive.md => map-consecutive-elements.md} | 0 ...ap-num-range.md => map-number-to-range.md} | 0 .../js/s/{map-keys.md => map-object-keys.md} | 0 ...{average-by.md => mapped-array-average.md} | 0 ...rence-by.md => mapped-array-difference.md} | 0 ...ion-by.md => mapped-array-intersection.md} | 0 .../js/s/{sum-by.md => mapped-array-sum.md} | 0 ...d => mapped-array-symmetric-difference.md} | 0 .../s/{union-by.md => mapped-array-union.md} | 0 ...{matches.md => match-object-properties.md} | 0 .../js/s/{memoize.md => memoize-function.md} | 0 snippets/js/s/{merge.md => merge-objects.md} | 0 ...uent.md => most-frequent-array-element.md} | 0 ...formant.md => most-performant-function.md} | 0 ...mple-size.md => multiple-array-samples.md} | 0 snippets/js/s/{max-n.md => n-max-elements.md} | 0 snippets/js/s/{min-n.md => n-min-elements.md} | 0 .../js/s/{negate.md => negate-predicate.md} | 0 snippets/js/s/{nest.md => nest-objects.md} | 0 snippets/js/s/{nth-arg.md => nth-argument.md} | 0 .../js/s/{nth-root.md => nth-number-root.md} | 0 .../js/s/{in-range.md => number-in-range.md} | 0 .../{to-currency.md => number-to-currency.md} | 0 ...imal-mark.md => number-to-decimal-mark.md} | 0 ...l-fixed.md => number-to-optional-fixed.md} | 0 .../js/s/{has-key.md => object-has-key.md} | 0 .../s/{has-value.md => object-has-value.md} | 0 .../s/{offset.md => offset-array-elements.md} | 0 ...mit-by.md => omit-matching-object-keys.md} | 0 .../js/s/{omit.md => omit-object-keys.md} | 0 ...> order-object-array-based-on-property.md} | 0 .../s/{order-by.md => order-object-array.md} | 0 snippets/js/s/{pad.md => pad-string.md} | 0 .../s/{accumulate.md => partial-sum-array.md} | 0 ...partition.md => partition-array-in-two.md} | 0 .../s/{partition-by.md => partition-array.md} | 0 ...percentile.md => percentile-of-matches.md} | 0 ...ick-by.md => pick-matching-object-keys.md} | 0 .../js/s/{pick.md => pick-object-keys.md} | 0 ...k.md => pluck-values-from-object-array.md} | 0 .../s/{prefix.md => prefix-css-property.md} | 0 ...rtial.md => prepend-function-arguments.md} | 0 ...tes.md => pretty-print-number-of-bytes.md} | 0 ...ags.md => process-arguments-have-flags.md} | 0 .../{prod.md => product-of-numeric-values.md} | 0 ....md => pull-matching-values-from-array.md} | 0 ....md => pull-values-from-array-at-index.md} | 0 ...ll-values-from-array-based-on-function.md} | 0 .../s/{pull.md => pull-values-from-array.md} | 0 ...lpha-numeric.md => random-alphanumeric.md} | 0 ...ge.md => random-integer-array-in-range.md} | 0 ...arg.md => rearrange-function-arguments.md} | 0 .../js/s/{redirect.md => redirect-to-url.md} | 0 ...eject.md => reject-non-matching-values.md} | 0 ...s.md => remove-class-from-html-element.md} | 0 ...emove-element.md => remove-dom-element.md} | 0 ...shank.md => remove-elements-from-array.md} | 0 .../js/s/{off.md => remove-event-listener.md} | 0 ...e.md => remove-matching-array-elements.md} | 0 ....md => remove-multiple-event-listeners.md} | 0 .../{rename-keys.md => rename-object-keys.md} | 0 ...ender-element.md => render-dom-element.md} | 0 ...ace-last.md => replace-last-occurrence.md} | 0 ...nd.md => replace-or-append-array-value.md} | 0 ...> resolve-promise-after-amount-of-time.md} | 0 ...-right.md => reverse-compose-functions.md} | 0 ...d => reverse-iterate-object-properties.md} | 0 ...erator.md => right-substring-generator.md} | 0 ...{round.md => round-number-to-precision.md} | 0 .../s/{run-async.md => run-function-asyc.md} | 0 ...style.md => set-style-for-html-element.md} | 0 ...allow-clone.md => shallow-clone-object.md} | 0 .../js/s/{show.md => show-html-elements.md} | 0 ...e.md => size-of-array-object-or-string.md} | 0 ...etical.md => sort-array-alphabetically.md} | 0 ...into-n.md => split-array-into-n-chunks.md} | 0 .../js/s/{chunk.md => split-into-chunks.md} | 0 .../s/{split-lines.md => split-into-lines.md} | 0 .../js/s/{slugify.md => string-to-slug.md} | 0 .../js/s/{words.md => string-to-words.md} | 0 snippets/js/s/{sub-set.md => subset.md} | 0 ...ccessive.md => successive-values-array.md} | 0 snippets/js/s/{sum.md => sum-array.md} | 0 .../s/{sum-n.md => sum-of-numbers-until-n.md} | 0 .../{sum-power.md => sum-powers-in-range.md} | 0 snippets/js/s/{super-set.md => superset.md} | 0 ...olize-keys.md => symbolize-object-keys.md} | 0 ... => take-array-elements-from-end-until.md} | 0 ... => take-array-elements-from-end-while.md} | 0 ...ght.md => take-array-elements-from-end.md} | 0 ...-until.md => take-array-elements-until.md} | 0 ...-while.md => take-array-elements-while.md} | 0 .../js/s/{take.md => take-array-elements.md} | 0 .../s/{throttle.md => throttle-function.md} | 0 ...to-char-array.md => to-character-array.md} | 0 .../js/s/{flags.md => to-flags-object.md} | 0 ...gle-element.md => toggle-array-element.md} | 0 ...-class.md => toggle-html-element-class.md} | 0 ...rgs.md => transform-function-arguments.md} | 0 .../s/{transform.md => transform-object.md} | 0 .../s/{transpose.md => transpose-matrix.md} | 0 .../js/s/{get-type.md => type-of-value.md} | 0 .../s/{unary.md => unary-function-arity.md} | 0 ...uncached.md => uncached-module-require.md} | 0 .../js/s/{uncurry.md => uncurry-function.md} | 0 snippets/js/s/{unfold.md => unfold-array.md} | 0 ...group-array-elements-based-on-function.md} | 0 .../s/{unzip.md => ungroup-array-elements.md} | 0 ...lements.md => unique-elements-in-array.md} | 0 ...mestamp.md => unix-timestamp-from-date.md} | 0 snippets/js/s/{unwind.md => unwind-object.md} | 0 .../{frequencies.md => value-frequencies.md} | 0 snippets/js/s/{is.md => value-is-of-type.md} | 0 ...walk-through.md => walk-through-object.md} | 0 305 files changed, 70 insertions(+), 70 deletions(-) rename snippets/js/s/{add-class.md => add-class-to-html-element.md} (100%) rename snippets/js/s/{on.md => add-event-listener.md} (100%) rename snippets/js/s/{add-multiple-events.md => add-multiple-event-listeners.md} (100%) rename snippets/js/s/{add-styles.md => add-styles-to-html-element.md} (100%) rename snippets/js/s/{add-week-days.md => add-weekdays-to-date.md} (100%) rename snippets/js/s/{none.md => all-array-elements-are-falsy.md} (100%) rename snippets/js/s/{all.md => all-array-elements-are-truthy.md} (100%) rename snippets/js/s/{any.md => any-array-element-is-truthy.md} (100%) rename snippets/js/s/{partial-right.md => append-function-arguments.md} (100%) rename snippets/js/s/{coalesce-factory.md => argument-coalescing-factory.md} (100%) rename snippets/js/s/{coalesce.md => argument-coalescing.md} (100%) rename snippets/js/s/{difference.md => array-difference.md} (100%) rename snippets/js/s/{all-equal.md => array-element-equality.md} (100%) rename snippets/js/s/{all-unique.md => array-element-uniqueness.md} (100%) rename snippets/js/s/{has-duplicates.md => array-has-duplicates.md} (100%) rename snippets/js/s/{has-many.md => array-has-many-matches.md} (100%) rename snippets/js/s/{has-one.md => array-has-only-one-match.md} (100%) rename snippets/js/s/{head.md => array-head.md} (100%) rename snippets/js/s/{includes-all.md => array-includes-all-values.md} (100%) rename snippets/js/s/{includes-any.md => array-includes-any-values.md} (100%) rename snippets/js/s/{intersection.md => array-intersection.md} (100%) rename snippets/js/s/{is-contained-in.md => array-is-contained-in.md} (100%) rename snippets/js/s/{is-sorted.md => array-is-sorted.md} (100%) rename snippets/js/s/{permutations.md => array-permutations.md} (100%) rename snippets/js/s/{ranking.md => array-ranking.md} (100%) rename snippets/js/s/{sample.md => array-sample.md} (100%) rename snippets/js/s/{similarity.md => array-similarity.md} (100%) rename snippets/js/s/{symmetric-difference.md => array-symmetric-difference.md} (100%) rename snippets/js/s/{tail.md => array-tail.md} (100%) rename snippets/js/s/{to-identity-object.md => array-to-identity-object.md} (100%) rename snippets/js/s/{index-on.md => array-to-object-based-on-key.md} (100%) rename snippets/js/s/{union.md => array-union.md} (100%) rename snippets/js/s/{unique-symmetric-difference.md => array-unique-symmetric-difference.md} (100%) rename snippets/js/s/{initial.md => array-without-last-element.md} (100%) rename snippets/js/s/{have-same-contents.md => arrays-have-same-contents.md} (100%) rename snippets/js/s/{intersects.md => arrays-intersect.md} (100%) rename snippets/js/s/{find-consecutive.md => arrays-of-consecutive-elements.md} (100%) rename snippets/js/s/{assert-valid-keys.md => assert-object-key-validity.md} (100%) rename snippets/js/s/{attempt.md => attempt-invoking-function.md} (100%) rename snippets/js/s/{average.md => average-of-numbers.md} (100%) rename snippets/js/s/{bifurcate-by.md => bifurcate-array-based-on-function.md} (100%) rename snippets/js/s/{bifurcate.md => bifurcate-array-based-on-values.md} (100%) rename snippets/js/s/{binary.md => binary-function-arity.md} (100%) rename snippets/js/s/{bind.md => bind-function-context.md} (100%) rename snippets/js/s/{bind-key.md => bind-object-method.md} (100%) rename snippets/js/s/{bind-all.md => bind-object-methods.md} (100%) rename snippets/js/s/{once.md => call-function-once.md} (100%) rename snippets/js/s/{call.md => call-functions-with-context.md} (100%) rename snippets/js/s/{chain-async.md => chain-async-functions.md} (100%) rename snippets/js/s/{check-prop.md => check-property.md} (100%) rename snippets/js/s/{chunkify.md => chunk-iterable.md} (100%) rename snippets/js/s/{closest.md => closest-numeric-match.md} (100%) rename snippets/js/s/{is-empty.md => collection-is-empty.md} (100%) rename snippets/js/s/{combine.md => combine-object-arrays.md} (100%) rename snippets/js/s/{get-cmd-args.md => command-line-arguments.md} (100%) rename snippets/js/s/{compact.md => compact-array.md} (100%) rename snippets/js/s/{compact-join.md => compact-join-array.md} (100%) rename snippets/js/s/{compose.md => compose-functions.md} (100%) rename snippets/js/s/{when.md => conditionally-apply-function.md} (100%) rename snippets/js/s/{aperture.md => consecutive-element-subarrays.md} (100%) rename snippets/js/s/{converge.md => converge-branching-functions.md} (100%) rename snippets/js/s/{spread-over.md => convert-function-from-variadic.md} (100%) rename snippets/js/s/{collect-into.md => convert-function-to-variadic.md} (100%) rename snippets/js/s/{map-to-object.md => convert-map-to-object.md} (100%) rename snippets/js/s/{object-to-map.md => convert-object-to-map.md} (100%) rename snippets/js/s/{untildify.md => convert-to-absolute-path.md} (100%) rename snippets/js/s/{copy-sign.md => copy-sign-to-number.md} (100%) rename snippets/js/s/{count-by.md => count-grouped-elements.md} (100%) rename snippets/js/s/{create-dir-if-not-exists.md => create-directory-if-not-exists.md} (100%) rename snippets/js/s/{x-prod.md => cross-product-of-arrays.md} (100%) rename snippets/js/s/{get-protocol.md => current-page-protocol.md} (100%) rename snippets/js/s/{curry.md => curry-function.md} (100%) rename snippets/js/s/{get-days-diff-between-dates.md => date-difference-in-days.md} (100%) rename snippets/js/s/{get-hours-diff-between-dates.md => date-difference-in-hours.md} (100%) rename snippets/js/s/{get-minutes-diff-between-dates.md => date-difference-in-minutes.md} (100%) rename snippets/js/s/{get-months-diff-between-dates.md => date-difference-in-months.md} (100%) rename snippets/js/s/{get-seconds-diff-between-dates.md => date-difference-in-seconds.md} (100%) rename snippets/js/s/{count-week-days-between.md => date-difference-in-weekdays.md} (100%) rename snippets/js/s/{from-timestamp.md => date-from-unix-timestamp.md} (100%) rename snippets/js/s/{is-after-date.md => date-is-after-another-date.md} (100%) rename snippets/js/s/{is-before-date.md => date-is-before-another-date.md} (100%) rename snippets/js/s/{is-between-dates.md => date-is-between-two-dates.md} (100%) rename snippets/js/s/{is-same-date.md => date-is-same-as-another-date.md} (100%) rename snippets/js/s/{is-weekday.md => date-is-weekday.md} (100%) rename snippets/js/s/{is-weekend.md => date-is-weekend.md} (100%) rename snippets/js/s/{tomorrow.md => date-tomorrow.md} (100%) rename snippets/js/s/{yesterday.md => date-yesterday.md} (100%) rename snippets/js/s/{debounce.md => debounce-function.md} (100%) rename snippets/js/s/{atob.md => decode-base64-encoded-string.md} (100%) rename snippets/js/s/{deep-clone.md => deep-clone-object.md} (100%) rename snippets/js/s/{equals.md => deep-equality-comparison.md} (100%) rename snippets/js/s/{deep-flatten.md => deep-flatten-array.md} (100%) rename snippets/js/s/{deep-get.md => deep-get-object-value.md} (100%) rename snippets/js/s/{deep-map-keys.md => deep-map-object-keys.md} (100%) rename snippets/js/s/{deep-merge.md => deep-merge-objects.md} (100%) rename snippets/js/s/{defaults.md => default-values-for-object-properties.md} (100%) rename snippets/js/s/{defer.md => defer-function.md} (100%) rename snippets/js/s/{delay.md => delay-function.md} (100%) rename snippets/js/s/{digitize.md => digitize-number.md} (100%) rename snippets/js/s/{is-disjoint.md => disjointed-iterables.md} (100%) rename snippets/js/s/{distance.md => distance-between-two-points.md} (100%) rename snippets/js/s/{drop-while.md => drop-array-elements-from-left-while.md} (100%) rename snippets/js/s/{drop.md => drop-array-elements-from-left.md} (100%) rename snippets/js/s/{drop-right-while.md => drop-array-elements-from-right-while.md} (100%) rename snippets/js/s/{drop-right.md => drop-array-elements-from-right.md} (100%) rename snippets/js/s/{btoa.md => encode-string-to-base64.md} (100%) rename snippets/js/s/{every-nth.md => every-nth-element.md} (100%) rename snippets/js/s/{reduced-filter.md => filter-matching-and-unspecified-values.md} (100%) rename snippets/js/s/{filter-non-unique.md => filter-non-unique-array-values.md} (100%) rename snippets/js/s/{without.md => filter-out-matching-array-elements.md} (100%) rename snippets/js/s/{filter-unique.md => filter-unique-array-values.md} (100%) rename snippets/js/s/{find-key.md => find-first-matching-key.md} (100%) rename snippets/js/s/{find-first-n.md => find-first-n-matches.md} (100%) rename snippets/js/s/{find-last-index.md => find-last-matching-index.md} (100%) rename snippets/js/s/{find-last-key.md => find-last-matching-key.md} (100%) rename snippets/js/s/{find-last.md => find-last-matching-value.md} (100%) rename snippets/js/s/{find-last-n.md => find-last-n-matches.md} (100%) rename snippets/js/s/{find-keys.md => find-matching-keys.md} (100%) rename snippets/js/s/{first-n.md => first-n-elements.md} (100%) rename snippets/js/s/{flatten.md => flatten-array.md} (100%) rename snippets/js/s/{flip.md => flip-function-arguments.md} (100%) rename snippets/js/s/{frozen-set.md => freeze-set-object.md} (100%) rename snippets/js/s/{ary.md => function-arity.md} (100%) rename snippets/js/s/{difference-with.md => function-based-array-difference.md} (100%) rename snippets/js/s/{all-equal-by.md => function-based-array-element-equality.md} (100%) rename snippets/js/s/{group-by.md => function-based-array-element-grouping.md} (100%) rename snippets/js/s/{all-unique-by.md => function-based-array-element-uniqueness.md} (100%) rename snippets/js/s/{index-by.md => function-based-array-indexing.md} (100%) rename snippets/js/s/{intersection-with.md => function-based-array-intersection.md} (100%) rename snippets/js/s/{max-by.md => function-based-array-max.md} (100%) rename snippets/js/s/{reduce-which.md => function-based-array-min-max.md} (100%) rename snippets/js/s/{min-by.md => function-based-array-min.md} (100%) rename snippets/js/s/{filter-non-unique-by.md => function-based-array-non-uniqueness-filter.md} (100%) rename snippets/js/s/{symmetric-difference-with.md => function-based-array-symmetric-difference.md} (100%) rename snippets/js/s/{union-with.md => function-based-array-union.md} (100%) rename snippets/js/s/{unique-elements-by.md => function-based-array-unique-values.md} (100%) rename snippets/js/s/{filter-unique-by.md => function-based-array-uniqueness-filter.md} (100%) rename snippets/js/s/{matches-with.md => function-based-object-property-matches.md} (100%) rename snippets/js/s/{unique-elements-by-right.md => function-based-reversed-array-unique-values.md} (100%) rename snippets/js/s/{sorted-index-by.md => function-based-sorted-array-insertion-index.md} (100%) rename snippets/js/s/{sorted-last-index-by.md => function-based-sorted-array-last-insertion-index.md} (100%) rename snippets/js/s/{either.md => function-logical-or.md} (100%) rename snippets/js/s/{functions.md => function-names.md} (100%) rename snippets/js/s/{get.md => get-nested-object-value.md} (100%) rename snippets/js/s/{dig.md => get-nested-value-in-object.md} (100%) rename snippets/js/s/{zip-with.md => group-array-elements-based-on-function.md} (100%) rename snippets/js/s/{zip.md => group-array-elements.md} (100%) rename snippets/js/s/{zip-object.md => group-array-into-object.md} (100%) rename snippets/js/s/{sdbm.md => hash-string-into-number.md} (100%) rename snippets/js/s/{hide.md => hide-html-elements.md} (100%) rename snippets/js/s/{has-class.md => html-element-has-class.md} (100%) rename snippets/js/s/{index-of-all.md => index-of-all-matches.md} (100%) rename snippets/js/s/{initialize2-d-array.md => initialize-2d-array.md} (100%) rename snippets/js/s/{initialize-array-with-range-right.md => initialize-array-with-reversed-range.md} (100%) rename snippets/js/s/{initialize-nd-array.md => initialize-n-dimensional-array.md} (100%) rename snippets/js/s/{insert-after.md => insert-html-string-after-element.md} (100%) rename snippets/js/s/{insert-before.md => insert-html-string-before-element.md} (100%) rename snippets/js/s/{insert-at.md => insert-value-at-array-index.md} (100%) rename snippets/js/s/{sorted-index.md => insertion-index-in-sorted-array.md} (100%) rename snippets/js/s/{over.md => invoke-functions-on-arguments.md} (100%) rename snippets/js/s/{is-iso-string.md => is-iso-formatted-date.md} (100%) rename snippets/js/s/{to-iso-string-with-timezone.md => iso-format-date-with-timezone.md} (100%) rename snippets/js/s/{to-hash.md => iterable-to-hash.md} (100%) rename snippets/js/s/{times.md => iterate-n-times.md} (100%) rename snippets/js/s/{for-own.md => iterate-object-properties.md} (100%) rename snippets/js/s/{join.md => join-array-into-string.md} (100%) rename snippets/js/s/{url-join.md => join-url-segments.md} (100%) rename snippets/js/s/{jso-nto-csv.md => json-to-csv.md} (100%) rename snippets/js/s/{juxt.md => juxtapose-functions.md} (100%) rename snippets/js/s/{last.md => last-array-element.md} (100%) rename snippets/js/s/{sorted-last-index.md => last-insertion-index-in-sorted-array.md} (100%) rename snippets/js/s/{last-n.md => last-n-elements.md} (100%) rename snippets/js/s/{left-substr-generator.md => left-substring-generator.md} (100%) rename snippets/js/s/{log-base.md => logarithm-in-base.md} (100%) rename snippets/js/s/{complement.md => logical-complement.md} (100%) rename snippets/js/s/{longest-item.md => longest-array-element.md} (100%) rename snippets/js/s/{map-object.md => map-array-to-object.md} (100%) rename snippets/js/s/{map-consecutive.md => map-consecutive-elements.md} (100%) rename snippets/js/s/{map-num-range.md => map-number-to-range.md} (100%) rename snippets/js/s/{map-keys.md => map-object-keys.md} (100%) rename snippets/js/s/{average-by.md => mapped-array-average.md} (100%) rename snippets/js/s/{difference-by.md => mapped-array-difference.md} (100%) rename snippets/js/s/{intersection-by.md => mapped-array-intersection.md} (100%) rename snippets/js/s/{sum-by.md => mapped-array-sum.md} (100%) rename snippets/js/s/{symmetric-difference-by.md => mapped-array-symmetric-difference.md} (100%) rename snippets/js/s/{union-by.md => mapped-array-union.md} (100%) rename snippets/js/s/{matches.md => match-object-properties.md} (100%) rename snippets/js/s/{memoize.md => memoize-function.md} (100%) rename snippets/js/s/{merge.md => merge-objects.md} (100%) rename snippets/js/s/{most-frequent.md => most-frequent-array-element.md} (100%) rename snippets/js/s/{most-performant.md => most-performant-function.md} (100%) rename snippets/js/s/{sample-size.md => multiple-array-samples.md} (100%) rename snippets/js/s/{max-n.md => n-max-elements.md} (100%) rename snippets/js/s/{min-n.md => n-min-elements.md} (100%) rename snippets/js/s/{negate.md => negate-predicate.md} (100%) rename snippets/js/s/{nest.md => nest-objects.md} (100%) rename snippets/js/s/{nth-arg.md => nth-argument.md} (100%) rename snippets/js/s/{nth-root.md => nth-number-root.md} (100%) rename snippets/js/s/{in-range.md => number-in-range.md} (100%) rename snippets/js/s/{to-currency.md => number-to-currency.md} (100%) rename snippets/js/s/{to-decimal-mark.md => number-to-decimal-mark.md} (100%) rename snippets/js/s/{to-optional-fixed.md => number-to-optional-fixed.md} (100%) rename snippets/js/s/{has-key.md => object-has-key.md} (100%) rename snippets/js/s/{has-value.md => object-has-value.md} (100%) rename snippets/js/s/{offset.md => offset-array-elements.md} (100%) rename snippets/js/s/{omit-by.md => omit-matching-object-keys.md} (100%) rename snippets/js/s/{omit.md => omit-object-keys.md} (100%) rename snippets/js/s/{order-with.md => order-object-array-based-on-property.md} (100%) rename snippets/js/s/{order-by.md => order-object-array.md} (100%) rename snippets/js/s/{pad.md => pad-string.md} (100%) rename snippets/js/s/{accumulate.md => partial-sum-array.md} (100%) rename snippets/js/s/{partition.md => partition-array-in-two.md} (100%) rename snippets/js/s/{partition-by.md => partition-array.md} (100%) rename snippets/js/s/{percentile.md => percentile-of-matches.md} (100%) rename snippets/js/s/{pick-by.md => pick-matching-object-keys.md} (100%) rename snippets/js/s/{pick.md => pick-object-keys.md} (100%) rename snippets/js/s/{pluck.md => pluck-values-from-object-array.md} (100%) rename snippets/js/s/{prefix.md => prefix-css-property.md} (100%) rename snippets/js/s/{partial.md => prepend-function-arguments.md} (100%) rename snippets/js/s/{pretty-bytes.md => pretty-print-number-of-bytes.md} (100%) rename snippets/js/s/{has-flags.md => process-arguments-have-flags.md} (100%) rename snippets/js/s/{prod.md => product-of-numeric-values.md} (100%) rename snippets/js/s/{pull-at-value.md => pull-matching-values-from-array.md} (100%) rename snippets/js/s/{pull-at-index.md => pull-values-from-array-at-index.md} (100%) rename snippets/js/s/{pull-by.md => pull-values-from-array-based-on-function.md} (100%) rename snippets/js/s/{pull.md => pull-values-from-array.md} (100%) rename snippets/js/s/{random-alpha-numeric.md => random-alphanumeric.md} (100%) rename snippets/js/s/{random-int-array-in-range.md => random-integer-array-in-range.md} (100%) rename snippets/js/s/{rearg.md => rearrange-function-arguments.md} (100%) rename snippets/js/s/{redirect.md => redirect-to-url.md} (100%) rename snippets/js/s/{reject.md => reject-non-matching-values.md} (100%) rename snippets/js/s/{remove-class.md => remove-class-from-html-element.md} (100%) rename snippets/js/s/{remove-element.md => remove-dom-element.md} (100%) rename snippets/js/s/{shank.md => remove-elements-from-array.md} (100%) rename snippets/js/s/{off.md => remove-event-listener.md} (100%) rename snippets/js/s/{remove.md => remove-matching-array-elements.md} (100%) rename snippets/js/s/{remove-event-listener-all.md => remove-multiple-event-listeners.md} (100%) rename snippets/js/s/{rename-keys.md => rename-object-keys.md} (100%) rename snippets/js/s/{render-element.md => render-dom-element.md} (100%) rename snippets/js/s/{replace-last.md => replace-last-occurrence.md} (100%) rename snippets/js/s/{replace-or-append.md => replace-or-append-array-value.md} (100%) rename snippets/js/s/{resolve-after.md => resolve-promise-after-amount-of-time.md} (100%) rename snippets/js/s/{compose-right.md => reverse-compose-functions.md} (100%) rename snippets/js/s/{for-own-right.md => reverse-iterate-object-properties.md} (100%) rename snippets/js/s/{right-substr-generator.md => right-substring-generator.md} (100%) rename snippets/js/s/{round.md => round-number-to-precision.md} (100%) rename snippets/js/s/{run-async.md => run-function-asyc.md} (100%) rename snippets/js/s/{set-style.md => set-style-for-html-element.md} (100%) rename snippets/js/s/{shallow-clone.md => shallow-clone-object.md} (100%) rename snippets/js/s/{show.md => show-html-elements.md} (100%) rename snippets/js/s/{size.md => size-of-array-object-or-string.md} (100%) rename snippets/js/s/{alphabetical.md => sort-array-alphabetically.md} (100%) rename snippets/js/s/{chunk-into-n.md => split-array-into-n-chunks.md} (100%) rename snippets/js/s/{chunk.md => split-into-chunks.md} (100%) rename snippets/js/s/{split-lines.md => split-into-lines.md} (100%) rename snippets/js/s/{slugify.md => string-to-slug.md} (100%) rename snippets/js/s/{words.md => string-to-words.md} (100%) rename snippets/js/s/{sub-set.md => subset.md} (100%) rename snippets/js/s/{reduce-successive.md => successive-values-array.md} (100%) rename snippets/js/s/{sum.md => sum-array.md} (100%) rename snippets/js/s/{sum-n.md => sum-of-numbers-until-n.md} (100%) rename snippets/js/s/{sum-power.md => sum-powers-in-range.md} (100%) rename snippets/js/s/{super-set.md => superset.md} (100%) rename snippets/js/s/{symbolize-keys.md => symbolize-object-keys.md} (100%) rename snippets/js/s/{take-right-until.md => take-array-elements-from-end-until.md} (100%) rename snippets/js/s/{take-right-while.md => take-array-elements-from-end-while.md} (100%) rename snippets/js/s/{take-right.md => take-array-elements-from-end.md} (100%) rename snippets/js/s/{take-until.md => take-array-elements-until.md} (100%) rename snippets/js/s/{take-while.md => take-array-elements-while.md} (100%) rename snippets/js/s/{take.md => take-array-elements.md} (100%) rename snippets/js/s/{throttle.md => throttle-function.md} (100%) rename snippets/js/s/{to-char-array.md => to-character-array.md} (100%) rename snippets/js/s/{flags.md => to-flags-object.md} (100%) rename snippets/js/s/{toggle-element.md => toggle-array-element.md} (100%) rename snippets/js/s/{toggle-class.md => toggle-html-element-class.md} (100%) rename snippets/js/s/{over-args.md => transform-function-arguments.md} (100%) rename snippets/js/s/{transform.md => transform-object.md} (100%) rename snippets/js/s/{transpose.md => transpose-matrix.md} (100%) rename snippets/js/s/{get-type.md => type-of-value.md} (100%) rename snippets/js/s/{unary.md => unary-function-arity.md} (100%) rename snippets/js/s/{require-uncached.md => uncached-module-require.md} (100%) rename snippets/js/s/{uncurry.md => uncurry-function.md} (100%) rename snippets/js/s/{unfold.md => unfold-array.md} (100%) rename snippets/js/s/{unzip-with.md => ungroup-array-elements-based-on-function.md} (100%) rename snippets/js/s/{unzip.md => ungroup-array-elements.md} (100%) rename snippets/js/s/{unique-elements.md => unique-elements-in-array.md} (100%) rename snippets/js/s/{get-timestamp.md => unix-timestamp-from-date.md} (100%) rename snippets/js/s/{unwind.md => unwind-object.md} (100%) rename snippets/js/s/{frequencies.md => value-frequencies.md} (100%) rename snippets/js/s/{is.md => value-is-of-type.md} (100%) rename snippets/js/s/{walk-through.md => walk-through-object.md} (100%) diff --git a/collections/js/array-initialization.yaml b/collections/js/array-initialization.yaml index 2b941567e..277bd7e5c 100644 --- a/collections/js/array-initialization.yaml +++ b/collections/js/array-initialization.yaml @@ -5,12 +5,12 @@ snippetIds: - js/s/array-initialization - js/s/initialize-array-with-values - js/s/initialize-array-with-range - - js/s/initialize-array-with-range-right + - js/s/initialize-array-with-reversed-range - js/s/initialize-mapped-array - js/s/initialize-array-while - js/s/initialize-array-until - - js/s/initialize2-d-array - - js/s/initialize-nd-array + - js/s/initialize-2d-array + - js/s/initialize-n-dimensional-array splash: laptop-lamp.png description: >- When it comes to array initialization in JavaScript, there are as many options diff --git a/collections/js/array-set-operations.yaml b/collections/js/array-set-operations.yaml index 3964bfd03..1c46b6a67 100644 --- a/collections/js/array-set-operations.yaml +++ b/collections/js/array-set-operations.yaml @@ -2,18 +2,18 @@ slug: js/array-set-operations name: JavaScript Array Set Operations featured: true snippetIds: - - js/s/union - - js/s/intersection - - js/s/difference - - js/s/symmetric-difference - - js/s/union-by - - js/s/intersection-by - - js/s/difference-by - - js/s/symmetric-difference-by - - js/s/union-with - - js/s/intersection-with - - js/s/difference-with - - js/s/symmetric-difference-with + - js/s/array-union + - js/s/array-intersection + - js/s/array-difference + - js/s/array-symmetric-difference + - js/s/mapped-array-union + - js/s/mapped-array-intersection + - js/s/mapped-array-difference + - js/s/mapped-array-symmetric-difference + - js/s/function-based-array-union + - js/s/function-based-array-intersection + - js/s/function-based-array-difference + - js/s/function-based-array-symmetric-difference splash: touch-flower.png description: >- Mathematical set operations can be easily applied to JavaScript arrays. Learn diff --git a/collections/js/array-tricks.yaml b/collections/js/array-tricks.yaml index 6aa1c232e..76f3819ce 100644 --- a/collections/js/array-tricks.yaml +++ b/collections/js/array-tricks.yaml @@ -2,18 +2,18 @@ slug: js/array-tricks name: JavaScript Array Tricks featured: true snippetIds: - - js/s/unique-elements - - js/s/compact - - js/s/any - - js/s/all - - js/s/none - - js/s/difference - - js/s/union - - js/s/intersection - - js/s/head - - js/s/tail - - js/s/last - - js/s/flatten + - js/s/unique-elements-in-array + - js/s/compact-array + - js/s/any-array-element-is-truthy + - js/s/all-array-elements-are-truthy + - js/s/all-array-elements-are-falsy + - js/s/array-difference + - js/s/array-union + - js/s/array-intersection + - js/s/array-head + - js/s/array-tail + - js/s/last-array-element + - js/s/flatten-array splash: terrarium.png description: >- Arrays are one of the most common data types in JavaScript. While there are diff --git a/collections/js/comparison.yaml b/collections/js/comparison.yaml index d062435eb..845a23999 100644 --- a/collections/js/comparison.yaml +++ b/collections/js/comparison.yaml @@ -8,11 +8,11 @@ snippetIds: - js/s/array-comparison - js/s/date-comparison - js/s/object-is-triple-equals - - js/s/equals - - js/s/matches - - js/s/matches-with - - js/s/have-same-contents - - js/s/is-same-date + - js/s/deep-equality-comparison + - js/s/match-object-properties + - js/s/function-based-object-property-matches + - js/s/arrays-have-same-contents + - js/s/date-is-same-as-another-date splash: succulent.png description: >- Comparing values in JavaScript is one of the most common tasks. Yet, there are diff --git a/collections/js/css-manipulation.yaml b/collections/js/css-manipulation.yaml index 3d0fa7535..748c252ad 100644 --- a/collections/js/css-manipulation.yaml +++ b/collections/js/css-manipulation.yaml @@ -2,18 +2,18 @@ slug: js/css-manipulation name: CSS Manipulation with JavaScript featured: true snippetIds: - - js/s/toggle-class - - js/s/add-class - - js/s/remove-class - - js/s/has-class + - js/s/toggle-html-element-class + - js/s/add-class-to-html-element + - js/s/remove-class-from-html-element + - js/s/html-element-has-class - js/s/get-style - - js/s/set-style - - js/s/add-styles + - js/s/set-style-for-html-element + - js/s/add-styles-to-html-element - js/s/inject-css - - js/s/hide - - js/s/show + - js/s/hide-html-elements + - js/s/show-html-elements - js/s/remove-attributes - - js/s/prefix + - js/s/prefix-css-property splash: planning.png description: >- Unlock the power of manipulating CSS in the browser, using JavaScript. From diff --git a/collections/js/dom-manipulation.yaml b/collections/js/dom-manipulation.yaml index 4d47acf6e..0be16c04a 100644 --- a/collections/js/dom-manipulation.yaml +++ b/collections/js/dom-manipulation.yaml @@ -4,10 +4,10 @@ featured: true snippetIds: - js/s/create-html-elements - js/s/create-element - - js/s/remove-element - - js/s/insert-after - - js/s/insert-before - - js/s/render-element + - js/s/remove-dom-element + - js/s/insert-html-string-after-element + - js/s/insert-html-string-before-element + - js/s/render-dom-element splash: hiking-balance.png description: >- DOM manipulation is a core skill for any web developer. Learn how to diff --git a/collections/js/event-handling.yaml b/collections/js/event-handling.yaml index 242d56bee..dec7357ae 100644 --- a/collections/js/event-handling.yaml +++ b/collections/js/event-handling.yaml @@ -2,14 +2,14 @@ slug: js/event-handling name: JavaScript Event Handling featured: true snippetIds: - - js/s/on - - js/s/off + - js/s/add-event-listener + - js/s/remove-event-listener - js/s/listen-once - js/s/on-click-outside - js/s/event-bubbling-capturing-delegation - js/s/add-event-listener-all - - js/s/remove-event-listener-all - - js/s/add-multiple-events + - js/s/remove-multiple-event-listeners + - js/s/add-multiple-event-listeners - js/s/execute-event-handler-once - js/s/passive-scroll-listener-performance - js/s/on-scroll-stop diff --git a/collections/js/generators.yaml b/collections/js/generators.yaml index d1db2f63f..83e31895f 100644 --- a/collections/js/generators.yaml +++ b/collections/js/generators.yaml @@ -8,14 +8,14 @@ snippetIds: - js/s/cycle-generator - js/s/generator-to-array - js/s/is-generator-function - - js/s/chunkify + - js/s/chunk-iterable - js/s/date-range-generator - js/s/index-of-substrings - - js/s/walk-through + - js/s/walk-through-object - js/s/generate-while - js/s/generate-until - - js/s/left-substr-generator - - js/s/right-substr-generator + - js/s/left-substring-generator + - js/s/right-substring-generator - js/s/make-iterable - js/s/enum - js/s/object-array-proxy diff --git a/collections/js/logical-operations.yaml b/collections/js/logical-operations.yaml index 299fec6d3..cc6fcf72e 100644 --- a/collections/js/logical-operations.yaml +++ b/collections/js/logical-operations.yaml @@ -7,10 +7,10 @@ snippetIds: - js/s/not - js/s/xor - js/s/nor - - js/s/when + - js/s/conditionally-apply-function - js/s/both - - js/s/either - - js/s/complement + - js/s/function-logical-or + - js/s/logical-complement splash: chess-pawns.png description: >- Boolean logic and logical operations might not come up that often in diff --git a/collections/js/object-cloning.yaml b/collections/js/object-cloning.yaml index cf9d57452..2e6d594ca 100644 --- a/collections/js/object-cloning.yaml +++ b/collections/js/object-cloning.yaml @@ -3,8 +3,8 @@ name: JavaScript Object Cloning featured: true snippetIds: - js/s/shallow-deep-clone - - js/s/shallow-clone - - js/s/deep-clone + - js/s/shallow-clone-object + - js/s/deep-clone-object - js/s/copy-array splash: coffee-phone-tray.png description: >- diff --git a/collections/js/object-key-selection.yaml b/collections/js/object-key-selection.yaml index 2d4567899..63615d4e0 100644 --- a/collections/js/object-key-selection.yaml +++ b/collections/js/object-key-selection.yaml @@ -2,10 +2,10 @@ slug: js/object-key-selection name: JavaScript Object Key Selection featured: true snippetIds: - - js/s/pick - - js/s/omit - - js/s/pick-by - - js/s/omit-by + - js/s/pick-object-keys + - js/s/omit-object-keys + - js/s/pick-matching-object-keys + - js/s/omit-matching-object-keys splash: succulent-cluster.png description: >- Sometimes, JavaScript objects come with a lot of keys and you only need a few diff --git a/collections/js/object-key-transformations.yaml b/collections/js/object-key-transformations.yaml index 6a431da3c..3d9513862 100644 --- a/collections/js/object-key-transformations.yaml +++ b/collections/js/object-key-transformations.yaml @@ -4,10 +4,10 @@ featured: true snippetIds: - js/s/lowerize - js/s/upperize - - js/s/map-keys - - js/s/rename-keys - - js/s/deep-map-keys - - js/s/symbolize-keys + - js/s/map-object-keys + - js/s/rename-object-keys + - js/s/deep-map-object-keys + - js/s/symbolize-object-keys splash: plant-window.png description: >- Sometimes, object keys aren't exactly what you want them to be. Luckily, this diff --git a/collections/js/random-value-generators.yaml b/collections/js/random-value-generators.yaml index 57f9a8ab7..ccfb5c782 100644 --- a/collections/js/random-value-generators.yaml +++ b/collections/js/random-value-generators.yaml @@ -4,8 +4,8 @@ featured: true snippetIds: - js/s/random-number-in-range - js/s/random-integer-in-range - - js/s/random-int-array-in-range - - js/s/random-alpha-numeric + - js/s/random-integer-array-in-range + - js/s/random-alphanumeric - js/s/random-boolean - js/s/random-hex-color-code - js/s/random-gauss diff --git a/collections/js/url.yaml b/collections/js/url.yaml index d96724984..2d2a5f9c9 100644 --- a/collections/js/url.yaml +++ b/collections/js/url.yaml @@ -11,10 +11,10 @@ snippetIds: - js/s/https-redirect - js/s/get-url-parameters - js/s/get-base-url - - js/s/redirect + - js/s/redirect-to-url - js/s/is-absolute-url - js/s/is-same-origin - - js/s/url-join + - js/s/join-url-segments splash: pots-and-plants.png description: >- URLs are an integral part of the web, which makes working with them an diff --git a/snippets/js/s/add-class.md b/snippets/js/s/add-class-to-html-element.md similarity index 100% rename from snippets/js/s/add-class.md rename to snippets/js/s/add-class-to-html-element.md diff --git a/snippets/js/s/on.md b/snippets/js/s/add-event-listener.md similarity index 100% rename from snippets/js/s/on.md rename to snippets/js/s/add-event-listener.md diff --git a/snippets/js/s/add-multiple-events.md b/snippets/js/s/add-multiple-event-listeners.md similarity index 100% rename from snippets/js/s/add-multiple-events.md rename to snippets/js/s/add-multiple-event-listeners.md diff --git a/snippets/js/s/add-styles.md b/snippets/js/s/add-styles-to-html-element.md similarity index 100% rename from snippets/js/s/add-styles.md rename to snippets/js/s/add-styles-to-html-element.md diff --git a/snippets/js/s/add-week-days.md b/snippets/js/s/add-weekdays-to-date.md similarity index 100% rename from snippets/js/s/add-week-days.md rename to snippets/js/s/add-weekdays-to-date.md diff --git a/snippets/js/s/none.md b/snippets/js/s/all-array-elements-are-falsy.md similarity index 100% rename from snippets/js/s/none.md rename to snippets/js/s/all-array-elements-are-falsy.md diff --git a/snippets/js/s/all.md b/snippets/js/s/all-array-elements-are-truthy.md similarity index 100% rename from snippets/js/s/all.md rename to snippets/js/s/all-array-elements-are-truthy.md diff --git a/snippets/js/s/any.md b/snippets/js/s/any-array-element-is-truthy.md similarity index 100% rename from snippets/js/s/any.md rename to snippets/js/s/any-array-element-is-truthy.md diff --git a/snippets/js/s/partial-right.md b/snippets/js/s/append-function-arguments.md similarity index 100% rename from snippets/js/s/partial-right.md rename to snippets/js/s/append-function-arguments.md diff --git a/snippets/js/s/coalesce-factory.md b/snippets/js/s/argument-coalescing-factory.md similarity index 100% rename from snippets/js/s/coalesce-factory.md rename to snippets/js/s/argument-coalescing-factory.md diff --git a/snippets/js/s/coalesce.md b/snippets/js/s/argument-coalescing.md similarity index 100% rename from snippets/js/s/coalesce.md rename to snippets/js/s/argument-coalescing.md diff --git a/snippets/js/s/difference.md b/snippets/js/s/array-difference.md similarity index 100% rename from snippets/js/s/difference.md rename to snippets/js/s/array-difference.md diff --git a/snippets/js/s/all-equal.md b/snippets/js/s/array-element-equality.md similarity index 100% rename from snippets/js/s/all-equal.md rename to snippets/js/s/array-element-equality.md diff --git a/snippets/js/s/all-unique.md b/snippets/js/s/array-element-uniqueness.md similarity index 100% rename from snippets/js/s/all-unique.md rename to snippets/js/s/array-element-uniqueness.md diff --git a/snippets/js/s/has-duplicates.md b/snippets/js/s/array-has-duplicates.md similarity index 100% rename from snippets/js/s/has-duplicates.md rename to snippets/js/s/array-has-duplicates.md diff --git a/snippets/js/s/has-many.md b/snippets/js/s/array-has-many-matches.md similarity index 100% rename from snippets/js/s/has-many.md rename to snippets/js/s/array-has-many-matches.md diff --git a/snippets/js/s/has-one.md b/snippets/js/s/array-has-only-one-match.md similarity index 100% rename from snippets/js/s/has-one.md rename to snippets/js/s/array-has-only-one-match.md diff --git a/snippets/js/s/head.md b/snippets/js/s/array-head.md similarity index 100% rename from snippets/js/s/head.md rename to snippets/js/s/array-head.md diff --git a/snippets/js/s/includes-all.md b/snippets/js/s/array-includes-all-values.md similarity index 100% rename from snippets/js/s/includes-all.md rename to snippets/js/s/array-includes-all-values.md diff --git a/snippets/js/s/includes-any.md b/snippets/js/s/array-includes-any-values.md similarity index 100% rename from snippets/js/s/includes-any.md rename to snippets/js/s/array-includes-any-values.md diff --git a/snippets/js/s/intersection.md b/snippets/js/s/array-intersection.md similarity index 100% rename from snippets/js/s/intersection.md rename to snippets/js/s/array-intersection.md diff --git a/snippets/js/s/is-contained-in.md b/snippets/js/s/array-is-contained-in.md similarity index 100% rename from snippets/js/s/is-contained-in.md rename to snippets/js/s/array-is-contained-in.md diff --git a/snippets/js/s/is-sorted.md b/snippets/js/s/array-is-sorted.md similarity index 100% rename from snippets/js/s/is-sorted.md rename to snippets/js/s/array-is-sorted.md diff --git a/snippets/js/s/permutations.md b/snippets/js/s/array-permutations.md similarity index 100% rename from snippets/js/s/permutations.md rename to snippets/js/s/array-permutations.md diff --git a/snippets/js/s/ranking.md b/snippets/js/s/array-ranking.md similarity index 100% rename from snippets/js/s/ranking.md rename to snippets/js/s/array-ranking.md diff --git a/snippets/js/s/sample.md b/snippets/js/s/array-sample.md similarity index 100% rename from snippets/js/s/sample.md rename to snippets/js/s/array-sample.md diff --git a/snippets/js/s/similarity.md b/snippets/js/s/array-similarity.md similarity index 100% rename from snippets/js/s/similarity.md rename to snippets/js/s/array-similarity.md diff --git a/snippets/js/s/symmetric-difference.md b/snippets/js/s/array-symmetric-difference.md similarity index 100% rename from snippets/js/s/symmetric-difference.md rename to snippets/js/s/array-symmetric-difference.md diff --git a/snippets/js/s/tail.md b/snippets/js/s/array-tail.md similarity index 100% rename from snippets/js/s/tail.md rename to snippets/js/s/array-tail.md diff --git a/snippets/js/s/to-identity-object.md b/snippets/js/s/array-to-identity-object.md similarity index 100% rename from snippets/js/s/to-identity-object.md rename to snippets/js/s/array-to-identity-object.md diff --git a/snippets/js/s/index-on.md b/snippets/js/s/array-to-object-based-on-key.md similarity index 100% rename from snippets/js/s/index-on.md rename to snippets/js/s/array-to-object-based-on-key.md diff --git a/snippets/js/s/union.md b/snippets/js/s/array-union.md similarity index 100% rename from snippets/js/s/union.md rename to snippets/js/s/array-union.md diff --git a/snippets/js/s/unique-symmetric-difference.md b/snippets/js/s/array-unique-symmetric-difference.md similarity index 100% rename from snippets/js/s/unique-symmetric-difference.md rename to snippets/js/s/array-unique-symmetric-difference.md diff --git a/snippets/js/s/initial.md b/snippets/js/s/array-without-last-element.md similarity index 100% rename from snippets/js/s/initial.md rename to snippets/js/s/array-without-last-element.md diff --git a/snippets/js/s/have-same-contents.md b/snippets/js/s/arrays-have-same-contents.md similarity index 100% rename from snippets/js/s/have-same-contents.md rename to snippets/js/s/arrays-have-same-contents.md diff --git a/snippets/js/s/intersects.md b/snippets/js/s/arrays-intersect.md similarity index 100% rename from snippets/js/s/intersects.md rename to snippets/js/s/arrays-intersect.md diff --git a/snippets/js/s/find-consecutive.md b/snippets/js/s/arrays-of-consecutive-elements.md similarity index 100% rename from snippets/js/s/find-consecutive.md rename to snippets/js/s/arrays-of-consecutive-elements.md diff --git a/snippets/js/s/assert-valid-keys.md b/snippets/js/s/assert-object-key-validity.md similarity index 100% rename from snippets/js/s/assert-valid-keys.md rename to snippets/js/s/assert-object-key-validity.md diff --git a/snippets/js/s/attempt.md b/snippets/js/s/attempt-invoking-function.md similarity index 100% rename from snippets/js/s/attempt.md rename to snippets/js/s/attempt-invoking-function.md diff --git a/snippets/js/s/average.md b/snippets/js/s/average-of-numbers.md similarity index 100% rename from snippets/js/s/average.md rename to snippets/js/s/average-of-numbers.md diff --git a/snippets/js/s/bifurcate-by.md b/snippets/js/s/bifurcate-array-based-on-function.md similarity index 100% rename from snippets/js/s/bifurcate-by.md rename to snippets/js/s/bifurcate-array-based-on-function.md diff --git a/snippets/js/s/bifurcate.md b/snippets/js/s/bifurcate-array-based-on-values.md similarity index 100% rename from snippets/js/s/bifurcate.md rename to snippets/js/s/bifurcate-array-based-on-values.md diff --git a/snippets/js/s/binary.md b/snippets/js/s/binary-function-arity.md similarity index 100% rename from snippets/js/s/binary.md rename to snippets/js/s/binary-function-arity.md diff --git a/snippets/js/s/bind.md b/snippets/js/s/bind-function-context.md similarity index 100% rename from snippets/js/s/bind.md rename to snippets/js/s/bind-function-context.md diff --git a/snippets/js/s/bind-key.md b/snippets/js/s/bind-object-method.md similarity index 100% rename from snippets/js/s/bind-key.md rename to snippets/js/s/bind-object-method.md diff --git a/snippets/js/s/bind-all.md b/snippets/js/s/bind-object-methods.md similarity index 100% rename from snippets/js/s/bind-all.md rename to snippets/js/s/bind-object-methods.md diff --git a/snippets/js/s/once.md b/snippets/js/s/call-function-once.md similarity index 100% rename from snippets/js/s/once.md rename to snippets/js/s/call-function-once.md diff --git a/snippets/js/s/call.md b/snippets/js/s/call-functions-with-context.md similarity index 100% rename from snippets/js/s/call.md rename to snippets/js/s/call-functions-with-context.md diff --git a/snippets/js/s/chain-async.md b/snippets/js/s/chain-async-functions.md similarity index 100% rename from snippets/js/s/chain-async.md rename to snippets/js/s/chain-async-functions.md diff --git a/snippets/js/s/check-prop.md b/snippets/js/s/check-property.md similarity index 100% rename from snippets/js/s/check-prop.md rename to snippets/js/s/check-property.md diff --git a/snippets/js/s/chunkify.md b/snippets/js/s/chunk-iterable.md similarity index 100% rename from snippets/js/s/chunkify.md rename to snippets/js/s/chunk-iterable.md diff --git a/snippets/js/s/closest.md b/snippets/js/s/closest-numeric-match.md similarity index 100% rename from snippets/js/s/closest.md rename to snippets/js/s/closest-numeric-match.md diff --git a/snippets/js/s/is-empty.md b/snippets/js/s/collection-is-empty.md similarity index 100% rename from snippets/js/s/is-empty.md rename to snippets/js/s/collection-is-empty.md diff --git a/snippets/js/s/combine.md b/snippets/js/s/combine-object-arrays.md similarity index 100% rename from snippets/js/s/combine.md rename to snippets/js/s/combine-object-arrays.md diff --git a/snippets/js/s/get-cmd-args.md b/snippets/js/s/command-line-arguments.md similarity index 100% rename from snippets/js/s/get-cmd-args.md rename to snippets/js/s/command-line-arguments.md diff --git a/snippets/js/s/compact.md b/snippets/js/s/compact-array.md similarity index 100% rename from snippets/js/s/compact.md rename to snippets/js/s/compact-array.md diff --git a/snippets/js/s/compact-join.md b/snippets/js/s/compact-join-array.md similarity index 100% rename from snippets/js/s/compact-join.md rename to snippets/js/s/compact-join-array.md diff --git a/snippets/js/s/compose.md b/snippets/js/s/compose-functions.md similarity index 100% rename from snippets/js/s/compose.md rename to snippets/js/s/compose-functions.md diff --git a/snippets/js/s/when.md b/snippets/js/s/conditionally-apply-function.md similarity index 100% rename from snippets/js/s/when.md rename to snippets/js/s/conditionally-apply-function.md diff --git a/snippets/js/s/aperture.md b/snippets/js/s/consecutive-element-subarrays.md similarity index 100% rename from snippets/js/s/aperture.md rename to snippets/js/s/consecutive-element-subarrays.md diff --git a/snippets/js/s/converge.md b/snippets/js/s/converge-branching-functions.md similarity index 100% rename from snippets/js/s/converge.md rename to snippets/js/s/converge-branching-functions.md diff --git a/snippets/js/s/spread-over.md b/snippets/js/s/convert-function-from-variadic.md similarity index 100% rename from snippets/js/s/spread-over.md rename to snippets/js/s/convert-function-from-variadic.md diff --git a/snippets/js/s/collect-into.md b/snippets/js/s/convert-function-to-variadic.md similarity index 100% rename from snippets/js/s/collect-into.md rename to snippets/js/s/convert-function-to-variadic.md diff --git a/snippets/js/s/map-to-object.md b/snippets/js/s/convert-map-to-object.md similarity index 100% rename from snippets/js/s/map-to-object.md rename to snippets/js/s/convert-map-to-object.md diff --git a/snippets/js/s/object-to-map.md b/snippets/js/s/convert-object-to-map.md similarity index 100% rename from snippets/js/s/object-to-map.md rename to snippets/js/s/convert-object-to-map.md diff --git a/snippets/js/s/untildify.md b/snippets/js/s/convert-to-absolute-path.md similarity index 100% rename from snippets/js/s/untildify.md rename to snippets/js/s/convert-to-absolute-path.md diff --git a/snippets/js/s/copy-sign.md b/snippets/js/s/copy-sign-to-number.md similarity index 100% rename from snippets/js/s/copy-sign.md rename to snippets/js/s/copy-sign-to-number.md diff --git a/snippets/js/s/count-by.md b/snippets/js/s/count-grouped-elements.md similarity index 100% rename from snippets/js/s/count-by.md rename to snippets/js/s/count-grouped-elements.md diff --git a/snippets/js/s/create-dir-if-not-exists.md b/snippets/js/s/create-directory-if-not-exists.md similarity index 100% rename from snippets/js/s/create-dir-if-not-exists.md rename to snippets/js/s/create-directory-if-not-exists.md diff --git a/snippets/js/s/x-prod.md b/snippets/js/s/cross-product-of-arrays.md similarity index 100% rename from snippets/js/s/x-prod.md rename to snippets/js/s/cross-product-of-arrays.md diff --git a/snippets/js/s/get-protocol.md b/snippets/js/s/current-page-protocol.md similarity index 100% rename from snippets/js/s/get-protocol.md rename to snippets/js/s/current-page-protocol.md diff --git a/snippets/js/s/curry.md b/snippets/js/s/curry-function.md similarity index 100% rename from snippets/js/s/curry.md rename to snippets/js/s/curry-function.md diff --git a/snippets/js/s/get-days-diff-between-dates.md b/snippets/js/s/date-difference-in-days.md similarity index 100% rename from snippets/js/s/get-days-diff-between-dates.md rename to snippets/js/s/date-difference-in-days.md diff --git a/snippets/js/s/get-hours-diff-between-dates.md b/snippets/js/s/date-difference-in-hours.md similarity index 100% rename from snippets/js/s/get-hours-diff-between-dates.md rename to snippets/js/s/date-difference-in-hours.md diff --git a/snippets/js/s/get-minutes-diff-between-dates.md b/snippets/js/s/date-difference-in-minutes.md similarity index 100% rename from snippets/js/s/get-minutes-diff-between-dates.md rename to snippets/js/s/date-difference-in-minutes.md diff --git a/snippets/js/s/get-months-diff-between-dates.md b/snippets/js/s/date-difference-in-months.md similarity index 100% rename from snippets/js/s/get-months-diff-between-dates.md rename to snippets/js/s/date-difference-in-months.md diff --git a/snippets/js/s/get-seconds-diff-between-dates.md b/snippets/js/s/date-difference-in-seconds.md similarity index 100% rename from snippets/js/s/get-seconds-diff-between-dates.md rename to snippets/js/s/date-difference-in-seconds.md diff --git a/snippets/js/s/count-week-days-between.md b/snippets/js/s/date-difference-in-weekdays.md similarity index 100% rename from snippets/js/s/count-week-days-between.md rename to snippets/js/s/date-difference-in-weekdays.md diff --git a/snippets/js/s/from-timestamp.md b/snippets/js/s/date-from-unix-timestamp.md similarity index 100% rename from snippets/js/s/from-timestamp.md rename to snippets/js/s/date-from-unix-timestamp.md diff --git a/snippets/js/s/is-after-date.md b/snippets/js/s/date-is-after-another-date.md similarity index 100% rename from snippets/js/s/is-after-date.md rename to snippets/js/s/date-is-after-another-date.md diff --git a/snippets/js/s/is-before-date.md b/snippets/js/s/date-is-before-another-date.md similarity index 100% rename from snippets/js/s/is-before-date.md rename to snippets/js/s/date-is-before-another-date.md diff --git a/snippets/js/s/is-between-dates.md b/snippets/js/s/date-is-between-two-dates.md similarity index 100% rename from snippets/js/s/is-between-dates.md rename to snippets/js/s/date-is-between-two-dates.md diff --git a/snippets/js/s/is-same-date.md b/snippets/js/s/date-is-same-as-another-date.md similarity index 100% rename from snippets/js/s/is-same-date.md rename to snippets/js/s/date-is-same-as-another-date.md diff --git a/snippets/js/s/is-weekday.md b/snippets/js/s/date-is-weekday.md similarity index 100% rename from snippets/js/s/is-weekday.md rename to snippets/js/s/date-is-weekday.md diff --git a/snippets/js/s/is-weekend.md b/snippets/js/s/date-is-weekend.md similarity index 100% rename from snippets/js/s/is-weekend.md rename to snippets/js/s/date-is-weekend.md diff --git a/snippets/js/s/tomorrow.md b/snippets/js/s/date-tomorrow.md similarity index 100% rename from snippets/js/s/tomorrow.md rename to snippets/js/s/date-tomorrow.md diff --git a/snippets/js/s/yesterday.md b/snippets/js/s/date-yesterday.md similarity index 100% rename from snippets/js/s/yesterday.md rename to snippets/js/s/date-yesterday.md diff --git a/snippets/js/s/debounce.md b/snippets/js/s/debounce-function.md similarity index 100% rename from snippets/js/s/debounce.md rename to snippets/js/s/debounce-function.md diff --git a/snippets/js/s/atob.md b/snippets/js/s/decode-base64-encoded-string.md similarity index 100% rename from snippets/js/s/atob.md rename to snippets/js/s/decode-base64-encoded-string.md diff --git a/snippets/js/s/deep-clone.md b/snippets/js/s/deep-clone-object.md similarity index 100% rename from snippets/js/s/deep-clone.md rename to snippets/js/s/deep-clone-object.md diff --git a/snippets/js/s/equals.md b/snippets/js/s/deep-equality-comparison.md similarity index 100% rename from snippets/js/s/equals.md rename to snippets/js/s/deep-equality-comparison.md diff --git a/snippets/js/s/deep-flatten.md b/snippets/js/s/deep-flatten-array.md similarity index 100% rename from snippets/js/s/deep-flatten.md rename to snippets/js/s/deep-flatten-array.md diff --git a/snippets/js/s/deep-get.md b/snippets/js/s/deep-get-object-value.md similarity index 100% rename from snippets/js/s/deep-get.md rename to snippets/js/s/deep-get-object-value.md diff --git a/snippets/js/s/deep-map-keys.md b/snippets/js/s/deep-map-object-keys.md similarity index 100% rename from snippets/js/s/deep-map-keys.md rename to snippets/js/s/deep-map-object-keys.md diff --git a/snippets/js/s/deep-merge.md b/snippets/js/s/deep-merge-objects.md similarity index 100% rename from snippets/js/s/deep-merge.md rename to snippets/js/s/deep-merge-objects.md diff --git a/snippets/js/s/defaults.md b/snippets/js/s/default-values-for-object-properties.md similarity index 100% rename from snippets/js/s/defaults.md rename to snippets/js/s/default-values-for-object-properties.md diff --git a/snippets/js/s/defer.md b/snippets/js/s/defer-function.md similarity index 100% rename from snippets/js/s/defer.md rename to snippets/js/s/defer-function.md diff --git a/snippets/js/s/delay.md b/snippets/js/s/delay-function.md similarity index 100% rename from snippets/js/s/delay.md rename to snippets/js/s/delay-function.md diff --git a/snippets/js/s/digitize.md b/snippets/js/s/digitize-number.md similarity index 100% rename from snippets/js/s/digitize.md rename to snippets/js/s/digitize-number.md diff --git a/snippets/js/s/is-disjoint.md b/snippets/js/s/disjointed-iterables.md similarity index 100% rename from snippets/js/s/is-disjoint.md rename to snippets/js/s/disjointed-iterables.md diff --git a/snippets/js/s/distance.md b/snippets/js/s/distance-between-two-points.md similarity index 100% rename from snippets/js/s/distance.md rename to snippets/js/s/distance-between-two-points.md diff --git a/snippets/js/s/drop-while.md b/snippets/js/s/drop-array-elements-from-left-while.md similarity index 100% rename from snippets/js/s/drop-while.md rename to snippets/js/s/drop-array-elements-from-left-while.md diff --git a/snippets/js/s/drop.md b/snippets/js/s/drop-array-elements-from-left.md similarity index 100% rename from snippets/js/s/drop.md rename to snippets/js/s/drop-array-elements-from-left.md diff --git a/snippets/js/s/drop-right-while.md b/snippets/js/s/drop-array-elements-from-right-while.md similarity index 100% rename from snippets/js/s/drop-right-while.md rename to snippets/js/s/drop-array-elements-from-right-while.md diff --git a/snippets/js/s/drop-right.md b/snippets/js/s/drop-array-elements-from-right.md similarity index 100% rename from snippets/js/s/drop-right.md rename to snippets/js/s/drop-array-elements-from-right.md diff --git a/snippets/js/s/btoa.md b/snippets/js/s/encode-string-to-base64.md similarity index 100% rename from snippets/js/s/btoa.md rename to snippets/js/s/encode-string-to-base64.md diff --git a/snippets/js/s/every-nth.md b/snippets/js/s/every-nth-element.md similarity index 100% rename from snippets/js/s/every-nth.md rename to snippets/js/s/every-nth-element.md diff --git a/snippets/js/s/reduced-filter.md b/snippets/js/s/filter-matching-and-unspecified-values.md similarity index 100% rename from snippets/js/s/reduced-filter.md rename to snippets/js/s/filter-matching-and-unspecified-values.md diff --git a/snippets/js/s/filter-non-unique.md b/snippets/js/s/filter-non-unique-array-values.md similarity index 100% rename from snippets/js/s/filter-non-unique.md rename to snippets/js/s/filter-non-unique-array-values.md diff --git a/snippets/js/s/without.md b/snippets/js/s/filter-out-matching-array-elements.md similarity index 100% rename from snippets/js/s/without.md rename to snippets/js/s/filter-out-matching-array-elements.md diff --git a/snippets/js/s/filter-unique.md b/snippets/js/s/filter-unique-array-values.md similarity index 100% rename from snippets/js/s/filter-unique.md rename to snippets/js/s/filter-unique-array-values.md diff --git a/snippets/js/s/find-key.md b/snippets/js/s/find-first-matching-key.md similarity index 100% rename from snippets/js/s/find-key.md rename to snippets/js/s/find-first-matching-key.md diff --git a/snippets/js/s/find-first-n.md b/snippets/js/s/find-first-n-matches.md similarity index 100% rename from snippets/js/s/find-first-n.md rename to snippets/js/s/find-first-n-matches.md diff --git a/snippets/js/s/find-last-index.md b/snippets/js/s/find-last-matching-index.md similarity index 100% rename from snippets/js/s/find-last-index.md rename to snippets/js/s/find-last-matching-index.md diff --git a/snippets/js/s/find-last-key.md b/snippets/js/s/find-last-matching-key.md similarity index 100% rename from snippets/js/s/find-last-key.md rename to snippets/js/s/find-last-matching-key.md diff --git a/snippets/js/s/find-last.md b/snippets/js/s/find-last-matching-value.md similarity index 100% rename from snippets/js/s/find-last.md rename to snippets/js/s/find-last-matching-value.md diff --git a/snippets/js/s/find-last-n.md b/snippets/js/s/find-last-n-matches.md similarity index 100% rename from snippets/js/s/find-last-n.md rename to snippets/js/s/find-last-n-matches.md diff --git a/snippets/js/s/find-keys.md b/snippets/js/s/find-matching-keys.md similarity index 100% rename from snippets/js/s/find-keys.md rename to snippets/js/s/find-matching-keys.md diff --git a/snippets/js/s/first-n.md b/snippets/js/s/first-n-elements.md similarity index 100% rename from snippets/js/s/first-n.md rename to snippets/js/s/first-n-elements.md diff --git a/snippets/js/s/flatten.md b/snippets/js/s/flatten-array.md similarity index 100% rename from snippets/js/s/flatten.md rename to snippets/js/s/flatten-array.md diff --git a/snippets/js/s/flip.md b/snippets/js/s/flip-function-arguments.md similarity index 100% rename from snippets/js/s/flip.md rename to snippets/js/s/flip-function-arguments.md diff --git a/snippets/js/s/frozen-set.md b/snippets/js/s/freeze-set-object.md similarity index 100% rename from snippets/js/s/frozen-set.md rename to snippets/js/s/freeze-set-object.md diff --git a/snippets/js/s/ary.md b/snippets/js/s/function-arity.md similarity index 100% rename from snippets/js/s/ary.md rename to snippets/js/s/function-arity.md diff --git a/snippets/js/s/difference-with.md b/snippets/js/s/function-based-array-difference.md similarity index 100% rename from snippets/js/s/difference-with.md rename to snippets/js/s/function-based-array-difference.md diff --git a/snippets/js/s/all-equal-by.md b/snippets/js/s/function-based-array-element-equality.md similarity index 100% rename from snippets/js/s/all-equal-by.md rename to snippets/js/s/function-based-array-element-equality.md diff --git a/snippets/js/s/group-by.md b/snippets/js/s/function-based-array-element-grouping.md similarity index 100% rename from snippets/js/s/group-by.md rename to snippets/js/s/function-based-array-element-grouping.md diff --git a/snippets/js/s/all-unique-by.md b/snippets/js/s/function-based-array-element-uniqueness.md similarity index 100% rename from snippets/js/s/all-unique-by.md rename to snippets/js/s/function-based-array-element-uniqueness.md diff --git a/snippets/js/s/index-by.md b/snippets/js/s/function-based-array-indexing.md similarity index 100% rename from snippets/js/s/index-by.md rename to snippets/js/s/function-based-array-indexing.md diff --git a/snippets/js/s/intersection-with.md b/snippets/js/s/function-based-array-intersection.md similarity index 100% rename from snippets/js/s/intersection-with.md rename to snippets/js/s/function-based-array-intersection.md diff --git a/snippets/js/s/max-by.md b/snippets/js/s/function-based-array-max.md similarity index 100% rename from snippets/js/s/max-by.md rename to snippets/js/s/function-based-array-max.md diff --git a/snippets/js/s/reduce-which.md b/snippets/js/s/function-based-array-min-max.md similarity index 100% rename from snippets/js/s/reduce-which.md rename to snippets/js/s/function-based-array-min-max.md diff --git a/snippets/js/s/min-by.md b/snippets/js/s/function-based-array-min.md similarity index 100% rename from snippets/js/s/min-by.md rename to snippets/js/s/function-based-array-min.md diff --git a/snippets/js/s/filter-non-unique-by.md b/snippets/js/s/function-based-array-non-uniqueness-filter.md similarity index 100% rename from snippets/js/s/filter-non-unique-by.md rename to snippets/js/s/function-based-array-non-uniqueness-filter.md diff --git a/snippets/js/s/symmetric-difference-with.md b/snippets/js/s/function-based-array-symmetric-difference.md similarity index 100% rename from snippets/js/s/symmetric-difference-with.md rename to snippets/js/s/function-based-array-symmetric-difference.md diff --git a/snippets/js/s/union-with.md b/snippets/js/s/function-based-array-union.md similarity index 100% rename from snippets/js/s/union-with.md rename to snippets/js/s/function-based-array-union.md diff --git a/snippets/js/s/unique-elements-by.md b/snippets/js/s/function-based-array-unique-values.md similarity index 100% rename from snippets/js/s/unique-elements-by.md rename to snippets/js/s/function-based-array-unique-values.md diff --git a/snippets/js/s/filter-unique-by.md b/snippets/js/s/function-based-array-uniqueness-filter.md similarity index 100% rename from snippets/js/s/filter-unique-by.md rename to snippets/js/s/function-based-array-uniqueness-filter.md diff --git a/snippets/js/s/matches-with.md b/snippets/js/s/function-based-object-property-matches.md similarity index 100% rename from snippets/js/s/matches-with.md rename to snippets/js/s/function-based-object-property-matches.md diff --git a/snippets/js/s/unique-elements-by-right.md b/snippets/js/s/function-based-reversed-array-unique-values.md similarity index 100% rename from snippets/js/s/unique-elements-by-right.md rename to snippets/js/s/function-based-reversed-array-unique-values.md diff --git a/snippets/js/s/sorted-index-by.md b/snippets/js/s/function-based-sorted-array-insertion-index.md similarity index 100% rename from snippets/js/s/sorted-index-by.md rename to snippets/js/s/function-based-sorted-array-insertion-index.md diff --git a/snippets/js/s/sorted-last-index-by.md b/snippets/js/s/function-based-sorted-array-last-insertion-index.md similarity index 100% rename from snippets/js/s/sorted-last-index-by.md rename to snippets/js/s/function-based-sorted-array-last-insertion-index.md diff --git a/snippets/js/s/either.md b/snippets/js/s/function-logical-or.md similarity index 100% rename from snippets/js/s/either.md rename to snippets/js/s/function-logical-or.md diff --git a/snippets/js/s/functions.md b/snippets/js/s/function-names.md similarity index 100% rename from snippets/js/s/functions.md rename to snippets/js/s/function-names.md diff --git a/snippets/js/s/get.md b/snippets/js/s/get-nested-object-value.md similarity index 100% rename from snippets/js/s/get.md rename to snippets/js/s/get-nested-object-value.md diff --git a/snippets/js/s/dig.md b/snippets/js/s/get-nested-value-in-object.md similarity index 100% rename from snippets/js/s/dig.md rename to snippets/js/s/get-nested-value-in-object.md diff --git a/snippets/js/s/zip-with.md b/snippets/js/s/group-array-elements-based-on-function.md similarity index 100% rename from snippets/js/s/zip-with.md rename to snippets/js/s/group-array-elements-based-on-function.md diff --git a/snippets/js/s/zip.md b/snippets/js/s/group-array-elements.md similarity index 100% rename from snippets/js/s/zip.md rename to snippets/js/s/group-array-elements.md diff --git a/snippets/js/s/zip-object.md b/snippets/js/s/group-array-into-object.md similarity index 100% rename from snippets/js/s/zip-object.md rename to snippets/js/s/group-array-into-object.md diff --git a/snippets/js/s/sdbm.md b/snippets/js/s/hash-string-into-number.md similarity index 100% rename from snippets/js/s/sdbm.md rename to snippets/js/s/hash-string-into-number.md diff --git a/snippets/js/s/hide.md b/snippets/js/s/hide-html-elements.md similarity index 100% rename from snippets/js/s/hide.md rename to snippets/js/s/hide-html-elements.md diff --git a/snippets/js/s/has-class.md b/snippets/js/s/html-element-has-class.md similarity index 100% rename from snippets/js/s/has-class.md rename to snippets/js/s/html-element-has-class.md diff --git a/snippets/js/s/index-of-all.md b/snippets/js/s/index-of-all-matches.md similarity index 100% rename from snippets/js/s/index-of-all.md rename to snippets/js/s/index-of-all-matches.md diff --git a/snippets/js/s/initialize2-d-array.md b/snippets/js/s/initialize-2d-array.md similarity index 100% rename from snippets/js/s/initialize2-d-array.md rename to snippets/js/s/initialize-2d-array.md diff --git a/snippets/js/s/initialize-array-with-range-right.md b/snippets/js/s/initialize-array-with-reversed-range.md similarity index 100% rename from snippets/js/s/initialize-array-with-range-right.md rename to snippets/js/s/initialize-array-with-reversed-range.md diff --git a/snippets/js/s/initialize-nd-array.md b/snippets/js/s/initialize-n-dimensional-array.md similarity index 100% rename from snippets/js/s/initialize-nd-array.md rename to snippets/js/s/initialize-n-dimensional-array.md diff --git a/snippets/js/s/insert-after.md b/snippets/js/s/insert-html-string-after-element.md similarity index 100% rename from snippets/js/s/insert-after.md rename to snippets/js/s/insert-html-string-after-element.md diff --git a/snippets/js/s/insert-before.md b/snippets/js/s/insert-html-string-before-element.md similarity index 100% rename from snippets/js/s/insert-before.md rename to snippets/js/s/insert-html-string-before-element.md diff --git a/snippets/js/s/insert-at.md b/snippets/js/s/insert-value-at-array-index.md similarity index 100% rename from snippets/js/s/insert-at.md rename to snippets/js/s/insert-value-at-array-index.md diff --git a/snippets/js/s/sorted-index.md b/snippets/js/s/insertion-index-in-sorted-array.md similarity index 100% rename from snippets/js/s/sorted-index.md rename to snippets/js/s/insertion-index-in-sorted-array.md diff --git a/snippets/js/s/over.md b/snippets/js/s/invoke-functions-on-arguments.md similarity index 100% rename from snippets/js/s/over.md rename to snippets/js/s/invoke-functions-on-arguments.md diff --git a/snippets/js/s/is-iso-string.md b/snippets/js/s/is-iso-formatted-date.md similarity index 100% rename from snippets/js/s/is-iso-string.md rename to snippets/js/s/is-iso-formatted-date.md diff --git a/snippets/js/s/to-iso-string-with-timezone.md b/snippets/js/s/iso-format-date-with-timezone.md similarity index 100% rename from snippets/js/s/to-iso-string-with-timezone.md rename to snippets/js/s/iso-format-date-with-timezone.md diff --git a/snippets/js/s/to-hash.md b/snippets/js/s/iterable-to-hash.md similarity index 100% rename from snippets/js/s/to-hash.md rename to snippets/js/s/iterable-to-hash.md diff --git a/snippets/js/s/times.md b/snippets/js/s/iterate-n-times.md similarity index 100% rename from snippets/js/s/times.md rename to snippets/js/s/iterate-n-times.md diff --git a/snippets/js/s/for-own.md b/snippets/js/s/iterate-object-properties.md similarity index 100% rename from snippets/js/s/for-own.md rename to snippets/js/s/iterate-object-properties.md diff --git a/snippets/js/s/join.md b/snippets/js/s/join-array-into-string.md similarity index 100% rename from snippets/js/s/join.md rename to snippets/js/s/join-array-into-string.md diff --git a/snippets/js/s/url-join.md b/snippets/js/s/join-url-segments.md similarity index 100% rename from snippets/js/s/url-join.md rename to snippets/js/s/join-url-segments.md diff --git a/snippets/js/s/jso-nto-csv.md b/snippets/js/s/json-to-csv.md similarity index 100% rename from snippets/js/s/jso-nto-csv.md rename to snippets/js/s/json-to-csv.md diff --git a/snippets/js/s/juxt.md b/snippets/js/s/juxtapose-functions.md similarity index 100% rename from snippets/js/s/juxt.md rename to snippets/js/s/juxtapose-functions.md diff --git a/snippets/js/s/last.md b/snippets/js/s/last-array-element.md similarity index 100% rename from snippets/js/s/last.md rename to snippets/js/s/last-array-element.md diff --git a/snippets/js/s/sorted-last-index.md b/snippets/js/s/last-insertion-index-in-sorted-array.md similarity index 100% rename from snippets/js/s/sorted-last-index.md rename to snippets/js/s/last-insertion-index-in-sorted-array.md diff --git a/snippets/js/s/last-n.md b/snippets/js/s/last-n-elements.md similarity index 100% rename from snippets/js/s/last-n.md rename to snippets/js/s/last-n-elements.md diff --git a/snippets/js/s/left-substr-generator.md b/snippets/js/s/left-substring-generator.md similarity index 100% rename from snippets/js/s/left-substr-generator.md rename to snippets/js/s/left-substring-generator.md diff --git a/snippets/js/s/log-base.md b/snippets/js/s/logarithm-in-base.md similarity index 100% rename from snippets/js/s/log-base.md rename to snippets/js/s/logarithm-in-base.md diff --git a/snippets/js/s/complement.md b/snippets/js/s/logical-complement.md similarity index 100% rename from snippets/js/s/complement.md rename to snippets/js/s/logical-complement.md diff --git a/snippets/js/s/longest-item.md b/snippets/js/s/longest-array-element.md similarity index 100% rename from snippets/js/s/longest-item.md rename to snippets/js/s/longest-array-element.md diff --git a/snippets/js/s/map-object.md b/snippets/js/s/map-array-to-object.md similarity index 100% rename from snippets/js/s/map-object.md rename to snippets/js/s/map-array-to-object.md diff --git a/snippets/js/s/map-consecutive.md b/snippets/js/s/map-consecutive-elements.md similarity index 100% rename from snippets/js/s/map-consecutive.md rename to snippets/js/s/map-consecutive-elements.md diff --git a/snippets/js/s/map-num-range.md b/snippets/js/s/map-number-to-range.md similarity index 100% rename from snippets/js/s/map-num-range.md rename to snippets/js/s/map-number-to-range.md diff --git a/snippets/js/s/map-keys.md b/snippets/js/s/map-object-keys.md similarity index 100% rename from snippets/js/s/map-keys.md rename to snippets/js/s/map-object-keys.md diff --git a/snippets/js/s/average-by.md b/snippets/js/s/mapped-array-average.md similarity index 100% rename from snippets/js/s/average-by.md rename to snippets/js/s/mapped-array-average.md diff --git a/snippets/js/s/difference-by.md b/snippets/js/s/mapped-array-difference.md similarity index 100% rename from snippets/js/s/difference-by.md rename to snippets/js/s/mapped-array-difference.md diff --git a/snippets/js/s/intersection-by.md b/snippets/js/s/mapped-array-intersection.md similarity index 100% rename from snippets/js/s/intersection-by.md rename to snippets/js/s/mapped-array-intersection.md diff --git a/snippets/js/s/sum-by.md b/snippets/js/s/mapped-array-sum.md similarity index 100% rename from snippets/js/s/sum-by.md rename to snippets/js/s/mapped-array-sum.md diff --git a/snippets/js/s/symmetric-difference-by.md b/snippets/js/s/mapped-array-symmetric-difference.md similarity index 100% rename from snippets/js/s/symmetric-difference-by.md rename to snippets/js/s/mapped-array-symmetric-difference.md diff --git a/snippets/js/s/union-by.md b/snippets/js/s/mapped-array-union.md similarity index 100% rename from snippets/js/s/union-by.md rename to snippets/js/s/mapped-array-union.md diff --git a/snippets/js/s/matches.md b/snippets/js/s/match-object-properties.md similarity index 100% rename from snippets/js/s/matches.md rename to snippets/js/s/match-object-properties.md diff --git a/snippets/js/s/memoize.md b/snippets/js/s/memoize-function.md similarity index 100% rename from snippets/js/s/memoize.md rename to snippets/js/s/memoize-function.md diff --git a/snippets/js/s/merge.md b/snippets/js/s/merge-objects.md similarity index 100% rename from snippets/js/s/merge.md rename to snippets/js/s/merge-objects.md diff --git a/snippets/js/s/most-frequent.md b/snippets/js/s/most-frequent-array-element.md similarity index 100% rename from snippets/js/s/most-frequent.md rename to snippets/js/s/most-frequent-array-element.md diff --git a/snippets/js/s/most-performant.md b/snippets/js/s/most-performant-function.md similarity index 100% rename from snippets/js/s/most-performant.md rename to snippets/js/s/most-performant-function.md diff --git a/snippets/js/s/sample-size.md b/snippets/js/s/multiple-array-samples.md similarity index 100% rename from snippets/js/s/sample-size.md rename to snippets/js/s/multiple-array-samples.md diff --git a/snippets/js/s/max-n.md b/snippets/js/s/n-max-elements.md similarity index 100% rename from snippets/js/s/max-n.md rename to snippets/js/s/n-max-elements.md diff --git a/snippets/js/s/min-n.md b/snippets/js/s/n-min-elements.md similarity index 100% rename from snippets/js/s/min-n.md rename to snippets/js/s/n-min-elements.md diff --git a/snippets/js/s/negate.md b/snippets/js/s/negate-predicate.md similarity index 100% rename from snippets/js/s/negate.md rename to snippets/js/s/negate-predicate.md diff --git a/snippets/js/s/nest.md b/snippets/js/s/nest-objects.md similarity index 100% rename from snippets/js/s/nest.md rename to snippets/js/s/nest-objects.md diff --git a/snippets/js/s/nth-arg.md b/snippets/js/s/nth-argument.md similarity index 100% rename from snippets/js/s/nth-arg.md rename to snippets/js/s/nth-argument.md diff --git a/snippets/js/s/nth-root.md b/snippets/js/s/nth-number-root.md similarity index 100% rename from snippets/js/s/nth-root.md rename to snippets/js/s/nth-number-root.md diff --git a/snippets/js/s/in-range.md b/snippets/js/s/number-in-range.md similarity index 100% rename from snippets/js/s/in-range.md rename to snippets/js/s/number-in-range.md diff --git a/snippets/js/s/to-currency.md b/snippets/js/s/number-to-currency.md similarity index 100% rename from snippets/js/s/to-currency.md rename to snippets/js/s/number-to-currency.md diff --git a/snippets/js/s/to-decimal-mark.md b/snippets/js/s/number-to-decimal-mark.md similarity index 100% rename from snippets/js/s/to-decimal-mark.md rename to snippets/js/s/number-to-decimal-mark.md diff --git a/snippets/js/s/to-optional-fixed.md b/snippets/js/s/number-to-optional-fixed.md similarity index 100% rename from snippets/js/s/to-optional-fixed.md rename to snippets/js/s/number-to-optional-fixed.md diff --git a/snippets/js/s/has-key.md b/snippets/js/s/object-has-key.md similarity index 100% rename from snippets/js/s/has-key.md rename to snippets/js/s/object-has-key.md diff --git a/snippets/js/s/has-value.md b/snippets/js/s/object-has-value.md similarity index 100% rename from snippets/js/s/has-value.md rename to snippets/js/s/object-has-value.md diff --git a/snippets/js/s/offset.md b/snippets/js/s/offset-array-elements.md similarity index 100% rename from snippets/js/s/offset.md rename to snippets/js/s/offset-array-elements.md diff --git a/snippets/js/s/omit-by.md b/snippets/js/s/omit-matching-object-keys.md similarity index 100% rename from snippets/js/s/omit-by.md rename to snippets/js/s/omit-matching-object-keys.md diff --git a/snippets/js/s/omit.md b/snippets/js/s/omit-object-keys.md similarity index 100% rename from snippets/js/s/omit.md rename to snippets/js/s/omit-object-keys.md diff --git a/snippets/js/s/order-with.md b/snippets/js/s/order-object-array-based-on-property.md similarity index 100% rename from snippets/js/s/order-with.md rename to snippets/js/s/order-object-array-based-on-property.md diff --git a/snippets/js/s/order-by.md b/snippets/js/s/order-object-array.md similarity index 100% rename from snippets/js/s/order-by.md rename to snippets/js/s/order-object-array.md diff --git a/snippets/js/s/pad.md b/snippets/js/s/pad-string.md similarity index 100% rename from snippets/js/s/pad.md rename to snippets/js/s/pad-string.md diff --git a/snippets/js/s/accumulate.md b/snippets/js/s/partial-sum-array.md similarity index 100% rename from snippets/js/s/accumulate.md rename to snippets/js/s/partial-sum-array.md diff --git a/snippets/js/s/partition.md b/snippets/js/s/partition-array-in-two.md similarity index 100% rename from snippets/js/s/partition.md rename to snippets/js/s/partition-array-in-two.md diff --git a/snippets/js/s/partition-by.md b/snippets/js/s/partition-array.md similarity index 100% rename from snippets/js/s/partition-by.md rename to snippets/js/s/partition-array.md diff --git a/snippets/js/s/percentile.md b/snippets/js/s/percentile-of-matches.md similarity index 100% rename from snippets/js/s/percentile.md rename to snippets/js/s/percentile-of-matches.md diff --git a/snippets/js/s/pick-by.md b/snippets/js/s/pick-matching-object-keys.md similarity index 100% rename from snippets/js/s/pick-by.md rename to snippets/js/s/pick-matching-object-keys.md diff --git a/snippets/js/s/pick.md b/snippets/js/s/pick-object-keys.md similarity index 100% rename from snippets/js/s/pick.md rename to snippets/js/s/pick-object-keys.md diff --git a/snippets/js/s/pluck.md b/snippets/js/s/pluck-values-from-object-array.md similarity index 100% rename from snippets/js/s/pluck.md rename to snippets/js/s/pluck-values-from-object-array.md diff --git a/snippets/js/s/prefix.md b/snippets/js/s/prefix-css-property.md similarity index 100% rename from snippets/js/s/prefix.md rename to snippets/js/s/prefix-css-property.md diff --git a/snippets/js/s/partial.md b/snippets/js/s/prepend-function-arguments.md similarity index 100% rename from snippets/js/s/partial.md rename to snippets/js/s/prepend-function-arguments.md diff --git a/snippets/js/s/pretty-bytes.md b/snippets/js/s/pretty-print-number-of-bytes.md similarity index 100% rename from snippets/js/s/pretty-bytes.md rename to snippets/js/s/pretty-print-number-of-bytes.md diff --git a/snippets/js/s/has-flags.md b/snippets/js/s/process-arguments-have-flags.md similarity index 100% rename from snippets/js/s/has-flags.md rename to snippets/js/s/process-arguments-have-flags.md diff --git a/snippets/js/s/prod.md b/snippets/js/s/product-of-numeric-values.md similarity index 100% rename from snippets/js/s/prod.md rename to snippets/js/s/product-of-numeric-values.md diff --git a/snippets/js/s/pull-at-value.md b/snippets/js/s/pull-matching-values-from-array.md similarity index 100% rename from snippets/js/s/pull-at-value.md rename to snippets/js/s/pull-matching-values-from-array.md diff --git a/snippets/js/s/pull-at-index.md b/snippets/js/s/pull-values-from-array-at-index.md similarity index 100% rename from snippets/js/s/pull-at-index.md rename to snippets/js/s/pull-values-from-array-at-index.md diff --git a/snippets/js/s/pull-by.md b/snippets/js/s/pull-values-from-array-based-on-function.md similarity index 100% rename from snippets/js/s/pull-by.md rename to snippets/js/s/pull-values-from-array-based-on-function.md diff --git a/snippets/js/s/pull.md b/snippets/js/s/pull-values-from-array.md similarity index 100% rename from snippets/js/s/pull.md rename to snippets/js/s/pull-values-from-array.md diff --git a/snippets/js/s/random-alpha-numeric.md b/snippets/js/s/random-alphanumeric.md similarity index 100% rename from snippets/js/s/random-alpha-numeric.md rename to snippets/js/s/random-alphanumeric.md diff --git a/snippets/js/s/random-int-array-in-range.md b/snippets/js/s/random-integer-array-in-range.md similarity index 100% rename from snippets/js/s/random-int-array-in-range.md rename to snippets/js/s/random-integer-array-in-range.md diff --git a/snippets/js/s/rearg.md b/snippets/js/s/rearrange-function-arguments.md similarity index 100% rename from snippets/js/s/rearg.md rename to snippets/js/s/rearrange-function-arguments.md diff --git a/snippets/js/s/redirect.md b/snippets/js/s/redirect-to-url.md similarity index 100% rename from snippets/js/s/redirect.md rename to snippets/js/s/redirect-to-url.md diff --git a/snippets/js/s/reject.md b/snippets/js/s/reject-non-matching-values.md similarity index 100% rename from snippets/js/s/reject.md rename to snippets/js/s/reject-non-matching-values.md diff --git a/snippets/js/s/remove-class.md b/snippets/js/s/remove-class-from-html-element.md similarity index 100% rename from snippets/js/s/remove-class.md rename to snippets/js/s/remove-class-from-html-element.md diff --git a/snippets/js/s/remove-element.md b/snippets/js/s/remove-dom-element.md similarity index 100% rename from snippets/js/s/remove-element.md rename to snippets/js/s/remove-dom-element.md diff --git a/snippets/js/s/shank.md b/snippets/js/s/remove-elements-from-array.md similarity index 100% rename from snippets/js/s/shank.md rename to snippets/js/s/remove-elements-from-array.md diff --git a/snippets/js/s/off.md b/snippets/js/s/remove-event-listener.md similarity index 100% rename from snippets/js/s/off.md rename to snippets/js/s/remove-event-listener.md diff --git a/snippets/js/s/remove.md b/snippets/js/s/remove-matching-array-elements.md similarity index 100% rename from snippets/js/s/remove.md rename to snippets/js/s/remove-matching-array-elements.md diff --git a/snippets/js/s/remove-event-listener-all.md b/snippets/js/s/remove-multiple-event-listeners.md similarity index 100% rename from snippets/js/s/remove-event-listener-all.md rename to snippets/js/s/remove-multiple-event-listeners.md diff --git a/snippets/js/s/rename-keys.md b/snippets/js/s/rename-object-keys.md similarity index 100% rename from snippets/js/s/rename-keys.md rename to snippets/js/s/rename-object-keys.md diff --git a/snippets/js/s/render-element.md b/snippets/js/s/render-dom-element.md similarity index 100% rename from snippets/js/s/render-element.md rename to snippets/js/s/render-dom-element.md diff --git a/snippets/js/s/replace-last.md b/snippets/js/s/replace-last-occurrence.md similarity index 100% rename from snippets/js/s/replace-last.md rename to snippets/js/s/replace-last-occurrence.md diff --git a/snippets/js/s/replace-or-append.md b/snippets/js/s/replace-or-append-array-value.md similarity index 100% rename from snippets/js/s/replace-or-append.md rename to snippets/js/s/replace-or-append-array-value.md diff --git a/snippets/js/s/resolve-after.md b/snippets/js/s/resolve-promise-after-amount-of-time.md similarity index 100% rename from snippets/js/s/resolve-after.md rename to snippets/js/s/resolve-promise-after-amount-of-time.md diff --git a/snippets/js/s/compose-right.md b/snippets/js/s/reverse-compose-functions.md similarity index 100% rename from snippets/js/s/compose-right.md rename to snippets/js/s/reverse-compose-functions.md diff --git a/snippets/js/s/for-own-right.md b/snippets/js/s/reverse-iterate-object-properties.md similarity index 100% rename from snippets/js/s/for-own-right.md rename to snippets/js/s/reverse-iterate-object-properties.md diff --git a/snippets/js/s/right-substr-generator.md b/snippets/js/s/right-substring-generator.md similarity index 100% rename from snippets/js/s/right-substr-generator.md rename to snippets/js/s/right-substring-generator.md diff --git a/snippets/js/s/round.md b/snippets/js/s/round-number-to-precision.md similarity index 100% rename from snippets/js/s/round.md rename to snippets/js/s/round-number-to-precision.md diff --git a/snippets/js/s/run-async.md b/snippets/js/s/run-function-asyc.md similarity index 100% rename from snippets/js/s/run-async.md rename to snippets/js/s/run-function-asyc.md diff --git a/snippets/js/s/set-style.md b/snippets/js/s/set-style-for-html-element.md similarity index 100% rename from snippets/js/s/set-style.md rename to snippets/js/s/set-style-for-html-element.md diff --git a/snippets/js/s/shallow-clone.md b/snippets/js/s/shallow-clone-object.md similarity index 100% rename from snippets/js/s/shallow-clone.md rename to snippets/js/s/shallow-clone-object.md diff --git a/snippets/js/s/show.md b/snippets/js/s/show-html-elements.md similarity index 100% rename from snippets/js/s/show.md rename to snippets/js/s/show-html-elements.md diff --git a/snippets/js/s/size.md b/snippets/js/s/size-of-array-object-or-string.md similarity index 100% rename from snippets/js/s/size.md rename to snippets/js/s/size-of-array-object-or-string.md diff --git a/snippets/js/s/alphabetical.md b/snippets/js/s/sort-array-alphabetically.md similarity index 100% rename from snippets/js/s/alphabetical.md rename to snippets/js/s/sort-array-alphabetically.md diff --git a/snippets/js/s/chunk-into-n.md b/snippets/js/s/split-array-into-n-chunks.md similarity index 100% rename from snippets/js/s/chunk-into-n.md rename to snippets/js/s/split-array-into-n-chunks.md diff --git a/snippets/js/s/chunk.md b/snippets/js/s/split-into-chunks.md similarity index 100% rename from snippets/js/s/chunk.md rename to snippets/js/s/split-into-chunks.md diff --git a/snippets/js/s/split-lines.md b/snippets/js/s/split-into-lines.md similarity index 100% rename from snippets/js/s/split-lines.md rename to snippets/js/s/split-into-lines.md diff --git a/snippets/js/s/slugify.md b/snippets/js/s/string-to-slug.md similarity index 100% rename from snippets/js/s/slugify.md rename to snippets/js/s/string-to-slug.md diff --git a/snippets/js/s/words.md b/snippets/js/s/string-to-words.md similarity index 100% rename from snippets/js/s/words.md rename to snippets/js/s/string-to-words.md diff --git a/snippets/js/s/sub-set.md b/snippets/js/s/subset.md similarity index 100% rename from snippets/js/s/sub-set.md rename to snippets/js/s/subset.md diff --git a/snippets/js/s/reduce-successive.md b/snippets/js/s/successive-values-array.md similarity index 100% rename from snippets/js/s/reduce-successive.md rename to snippets/js/s/successive-values-array.md diff --git a/snippets/js/s/sum.md b/snippets/js/s/sum-array.md similarity index 100% rename from snippets/js/s/sum.md rename to snippets/js/s/sum-array.md diff --git a/snippets/js/s/sum-n.md b/snippets/js/s/sum-of-numbers-until-n.md similarity index 100% rename from snippets/js/s/sum-n.md rename to snippets/js/s/sum-of-numbers-until-n.md diff --git a/snippets/js/s/sum-power.md b/snippets/js/s/sum-powers-in-range.md similarity index 100% rename from snippets/js/s/sum-power.md rename to snippets/js/s/sum-powers-in-range.md diff --git a/snippets/js/s/super-set.md b/snippets/js/s/superset.md similarity index 100% rename from snippets/js/s/super-set.md rename to snippets/js/s/superset.md diff --git a/snippets/js/s/symbolize-keys.md b/snippets/js/s/symbolize-object-keys.md similarity index 100% rename from snippets/js/s/symbolize-keys.md rename to snippets/js/s/symbolize-object-keys.md diff --git a/snippets/js/s/take-right-until.md b/snippets/js/s/take-array-elements-from-end-until.md similarity index 100% rename from snippets/js/s/take-right-until.md rename to snippets/js/s/take-array-elements-from-end-until.md diff --git a/snippets/js/s/take-right-while.md b/snippets/js/s/take-array-elements-from-end-while.md similarity index 100% rename from snippets/js/s/take-right-while.md rename to snippets/js/s/take-array-elements-from-end-while.md diff --git a/snippets/js/s/take-right.md b/snippets/js/s/take-array-elements-from-end.md similarity index 100% rename from snippets/js/s/take-right.md rename to snippets/js/s/take-array-elements-from-end.md diff --git a/snippets/js/s/take-until.md b/snippets/js/s/take-array-elements-until.md similarity index 100% rename from snippets/js/s/take-until.md rename to snippets/js/s/take-array-elements-until.md diff --git a/snippets/js/s/take-while.md b/snippets/js/s/take-array-elements-while.md similarity index 100% rename from snippets/js/s/take-while.md rename to snippets/js/s/take-array-elements-while.md diff --git a/snippets/js/s/take.md b/snippets/js/s/take-array-elements.md similarity index 100% rename from snippets/js/s/take.md rename to snippets/js/s/take-array-elements.md diff --git a/snippets/js/s/throttle.md b/snippets/js/s/throttle-function.md similarity index 100% rename from snippets/js/s/throttle.md rename to snippets/js/s/throttle-function.md diff --git a/snippets/js/s/to-char-array.md b/snippets/js/s/to-character-array.md similarity index 100% rename from snippets/js/s/to-char-array.md rename to snippets/js/s/to-character-array.md diff --git a/snippets/js/s/flags.md b/snippets/js/s/to-flags-object.md similarity index 100% rename from snippets/js/s/flags.md rename to snippets/js/s/to-flags-object.md diff --git a/snippets/js/s/toggle-element.md b/snippets/js/s/toggle-array-element.md similarity index 100% rename from snippets/js/s/toggle-element.md rename to snippets/js/s/toggle-array-element.md diff --git a/snippets/js/s/toggle-class.md b/snippets/js/s/toggle-html-element-class.md similarity index 100% rename from snippets/js/s/toggle-class.md rename to snippets/js/s/toggle-html-element-class.md diff --git a/snippets/js/s/over-args.md b/snippets/js/s/transform-function-arguments.md similarity index 100% rename from snippets/js/s/over-args.md rename to snippets/js/s/transform-function-arguments.md diff --git a/snippets/js/s/transform.md b/snippets/js/s/transform-object.md similarity index 100% rename from snippets/js/s/transform.md rename to snippets/js/s/transform-object.md diff --git a/snippets/js/s/transpose.md b/snippets/js/s/transpose-matrix.md similarity index 100% rename from snippets/js/s/transpose.md rename to snippets/js/s/transpose-matrix.md diff --git a/snippets/js/s/get-type.md b/snippets/js/s/type-of-value.md similarity index 100% rename from snippets/js/s/get-type.md rename to snippets/js/s/type-of-value.md diff --git a/snippets/js/s/unary.md b/snippets/js/s/unary-function-arity.md similarity index 100% rename from snippets/js/s/unary.md rename to snippets/js/s/unary-function-arity.md diff --git a/snippets/js/s/require-uncached.md b/snippets/js/s/uncached-module-require.md similarity index 100% rename from snippets/js/s/require-uncached.md rename to snippets/js/s/uncached-module-require.md diff --git a/snippets/js/s/uncurry.md b/snippets/js/s/uncurry-function.md similarity index 100% rename from snippets/js/s/uncurry.md rename to snippets/js/s/uncurry-function.md diff --git a/snippets/js/s/unfold.md b/snippets/js/s/unfold-array.md similarity index 100% rename from snippets/js/s/unfold.md rename to snippets/js/s/unfold-array.md diff --git a/snippets/js/s/unzip-with.md b/snippets/js/s/ungroup-array-elements-based-on-function.md similarity index 100% rename from snippets/js/s/unzip-with.md rename to snippets/js/s/ungroup-array-elements-based-on-function.md diff --git a/snippets/js/s/unzip.md b/snippets/js/s/ungroup-array-elements.md similarity index 100% rename from snippets/js/s/unzip.md rename to snippets/js/s/ungroup-array-elements.md diff --git a/snippets/js/s/unique-elements.md b/snippets/js/s/unique-elements-in-array.md similarity index 100% rename from snippets/js/s/unique-elements.md rename to snippets/js/s/unique-elements-in-array.md diff --git a/snippets/js/s/get-timestamp.md b/snippets/js/s/unix-timestamp-from-date.md similarity index 100% rename from snippets/js/s/get-timestamp.md rename to snippets/js/s/unix-timestamp-from-date.md diff --git a/snippets/js/s/unwind.md b/snippets/js/s/unwind-object.md similarity index 100% rename from snippets/js/s/unwind.md rename to snippets/js/s/unwind-object.md diff --git a/snippets/js/s/frequencies.md b/snippets/js/s/value-frequencies.md similarity index 100% rename from snippets/js/s/frequencies.md rename to snippets/js/s/value-frequencies.md diff --git a/snippets/js/s/is.md b/snippets/js/s/value-is-of-type.md similarity index 100% rename from snippets/js/s/is.md rename to snippets/js/s/value-is-of-type.md diff --git a/snippets/js/s/walk-through.md b/snippets/js/s/walk-through-object.md similarity index 100% rename from snippets/js/s/walk-through.md rename to snippets/js/s/walk-through-object.md From 080c15f3b4e0390f2c9ad7fe686f072721dd87d8 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 19 May 2023 20:29:39 +0300 Subject: [PATCH 12/13] Change main listing slug --- collections/main-listing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/main-listing.yaml b/collections/main-listing.yaml index a91630471..8c41da0a3 100644 --- a/collections/main-listing.yaml +++ b/collections/main-listing.yaml @@ -1,4 +1,4 @@ -slug: list +slug: snippets name: Code Snippets featured: false splash: laptop-plant.png From 532909cca21631eb2f447070b6303c821da13b09 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 19 May 2023 20:32:54 +0300 Subject: [PATCH 13/13] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39b722e10..a8e3378f0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ * Visit [our website](https://30secondsofcode.org) to view our snippet collection. * Search for snippets that suit your needs. You can search by name, tag, language or using a snippet's description. Just start typing a term and see what comes up. -* Browse the [Snippet collection](https://30secondsofcode.org/list/p/1) to see all the snippets or click individual tags at the top of the same page to narrow down your search to a specific tag. +* Browse all [snippets](https://30secondsofcode.org/snippes/p/1) or individual [snippet collections](https://30secondsofcode.org/collections/p/1) for each topic. * Click on each snippet card to view the whole snippet, including code, explanation and examples. * You can copy code blocks on any snippet card, using the copy button at the top right. * If you like the project, give it a star. It means a lot to the people maintaining it.