---
title: "Coming from Just"
description: "Map angus-c/just helpers to @vinicunca/perkakas, with notes where the APIs differ."
canonical_url: "https://vinicunca.dev/perkakas/migrate/just"
---
# Coming from Just

> Map angus-c/just helpers to @vinicunca/perkakas, with notes where the APIs differ.

Each heading is a Just function. The Perkakas equivalent is checked against `@vinicunca/perkakas` v1.17.1. Names that Remeda documents but Perkakas does not ship are called out. In-page links such as `#reverse` jump to that Just section.

## extend

Just `extend` → [`merge`](https://vinicunca.dev/perkakas/functions#merge).

- Just's `extend` performs an **in-place** merge which mutates the first
argument. Perkakas functions never mutate the arguments. Because of this extra
care is needed when migrating.
- If you have the `deep` flag enabled use Perkakas's [`mergeDeep`](https://vinicunca.dev/perkakas/functions#mergeDeep)
instead. Arrays are **not** merged deeply in Perkakas, unlike `extend` which
clones arrays.
- There is no equivalent function for merging of arrays. Extending arrays is
only relevant for [sparse arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#sparse_arrays)
which are uncommon. For regular arrays `extend` is similar to [`splice`](https://vinicunca.dev/perkakas/functions#splice).
- If you are merging more than two objects, use [`mergeAll`](https://vinicunca.dev/perkakas/functions#mergeAll)
which takes an array of objects to merge. Notice that this merge is shallow;
there is no equivalent function in Perkakas which would perform a deep merge of
multiple objects.

#### New object

```ts
// Just
const result = extend({}, a, b);

// Perkakas
const result = merge(a, b);
```

#### Replace

```ts
// Just
const DATA = { ... };
extend(DATA, b);

// Perkakas
let DATA = { ... };
DATA = merge(DATA, b);
```

#### Deep

```ts
// Just
extend(true /* deep */, a, b);

// Perkakas
mergeDeep(a, b);
```

#### Arrays

```ts
// Just
const DATA = [...];
extend(DATA, b);

// Perkakas
let DATA = [...];
DATA = splice(DATA, 0 /* start */, b.length /* deleteCount */, b /* replacement */);
```

#### Multiple objects

```ts
// Just
const DATA = { ... };
extend(DATA, b, c, d);

// Perkakas
let DATA = { ... };
DATA = mergeAll([DATA, b, c, d]);
```

## has

Just `has` → [`hasProp`](https://vinicunca.dev/perkakas/functions#hasProp).

- Just's `has` accepts deep paths (e.g. `["a", "b"]`, `"a.b"`). Perkakas's `hasProp` only
checks a single key.

```ts
// Just
has(obj, 'a');

// Perkakas
hasProp(obj, 'a');
```


## Sitemap

See the full [sitemap](https://vinicunca.dev/sitemap.md) for all pages.
