Credits to @antfu.
import { cride } from "cride";
const foo = { name: "foo" };
const bar = 1024;
const obj = cride({ foo, bar }, [foo, bar]);
let { foo, bar } = obj;
let [foo, bar] = obj;
MIT License © 2022 Anthony Fu MIT License © 2022-2023 Ray
Create isomorphic destructurables. Credits to @antfu(https://antfu.me/posts/destructuring-with-object-or-array).
Credits to @antfu.
import { cride } from "cride";
const foo = { name: "foo" };
const bar = 1024;
const obj = cride({ foo, bar }, [foo, bar]);
let { foo, bar } = obj;
let [foo, bar] = obj;
MIT License © 2022 Anthony Fu MIT License © 2022-2023 Ray
Create isomorphic destructurables. Credits to @antfu(https://antfu.me/posts/destructuring-with-object-or-array).
MIT License