Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more

learning_deno

How to use

Add this to your deps file:

export {default as learnDeno } from "https://deno.land/x/learning_deno/mod.ts";

Once in your app use it like this:

import { learnDeno } from "./dep.ts";

interface Object {
    shape: string;
    type: string;
    size: number;
    emote: string;
}

const objects: Object[] = [
    {
        shape: "car",
        type: "vehicle",
        size: 12,
        emote: "๐Ÿš—"
    },
    {
        shape: "circle",
        type: "geometric",
        size: 6,
        emote: "๐Ÿ”ด"
    },
    {
        shape: "triangle",
        type: "geometric",
        size: 5,
        emote: "๐Ÿ”บ"
    }, {
        shape: "square",
        type: "geometric",
        size: 7,
        emote: "๐ŸŸฅ"
    }
];

const objectGroups = learnDeno.countBy(objects, 'type'); // Output: {geometric: 3, vehicle: 1 }

Module host

References

Authors

  • Eric Madureira
  • Sebastian Lozano

Made for RollWorks HackWeek 1 2021.