Lightweight (< 2.3kB gzipped) and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.

Overview

fast-natural-order-by CircleCI

Lightweight (< 2.3kB gzipped) and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.

A fork of natural-orderby that fixes performance when sorting strings longer than 20 characters (~150,000x faster). Also, re-written from Flow to Typescript

Install

$ yarn add @shelf/fast-natural-order-by

Intro

People sort strings containing numbers differently than most sorting algorithms, which sort values by comparing strings in Unicode code point order. This produces an ordering that is inconsistent with human logic.

@shelf/fast-natural-order-by sorts the primitive values of Boolean, Null, Undefined, Number or String type as well as Date objects. When comparing strings it differentiates between unicode characters, integer, floating as well as hexadecimal numbers, various date formats, etc. You may sort flat or nested arrays or arrays of objects in a natural sorting order using @shelf/fast-natural-order-by.

In addition to the efficient and fast orderBy() method @shelf/fast-natural-order-by also provides the method compare(), which may be passed to Array.prototype.sort().

Benchmark

This is a fork of natural-orderby that fixes performance when sorting strings longer than 20 characters (~150,000x faster).

Here are the benchmark results of sorting array with ONE SINGLE (1) element with a string 200 chars long that you can run by running yarn benchmark command:

  original:
    5 ops/s, ±0.29%         | slowest, 100% slower

  optimized:
    773 712 ops/s, ±0.24%   | fastest

See this commit to udnerstand how the performance was fixed.

Usage

import {orderBy} from '@shelf/fast-natural-order-by';

const users = [
  {
    username: 'Bamm-Bamm',
    ip: '192.168.5.2',
    datetime: 'Fri Jun 15 2018 16:48:00 GMT+0200 (CEST)',
  },
  {
    username: 'Wilma',
    ip: '192.168.10.1',
    datetime: '14 Jun 2018 00:00:00 PDT',
  },
  {
    username: 'Dino',
    ip: '192.168.0.2',
    datetime: 'June 15, 2018 14:48:00',
  },
  {
    username: 'Barney',
    ip: '192.168.1.1',
    datetime: 'Thu, 14 Jun 2018 07:00:00 GMT',
  },
  {
    username: 'Pebbles',
    ip: '192.168.1.21',
    datetime: '15 June 2018 14:48 UTC',
  },
  {
    username: 'Hoppy',
    ip: '192.168.5.10',
    datetime: '2018-06-15T14:48:00.000Z',
  },
];

const sortedUsers = orderBy(users, [v => v.datetime, v => v.ip], ['desc', 'asc']);

This is the return value of orderBy():

[
  {
    username: 'Dino',
    ip: '192.168.0.2',
    datetime: 'June 15, 2018 14:48:00',
  },
  {
    username: 'Pebbles',
    ip: '192.168.1.21',
    datetime: '15 June 2018 14:48 UTC',
  },
  {
    username: 'Bamm-Bamm',
    ip: '192.168.5.2',
    datetime: 'Fri Jun 15 2018 16:48:00 GMT+0200 (CEST)',
  },
  {
    username: 'Hoppy',
    ip: '192.168.5.10',
    datetime: '2018-06-15T14:48:00.000Z',
  },
  {
    username: 'Barney',
    ip: '192.168.1.1',
    datetime: 'Thu, 14 Jun 2018 07:00:00 GMT',
  },
  {
    username: 'Wilma',
    ip: '192.168.10.1',
    datetime: '14 Jun 2018 00:00:00 PDT',
  },
];

API Reference

orderBy()

Creates an array of elements, natural sorted by specified identifiers and the corresponding sort orders. This method implements a stable sort algorithm, which means the original sort order of equal elements is preserved. It also avoids the high overhead caused by Array.prototype.sort() invoking a compare function multiple times per element within the array.

Syntax

function orderBy<T>(
  collection: ReadonlyArray<T>,
  identifiers?: ReadonlyArray<Identifier<T>> | Identifier<T>,
  orders?: ReadonlyArray<Order> | Order
): Array<T>;
Type Value
Identifier<T> string | (value: T) => unknown)
Order 'asc' | 'desc' | (valueA: unknown, valueB: unknown) => number

