so1ve / cride

Create isomorphic destructurables. Credits to @antfu(https://antfu.me/posts/destructuring-with-object-or-array).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cride

NPM version

Credits to @antfu.

Usage

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;

License

MIT License © 2022 Anthony Fu MIT License © 2022-2023 Ray

About

Create isomorphic destructurables. Credits to @antfu(https://antfu.me/posts/destructuring-with-object-or-array).

License:MIT License


Languages

Language:TypeScript 100.0%