Documentation
@tsly/obj
into

into

Calls the given mapping with the wrapped value and returns the result.

This is the same functionality as .take(it => ...). It exists here aliased to improve readability when transforming between typescriplty contexts

import { obj } from "@tsly/obj";
import { deep } from "@tsly/deep";
 
const person = {
  name: {
    first: "John",
    last: "Smith",
  },
  info: {
    age: 23,
    state: "NY",
  },
};
 
obj(person)
  .pickKeys(["name"])
  .into(deep)
  .deepkeys.forEach((key) => console.log(key)); // "name.first", "name.last"

Edit on CodeSandbox (opens in a new tab)