Description

orderBy() sorts the elements of an array by specified identifiers and the corresponding sort orders in a natural order and returns a new array containing the sorted elements.

If collection is an array of primitives, identifiers may be unspecified. Otherwise, you should specify identifiers to sort by or collection will be returned unsorted. An identifier can beexpressed by:

  • an index position, if collection is a nested array,
  • a property name, if collection is an array of objects,
  • a function which returns a particular value from an element of a nested array or an array of objects. This function will be invoked by passing one element of collection.

If orders is unspecified, all values are sorted in ascending order. Otherwise, specify an order of 'desc' for descending or 'asc' for ascending sort order of corresponding values. You may also specify a compare function for an order, which will be invoked by two arguments: (valueA, valueB). It must return a number representing the sort order.

Note: orderBy() always returns a new array, even if the original was already sorted.

Examples

import {orderBy} from '@shelf/fast-natural-order-by';

// Simple numerics

orderBy(['10', 9, 2, '1', '4']);
// => ['1', 2, '4', 9, '10']

// Floats

orderBy(['10.0401', 10.022, 10.042, '10.021999']);
// => ['10.021999', 10.022, '10.0401', 10.042]

// Float & decimal notation

orderBy(['10.04f', '10.039F', '10.038d', '10.037D']);
// => ['10.037D', '10.038d', '10.039F', '10.04f']

// Scientific notation

orderBy(['1.528535047e5', '1.528535047e7', '1.528535047e3']);
// => ['1.528535047e3', '1.528535047e5', '1.528535047e7']

// IP addresses

orderBy(['192.168.201.100', '192.168.201.12', '192.168.21.1']);
// => ['192.168.21.1', '192.168.201.12', '192.168.21.100']

// Filenames

orderBy([
  '01asset_0815.png',
  'asset_47103.jpg',
  'asset_151.jpg',
  '001asset_4711.jpg',
  'asset_342.mp4',
]);
// => ['001asset_4711.jpg', '01asset_0815.png', 'asset_151.jpg', 'asset_342.mp4', 'asset_47103.jpg']

// Filenames - ordered by extension and filename

orderBy(
  ['01asset_0815.png', 'asset_47103.jpg', 'asset_151.jpg', '001asset_4711.jpg', 'asset_342.mp4'],
  [v => v.split('.').pop(), v => v]
);
// => ['001asset_4711.jpg', 'asset_151.jpg', 'asset_47103.jpg', 'asset_342.mp4', '01asset_0815.png']

// Dates

orderBy(['10/12/2018', '10/11/2018', '10/11/2017', '10/12/2017']);
// => ['10/11/2017', '10/12/2017', '10/11/2018', '10/12/2018']

orderBy([
  'Thu, 15 Jun 2017 20:45:30 GMT',
  'Thu, 3 May 2018 17:45:30 GMT',
  'Thu, 15 Jun 2017 17:45:30 GMT',
]);
// => ['Thu, 15 Jun 2017 17:45:30 GMT', 'Thu, 15 Jun 2018 20:45:30 GMT', 'Thu, 3 May 2018 17:45:30 GMT']

// Money

orderBy(['$102.00', '$21.10', '$101.02', '$101.01']);
// => ['$21.10', '$101.01', '$101.02', '$102.00']

// Case-insensitive sort order

orderBy(['A', 'C', 'E', 'b', 'd', 'f']);
// => ['A', 'b', 'C', 'd', 'E', 'f']

// Default ascending sort order

orderBy(['a', 'c', 'f', 'd', 'e', 'b']);
// => ['a', 'b', 'c', 'd', 'e', 'f']

// Descending sort order

orderBy(['a', 'c', 'f', 'd', 'e', 'b'], null, ['desc']);
// => ['f', 'e', 'd', 'c', 'b', 'a']

// Custom compare function

orderBy([2, 1, 5, 8, 6, 9], null, [(valueA, valueB) => valueA - valueB]);
// => [1, 2, 5, 6, 8, 9]

// collections

