chore: Cleanup utils package (#9238)
Fixes: FRMW-2712 Old PR: https://github.com/medusajs/medusa/pull/9234 Closed because of incorrect branch naming Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { partitionArray } from "../../../dist"
|
||||
import { partitionArray } from "../../index"
|
||||
|
||||
describe("partitionArray", function () {
|
||||
it("should split array according to predicate", function () {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import { objectFromStringPath } from "./object-from-string-path"
|
||||
|
||||
|
||||
type Order = {
|
||||
[key: string]: "ASC" | "DESC" | Order
|
||||
}
|
||||
@@ -42,7 +41,7 @@ function buildRelationsOrSelect(collection: string[]): Selects | Relations {
|
||||
* }
|
||||
* @param orderBy
|
||||
*/
|
||||
export function buildOrder<T>(orderBy: { [k: string]: "ASC" | "DESC" }): Order {
|
||||
export function buildOrder(orderBy: { [k: string]: "ASC" | "DESC" }): Order {
|
||||
const output: Order = {}
|
||||
|
||||
const orderKeys = Object.keys(orderBy)
|
||||
|
||||
@@ -3,5 +3,5 @@ export function toCamelCase(str: string): string {
|
||||
? str
|
||||
: str
|
||||
.toLowerCase()
|
||||
.replace(/[^a-zA-Z0-9]+(.)/g, (m, chr) => chr.toUpperCase())
|
||||
.replace(/[^a-zA-Z0-9]+(.)/g, (_, chr) => chr.toUpperCase())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user