Crafty = function (selector) {
        return new Crafty.fn.init(selector);
    }
@
#Crafty
@category Core
Select a set of or single entities by components or an entity's ID.

Crafty uses syntax similar to jQuery by having a selector engine to select entities by their components.

@example
~~~
   Crafty("MyComponent")
   Crafty("Hello 2D Component")
   Crafty("Hello, 2D, Component")
~~~

The first selector will return all entities that have the component `MyComponent`. The second will return all entities that have `Hello` and `2D` and `Component` whereas the last will return all entities that have at least one of those components (or).

~~~
  Crafty("*")
~~~
Passing `*` will select all entities.

~~~
  Crafty(1)
~~~
Passing an integer will select the entity with that `ID`.

Finding out the `ID` of an entity can be done by returning the property `0`.
~~~
   var ent = Crafty.e("2D");
   ent[0]; //ID
~~~