const users = [
  {
    username: 'Bamm-Bamm',
    ip: '192.168.5.2',
    datetime: 'Fri Jun 15 2018 16:48:00 GMT+0200 (CEST)',
  },
  {
    username: 'Wilma',
    ip: '192.168.10.1',
    datetime: '14 Jun 2018 00:00:00 PDT',
  },
  {
    username: 'Dino',
    ip: '192.168.0.2',
    datetime: 'June 15, 2018 14:48:00',
  },
  {
    username: 'Barney',
    ip: '192.168.1.1',
    datetime: 'Thu, 14 Jun 2018 07:00:00 GMT',
  },
  {
    username: 'Pebbles',
    ip: '192.168.1.21',
    datetime: '15 June 2018 14:48 UTC',
  },
  {
    username: 'Hoppy',
    ip: '192.168.5.10',
    datetime: '2018-06-15T14:48:00.000Z',
  },
];

orderBy(users, [v => v.datetime, v => v.ip], ['desc', 'asc']);
// => [
//      {
//        username: 'Dino',
//        ip: '192.168.0.2',
//        datetime: 'June 15, 2018 14:48:00',
//      },
//      {
//        username: 'Pebbles',
//        ip: '192.168.1.21',
//        datetime: '15 June 2018 14:48 UTC',
//      },
//      {
//        username: 'Bamm-Bamm',
//        ip: '192.168.5.2',
//        datetime: 'Fri Jun 15 2018 16:48:00 GMT+0200 (CEST)',
//      },
//      {
//        username: 'Hoppy',
//        ip: '192.168.5.10',
//        datetime: '2018-06-15T14:48:00.000Z',
//      },
//      {
//        username: 'Barney',
//        ip: '192.168.1.1',
//        datetime: 'Thu, 14 Jun 2018 07:00:00 GMT',
//      },
//      {
//        username: 'Wilma',
//        ip: '192.168.10.1',
//        datetime: '14 Jun 2018 00:00:00 PDT',
//      },
//    ]

compare()

Creates a compare function that defines the natural sort order and which may be passed to Array.prototype.sort().

Syntax

compare(options?: CompareOptions): CompareFn
Type Value
CompareOptions { order?: 'asc' | 'desc' }
CompareFn (valueA: unknown, valueB: unknown) => number

Description

compare() returns a compare function that defines the natural sort order and which may be passed to Array.prototype.sort().

If options or its property order is unspecified, values are sorted in ascending sort order. Otherwise, specify an order of 'desc' for descending or 'asc' for ascending sort order of values.

Examples

import { compare } from '@shelf/fast-natural-order-by';

// Simple numerics

['10', 9, 2, '1', '4'].sort(compare());
// => ['1', 2, '4', 9, '10']


// Floats

['10.0401', 10.022, 10.042, '10.021999'].sort(compare());
// => ['10.021999', 10.022, '10.0401', 10.042]


// Float & decimal notation

['10.04f', '10.039F', '10.038d', '10.037D'].sort(compare());
// => ['10.037D', '10.038d', '10.039F', '10.04f']


// Scientific notation

['1.528535047e5', '1.528535047e7', '1.528535047e3'].sort(compare());
// => ['1.528535047e3', '1.528535047e5', '1.528535047e7']


// IP addresses

['192.168.201.100', '192.168.201.12', '192.168.21.1'].sort(compare());
// => ['192.168.21.1', '192.168.201.12', '192.168.21.100']


// Filenames

['01asset_0815.jpg', 'asset_47103.jpg', 'asset_151.jpg', '001asset_4711.jpg', 'asset_342.mp4'].sort(compare());
// => ['001asset_4711.jpg', '01asset_0815.jpg', 'asset_151.jpg', 'asset_342.mp4', 'asset_47103.jpg']


// Dates

['10/12/2018', '10/11/2018', '10/11/2017', '10/12/2017'].sort(compare());
// => ['10/11/2017', '10/12/2017', '10/11/2018', '10/12/2018']

['Thu, 15 Jun 2017 20:45:30 GMT', 'Thu, 3 May 2018 17:45:30 GMT', 'Thu, 15 Jun 2017 17:45:30 GMT'].sort(compare());
// => ['Thu, 15 Jun 2017 17:45:30 GMT', 'Thu, 15 Jun 2018 20:45:30 GMT', 'Thu, 3 May 2018 17:45:30 GMT']


