Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

event subtyping #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

event subtyping #86

wants to merge 1 commit into from

Conversation

edmund-huber
Copy link

Adds event subtyping as proposed in https://github.com/square/cube/issues/59 .

@@ -8,7 +8,7 @@ var mongodb = require("mongodb"),
bisect = require("./bisect"),
ObjectID = mongodb.ObjectID;

var type_re = /^[a-z][a-zA-Z0-9_]+$/,
var type_re = /^[a-z]?[a-zA-Z0-9_]+$/,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems unrelated. Also, you've effectively changed it to /^[a-zA-Z0-9_]+$/, which means that event types can start with a number (which is bad).

@mbostock
Copy link
Collaborator

Related #59

@mbostock mbostock mentioned this pull request Jul 25, 2012
@edmund-huber
Copy link
Author

Sorry, my intent was to allow single-letter event names, but I didn't consider numbers.

@mbostock
Copy link
Collaborator

I think you could change the + to a * to fix that. I can't remember why I required two letters…

@edmund-huber
Copy link
Author

I think for the sake of clarity, I'll just leave that alone in this pull request. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants