Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional style #2908

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open

Functional style #2908

wants to merge 79 commits into from

Commits on Dec 30, 2020

  1. Simplify _.iteratee

    jgonggrijp committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    c22e1e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce15d38 View commit details
    Browse the repository at this point in the history
  3. Use _.find in _.each

    jgonggrijp committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    f0e9bc3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0b51eae View commit details
    Browse the repository at this point in the history
  5. Use _.each in createReduce

    jgonggrijp committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    f4e0f71 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    11bdeab View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3bc4c50 View commit details
    Browse the repository at this point in the history
  8. Use _.each in _.map

    jgonggrijp committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    ea55aeb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5092fb5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    008990f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    bd14ef1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    38129be View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    be5b8a2 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2021

  1. Configuration menu
    Copy the full SHA
    adfb2f8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e842fd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5d73fb3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3753fe7 View commit details
    Browse the repository at this point in the history
  5. Refactor _.first and _.last, using getLength

    This cost 5 bytes, but it's both more readable and more efficient.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    d7393b4 View commit details
    Browse the repository at this point in the history
  6. Use getLength in _.invoke

    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    18fd848 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    296be9e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    60319af View commit details
    Browse the repository at this point in the history
  9. Use _.last in _.invoke

    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    645eafe View commit details
    Browse the repository at this point in the history
  10. Use _.initial in _.invoke

    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    aac1042 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    431b84e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5781d89 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    81a7a77 View commit details
    Browse the repository at this point in the history
  14. Use linearSearch in _.has

    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    b4ab797 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5bc6d47 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    eef39cd View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b63e425 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2fac273 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    9624b1b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    3120fd2 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    3a326ad View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    1f3562a View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    cba898c View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    230fee1 View commit details
    Browse the repository at this point in the history
  25. Replace _.each by linearSearch in _.mixin and the array methods

    This reduces internal dependencies, potentially slimming down bundles
    substantially. Surprisingly, it also saves one byte on monolithic
    standard Underscore.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    a0ef35a View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    8764f04 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    bc0e942 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    65c16db View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    8cfa13f View commit details
    Browse the repository at this point in the history
  30. Use _.times in _.unzip

    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    8edde7b View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    19ba06e View commit details
    Browse the repository at this point in the history
  32. Swap the final parameters of linearSearch

    One would expect that this saves bytes, since we get rid of a lot of
    nulls. In reality, this change actually costs a byte. Nevertheless, it
    simplifies the code a bit and also makes room for a possible future
    end-of-range parameter.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    5f46a25 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    dfd6d6b View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    13fca95 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    457a96d View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    7daecbe View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    ce3f0ed View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    c654128 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    fca3114 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    8743fc0 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    bd49157 View commit details
    Browse the repository at this point in the history
  42. Revert "Enable customization of accumulator initialization in createR…

    …educe"
    
    This reverts commit a76ed7418a3a2d14443b7d94bdccddbfc33daf8c.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    5f72f90 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    c71244a View commit details
    Browse the repository at this point in the history
  44. Put back the for loop in extremum

    :(
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    e108783 View commit details
    Browse the repository at this point in the history
  45. Inline compareNumeric in _.min and _.max

    This doesn't seem to save any time, but surprisingly, it does save
    bytes.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    e2a9a83 View commit details
    Browse the repository at this point in the history
  46. Use boolean state variable, not shape-shifting callbacks in extremum

    This saves both time and bytes.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    448d2e8 View commit details
    Browse the repository at this point in the history
  47. Don't use _.partial anymore in _.min and _.max

    This saves function call overhead and surprisingly, also saves bytes.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    5165f1f View commit details
    Browse the repository at this point in the history
  48. Enable find-by-strict-equality function elision in linearSearch

    and use it in _.indexOf.
    jgonggrijp committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    9bf9dc3 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    64e62ef View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    aaa0fcb View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    01f324e View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    6a0ebd8 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    7fee0d5 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    f60a3ef View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    ba7df7a View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    1cb9003 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    674ed39 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    b7637b6 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    d5b8d74 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    b99a079 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    9de1ceb View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    20e88e5 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    d82eadc View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    640332b View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    341ad30 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    eaba5b5 View commit details
    Browse the repository at this point in the history