// Money

['$102.00', '$21.10', '$101.02', '$101.01'].sort(compare());
// => ['$21.10', '$101.01', '$101.02', '$102.00']


// Case-insensitive sort order

['A', 'C', 'E', 'b', 'd', 'f'].sort(compare());
// => ['A', 'b', 'C', 'd', 'E', 'f']


// Default ascending sort order

['a', 'c', 'f', 'd', 'e', 'b'].sort(compare());
// => ['a', 'b', 'c', 'd', 'e', 'f']


// Descending sort order

['a', 'c', 'f', 'd', 'e', 'b'].sort(compare({ order: 'desc' }));
// => ['f', 'e', 'd', 'c', 'b', 'a']


// collections

const users = [
  {
    username: 'Bamm-Bamm',
    lastLogin: {
      ip: '192.168.5.2',
      datetime: 'Fri Jun 15 2018 16:48:00 GMT+0200 (CEST)'
    },
  },
  {
    username: 'Wilma',
    lastLogin: {
      ip: '192.168.10.1',
      datetime: '14 Jun 2018 00:00:00 PDT'
    },
  },
  {
    username: 'Dino',
    lastLogin: {
      ip: '192.168.0.2',
      datetime: 'June 15, 2018 14:48:00'
    },
  },
  {
    username: 'Barney',
    lastLogin: {
      ip: '192.168.1.1',
      datetime: 'Thu, 14 Jun 2018 07:00:00 GMT'
    },
  },
  {
    username: 'Pebbles',
    lastLogin: {
      ip: '192.168.1.21',
      datetime: '15 June 2018 14:48 UTC'
    },
  },
  {
    username: 'Hoppy',
    lastLogin: {
      ip: '192.168.5.10',
      datetime: '2018-06-15T14:48:00.000Z'
    },
  },
];

users.sort((a, b) => compare()(a.lastLogin.ip, b.lastLogin.ip));
// => [
//      {
//        username: 'Dino',
//        lastLogin: {
//          ip: '192.168.0.2',
//          datetime: 'June 15, 2018 14:48:00'
//        },
//      },
//      {
//        username: 'Barney',
//        lastLogin: {
//          ip: '192.168.1.1',
//          datetime: 'Thu, 14 Jun 2018 07:00:00 GMT'
//        },
//      },
//      {
//        username: 'Pebbles',
//        lastLogin: {
//          ip: '192.168.1.21',
//          datetime: '15 June 2018 14:48 UTC'
//        },
//      },
//      {
//        username: 'Bamm-Bamm',
//        lastLogin: {
//          ip: '192.168.5.2',
//          datetime: 'Fri Jun 15 2018 16:48:00 GMT+0200 (CEST)'
//        },
//      },
//      {
//        username: 'Hoppy',
//        lastLogin: {
//          ip: '192.168.5.10',
//          datetime: '2018-06-15T14:48:00.000Z'
//        },
//      },
//      {
//        username: 'Wilma',
//        lastLogin: {
//          ip: '192.168.10.1',
//          datetime: '14 Jun 2018 00:00:00 PDT'
//        },
//      },
//    ]

See Also

Credits

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf

