Skip to content

Instantly share code, notes, and snippets.

@kriszyp
Forked from deanlandolt/instanceofcheck.js
Created March 1, 2010 21:00
Show Gist options
  • Save kriszyp/318799 to your computer and use it in GitHub Desktop.
Save kriszyp/318799 to your computer and use it in GitHub Desktop.
// simple repl test
var test = require("model").Model("test", require("store/js-file").JSFile(),
{
properties: {
foo: {type: "string"},
bar: {type: "integer", optional: true}
},
prototype: {}
}
);
test.put({id: "a", foo: "foo"});
var a = test.get("a");
print(a instanceof test);
// false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment