Code Monkey home page Code Monkey logo

multi-index's Introduction

2024-04-01:

The new lakeFS TDD / SemVer development methodology is out! And this text might get it as a hit when searching for semver tdd.

I might do almost any online coding task for a value-less freebie, if it sounds cool. However I may complain about the freebie.

🔗 Contact

GitHub                 LinkedIn                 Twitter

❗ Pronouns

He/him/his, הוא/שלו.

✈️ Tourism

I like to travel. Right now I cannot, so here's a 2000 year old drawing of a hyena. hyena from burial cave in Beit Guvrin

👅 Languages

In chronological order, with "*" indicating proficiency: *Hebrew, *English, BASIC, Pascal, *C, Lisp, Scheme, Forth, Fortran77, Perl, C++, *Java, Python, *JavaScript, *TypeScript, Go, Scala. Smatterings of many other human and machine language.

📜 ariels' Law

Given sufficiently many if statements addressing sufficiently complex special cases, any algorithm can be made to appear to work.

multi-index's People

Contributors

arielshaqed avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

multi-index's Issues

Index definition way on JavaScript

https://github.com/arielshaqed/multi-index#indices

Said as follows:

Or in JavaScript, just don't add types to the functions:

const byId = uniqueIndex({ id } => id, 'by id').on(c);
const byNickname = nonuniqueIndex({ nickname } => nickname, 'by nickname').on(c);

I got a syntax error. It seems that it is not correct JavaScript.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
I think that it should be as follows:

const byId = uniqueIndex((v) => v.id, 'by id').on(c);
const byNickname = nonuniqueIndex((v) => v.nickname, 'by nickname').on(c);

One to many non unique indexes?

Is it possible to also add a nonUniqueIndex for array types like below?

interface Contact {
  id: string; // unique
  name: string;
  nickname: string;
  phoneNumbers: string[];
}

const c = new Container<Contact>();
const phNumbers = nonUniqueIndexMulti({ phoneNumbers }: Contact => phoneNumbers, 'by numbers').on(c);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.