Comments
  • Pin dependency @types/node to 16.11.38

    Pin dependency @types/node to 16.11.38

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | @types/node | devDependencies | pin | 16 -> 16.11.38 |

    Add the preset :preserveSemverRanges to your config if you don't want to pin your dependencies.


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 1
  • Update dependency prettier to v2.8.1

    Update dependency prettier to v2.8.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | prettier (source) | 2.8.0 -> 2.8.1 | age | adoption | passing | confidence |


    Release Notes

    prettier/prettier

    v2.8.1

    Compare Source

    diff

    Fix SCSS map in arguments (#​9184 by @​agamkrbit)
    // Input
    $display-breakpoints: map-deep-merge(
      (
        "print-only": "only print",
        "screen-only": "only screen",
        "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm")-1})",
      ),
      $display-breakpoints
    );
    
    // Prettier 2.8.0
    $display-breakpoints: map-deep-merge(
      (
        "print-only": "only print",
        "screen-only": "only screen",
        "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, " sm
          ")-1})",
      ),
      $display-breakpoints
    );
    
    // Prettier 2.8.1
    $display-breakpoints: map-deep-merge(
      (
        "print-only": "only print",
        "screen-only": "only screen",
        "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm")-1})",
      ),
      $display-breakpoints
    );
    
    Support auto accessors syntax (#​13919 by @​sosukesuzuki)

    Support for Auto Accessors Syntax landed in TypeScript 4.9.

    (Doesn't work well with babel-ts parser)

    class Foo {
      accessor foo: number = 3;
    }
    

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency lint-staged to v13.1.0

    Update dependency lint-staged to v13.1.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | lint-staged | 13.0.4 -> 13.1.0 | age | adoption | passing | confidence |


    Release Notes

    okonet/lint-staged

    v13.1.0

    Compare Source

    Features

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency eslint to v8.29.0

    Update dependency eslint to v8.29.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint (source) | 8.28.0 -> 8.29.0 | age | adoption | passing | confidence |


    Release Notes

    eslint/eslint

    v8.29.0

    Compare Source

    Features

    • 49a07c5 feat: add allowParensAfterCommentPattern option to no-extra-parens (#​16561) (Nitin Kumar)
    • e6a865d feat: prefer-named-capture-group add suggestions (#​16544) (Josh Goldberg)
    • a91332b feat: In no-invalid-regexp validate flags also for non-literal patterns (#​16583) (trosos)

    Documentation

    Chores


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency lint-staged to v13.0.4

    Update dependency lint-staged to v13.0.4

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | lint-staged | 13.0.3 -> 13.0.4 | age | adoption | passing | confidence |


    Release Notes

    okonet/lint-staged

    v13.0.4

    Compare Source

    Bug Fixes
    • deps: update all dependencies (336f3b5)
    • deps: update all dependencies (ec995e5)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency prettier to v2.8.0

    Update dependency prettier to v2.8.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | prettier (source) | 2.7.1 -> 2.8.0 | age | adoption | passing | confidence |


    Release Notes

    prettier/prettier

    v2.8.0

    Compare Source

    diff

    🔗 Release Notes


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency eslint to v8.28.0

    Update dependency eslint to v8.28.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint (source) | 8.27.0 -> 8.28.0 | age | adoption | passing | confidence |


    Release Notes

    eslint/eslint

    v8.28.0

    Compare Source

    Features

    • 63bce44 feat: add ignoreClassFieldInitialValues option to no-magic-numbers (#​16539) (Milos Djermanovic)
    • 8385ecd feat: multiline properties in rule key-spacing with option align (#​16532) (Francesco Trotta)
    • a4e89db feat: no-obj-calls support Intl (#​16543) (Sosuke Suzuki)

    Bug Fixes

    • c50ae4f fix: Ensure that dot files are found with globs. (#​16550) (Nicholas C. Zakas)
    • 9432b67 fix: throw error for first unmatched pattern (#​16533) (Milos Djermanovic)
    • e76c382 fix: allow * 1 when followed by / in no-implicit-coercion (#​16522) (Milos Djermanovic)

    Documentation

    Chores


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency babel-loader to v9

    Update dependency babel-loader to v9

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | babel-loader | 8.3.0 -> 9.1.0 | age | adoption | passing | confidence |


    Release Notes

    babel/babel-loader

    v9.1.0

    Compare Source

    New features

    Full Changelog: https://github.com/babel/babel-loader/compare/v9.0.1...v9.1.0

    v9.0.1

    Compare Source

    Bug Fixes

    Full Changelog: https://github.com/babel/babel-loader/compare/v9.0.0...v9.0.1

    v9.0.0

    Compare Source

    What's Changed

    New Contributors

    Full Changelog: https://github.com/babel/babel-loader/compare/v8.2.5...v9.0.0


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency eslint to v8.27.0

    Update dependency eslint to v8.27.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint (source) | 8.26.0 -> 8.27.0 | age | adoption | passing | confidence |


    Release Notes

    eslint/eslint

    v8.27.0

    Compare Source

    Features

    • f14587c feat: new no-new-native-nonconstructor rule (#​16368) (Sosuke Suzuki)
    • 978799b feat: add new rule no-empty-static-block (#​16325) (Sosuke Suzuki)
    • 69216ee feat: no-empty suggest to add comment in empty BlockStatement (#​16470) (Nitin Kumar)
    • 319f0a5 feat: use context.languageOptions.ecmaVersion in core rules (#​16458) (Milos Djermanovic)

    Bug Fixes

    • c3ce521 fix: Ensure unmatched glob patterns throw an error (#​16462) (Nicholas C. Zakas)
    • 886a038 fix: handle files with unspecified path in getRulesMetaForResults (#​16437) (Francesco Trotta)

    Documentation

    • ce93b42 docs: Stylelint property-no-unknown (#​16497) (Nick Schonning)
    • d2cecb4 docs: Stylelint declaration-block-no-shorthand-property-overrides (#​16498) (Nick Schonning)
    • 0a92805 docs: stylelint color-hex-case (#​16496) (Nick Schonning)
    • 74a5af4 docs: fix stylelint error (#​16491) (Milos Djermanovic)
    • 324db1a docs: explicit stylelint color related rules (#​16465) (Nick Schonning)
    • 94dc4f1 docs: use Stylelint for HTML files (#​16468) (Nick Schonning)
    • cc6128d docs: enable stylelint declaration-block-no-duplicate-properties (#​16466) (Nick Schonning)
    • d03a8bf docs: Add heading to justification explanation (#​16430) (Maritaria)
    • 8a15968 docs: add Stylelint configuration and cleanup (#​16379) (Nick Schonning)
    • 9b0a469 docs: note commit messages don't support scope (#​16435) (Andy Edwards)
    • 1581405 docs: improve context.getScope() docs (#​16417) (Ben Perlmutter)
    • b797149 docs: update formatters template (#​16454) (Milos Djermanovic)
    • 5ac4de9 docs: fix link to formatters on the Core Concepts page (#​16455) (Vladislav)
    • 33313ef docs: core-concepts: fix link to semi rule (#​16453) (coderaiser)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update node orb to v5.0.3

    Update node orb to v5.0.3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | node | orb | patch | 5.0.2 -> 5.0.3 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • Update dependency husky to v8.0.2

    Update dependency husky to v8.0.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | husky (source) | 8.0.1 -> 8.0.2 | age | adoption | passing | confidence |


    Release Notes

    typicode/husky

    v8.0.2

    Compare Source

    • docs: remove deprecated npm set-script

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • chore(deps): update dependency babel-loader to v9.1.2

    chore(deps): update dependency babel-loader to v9.1.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | babel-loader | 9.1.0 -> 9.1.2 | age | adoption | passing | confidence |


    Release Notes

    babel/babel-loader

    v9.1.2

    Compare Source

    9.1.1 was a broken release, it didn't include all the commits.

    Dependencies updates

    Misc

    New Contributors

    Full Changelog: https://github.com/babel/babel-loader/compare/v9.1.0...v9.1.2

    v9.1.1

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • chore(deps): update dependency husky to v8.0.3

    chore(deps): update dependency husky to v8.0.3

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | husky (source) | 8.0.2 -> 8.0.3 | age | adoption | passing | confidence |


    Release Notes

    typicode/husky

    v8.0.3

    Compare Source

    • fix: add git not installed message #​1208

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • chore(deps): update dependency eslint to v8.31.0

    chore(deps): update dependency eslint to v8.31.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint (source) | 8.29.0 -> 8.31.0 | age | adoption | passing | confidence |


    Release Notes

    eslint/eslint

    v8.31.0

    Compare Source

    Features
    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#​16693) (Milos Djermanovic)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#​16006) (Morten Kaltoft)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#​16677) (Francesco Trotta)
    Bug Fixes
    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#​16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#​16608) (Milos Djermanovic)
    Documentation
    Chores

    v8.30.0

    Compare Source

    Features

    Bug Fixes

    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#​16579) (Nicholas C. Zakas)
    • 9b8bb72 fix: autofix recursive functions in no-var (#​16611) (Milos Djermanovic)

    Documentation

    Chores


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • chore(deps): update babel monorepo

    chore(deps): update babel monorepo

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @babel/cli (source) | 7.19.3 -> 7.20.7 | age | adoption | passing | confidence | | @babel/core (source) | 7.20.2 -> 7.20.12 | age | adoption | passing | confidence |


    Release Notes

    babel/babel

    v7.20.7

    Compare Source

    :eyeglasses: Spec Compliance
    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes, babel-plugin-transform-object-super
    :bug: Bug Fix
    • babel-parser, babel-plugin-transform-typescript
    • babel-traverse
    • babel-plugin-transform-typescript, babel-traverse
    • babel-plugin-transform-block-scoping
    • babel-plugin-proposal-async-generator-functions, babel-preset-env
    • babel-generator, babel-plugin-proposal-optional-chaining
    • babel-plugin-transform-react-jsx, babel-types
    • babel-core, babel-helpers, babel-plugin-transform-computed-properties, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-generator
    :nail_care: Polish
    :house: Internal
    • babel-helper-define-map, babel-plugin-transform-property-mutators
    • babel-core, babel-plugin-proposal-class-properties, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-destructuring, babel-plugin-transform-parameters, babel-plugin-transform-regenerator, babel-plugin-transform-runtime, babel-preset-env, babel-traverse
    :running_woman: Performance

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • chore(deps): update dependency webpack-cli to v5

    chore(deps): update dependency webpack-cli to v5

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | webpack-cli (source) | 4.10.0 -> 5.0.1 | age | adoption | passing | confidence |


    Release Notes

    webpack/webpack-cli

    v5.0.1

    Compare Source

    Bug Fixes

    v5.0.0

    Compare Source

    Bug Fixes
    Features
    • failOnWarnings option (#​3317) (c48c848)
    • update commander to v9 (#​3460) (6621c02)
    • added the --define-process-env-node-env option
    • update interpret to v3 and rechoir to v0.8
    • add an option for preventing interpret (#​3329) (c737383)
    BREAKING CHANGES
    • the minimum supported webpack version is v5.0.0 (#​3342) (b1af0dc), closes #​3342
    • webpack-cli no longer supports webpack v4, the minimum supported version is webpack v5.0.0
    • webpack-cli no longer supports webpack-dev-server v3, the minimum supported version is webpack-dev-server v4.0.0
    • remove the migrate command (#​3291) (56b43e4), closes #​3291
    • remove the --prefetch option in favor the PrefetchPlugin plugin
    • remove the --node-env option in favor --define-process-env-node-env
    • remove the --hot option in favor of directly using the HotModuleReplacement plugin (only for build command, for serve it will work)
    • the behavior logic of the --entry option has been changed - previously it replaced your entries, now the option adds a specified entry, if you want to return the previous behavior please use webpack --entry-reset --entry './src/my-entry.js'

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
  • chore(deps): update dependency typescript to v4.9.4

    chore(deps): update dependency typescript to v4.9.4

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | typescript (source) | 4.8.4 -> 4.9.4 | age | adoption | passing | confidence |


    Release Notes

    Microsoft/TypeScript

    v4.9.4: TypeScript 4.9.4

    Compare Source

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:

    Changes:

    This list of changes was auto generated.

    v4.9.3: TypeScript 4.9

    Compare Source

    For release notes, check out the release announcement.

    Downloads are available on:

    Changes:

    See More

    This list of changes was auto generated.


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    backend dependencies 
    opened by renovate[bot] 0
Owner
Shelf
The Future of Knowledge Management is Here
Shelf
Sorting visualizer to introduce students to different sorting algorithms, how they work, and how to apply them

sorting-visualizer Sorting visualizer to introduce students to different sorting algorithms, how they work, and how to apply them Iteration 1 Demo: ht

Aditya Malik 1 Nov 14, 2022
An unreliable and overall unusable sorting library for numbers with a global cache on the edge.

unsort An unreliable and overall unusable sorting library for numbers with a global cache on the edge. the algorithm This library implements a number

Jonas Wanner 6 May 19, 2022
✏️ Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped

Sugar High Introduction Super lightweight JSX syntax highlighter, around 1KB after minified and gzipped Usage npm install --save sugar-high import { h

Jiachi Liu 67 Dec 8, 2022
A lightweight JavaScript library that renders text in a brilliant style by displaying strings of random characters before the actual text.

cryptoWriter.js A lightweight javascript library which creates brilliant text animation by rendering strings of random characters before the actual te

Keshav Bajaj 2 Sep 13, 2022
Emoji - Use emoji names instead of Unicode strings. Copy-pasting emoji sucks.

Grammy Emoji Adds emoji parsing for grammY. Check out the official documentation for this plugin. While this draft is working, we still do not recomme

null 8 Sep 5, 2022
A lightweight, performant, and simple-to-use wrapper component to stick section headers to the top when scrolling brings them to top

A lightweight, performant, and simple-to-use wrapper component to stick section headers to the top when scrolling brings them to top

Mayank 7 Jun 27, 2022
Simple string diffing. Given two strings, striff will return an object noting which characters were added or removed, and at which indices

Simple string diffing. Given two strings, striff will return an object noting which characters were added or removed, and at which indices

Alex MacArthur 196 Jan 6, 2023
A tiny clock and date, period, or duration math library < 2k (minified/gzipped)

timewave v0.1.4 A tiny time simulation and date/time math library < 3k (minified/gzipped) const clock = Clock(new Date(2022,1,1),{tz:'America/New_York

Simon Y. Blackwell 46 Dec 18, 2022
A simple code that creates a string of random characters displayed in an html object, all saving in a json file.

I'm 17 Years Old Developer / Lead Developer. ?? I'm wroking on AdrenalinaRP, GrandRDM. ?? I’m currently learning JavaScript. ?? I’m looking to collabo

OFFVIXEN 2 Nov 17, 2022
👌A useful zero-dependencies, less than 434 Bytes (gzipped), pure JavaScript & CSS solution for drop an annoying pop-ups confirming the submission of form in your web apps.

Throw out pop-ups confirming the submission of form! A useful zero-dependencies, less than 434 Bytes (gzipped), pure JavaScript & CSS solution for dro

Vic Shóstak 35 Aug 24, 2022
Instagram clone based on Demon slayer characters ⚔️

Instagram clone based on Demon slayer characters ?? - About this project You must sign in with google to be able to like and comment on the demon slay

miraya 6 Nov 8, 2022
Picky is a jQuery plugin that provides simple client-side date validation when entering dates using select tags.

jquery.picky.js Picky is a jQuery plugin that provides simple client-side date validation when entering dates using select tags. Features Instead of g

Patrick Crowley 5 Apr 25, 2021
we learn the whole concept of JS including Basics like Object, Functions, Array etc. And Advance JS - Understanding DOMs, JQuery, Ajax, Prototypes etc.

JavaScript-for-Complete-Web Development. we learn the whole concept of JS including Basics like Object, Functions, Array etc. And Advance JS - Underst

prasam jain 2 Jul 22, 2022
Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections

eznft Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collec

null 3 Sep 21, 2022
Node module for synchronously and recursively merging multiple folders or collections of files into one folder.

merge-dirs Node module for synchronously and recursively merging multiple folders or collections of files into one folder. Install yarn add @nooooooom

不见月 2 Mar 20, 2022
ENS Collections are categories of ENS names based on specific patterns or predefined lists.

ENS Collections are categories of ENS names based on specific patterns or predefined lists. This repository is an effort towards standardizing their definition in order to increase consistency across platforms.

null 65 Dec 15, 2022
CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections.

@candypay/sdk CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections. Simulate minting transactions for mult

Candy Pay 33 Nov 16, 2022
Semantic is a UI component framework based around useful principles from natural language.

Semantic UI Semantic is a UI framework designed for theming. Key Features 50+ UI elements 3000 + CSS variables 3 Levels of variable inheritance (simil

Semantic Org 50.3k Jan 7, 2023
Parses natural language to date schedules.

DateParrot DateParrot parses natural language into a unified schedule object or ISO date. This package is in a very early stage and not yet production

Jörg Bayreuther 7 Aug 3, 2022