Skip to content

Instantly share code, notes, and snippets.

@julesbou
Created March 11, 2016 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julesbou/3e05d1814e855bbeee50 to your computer and use it in GitHub Desktop.
Save julesbou/3e05d1814e855bbeee50 to your computer and use it in GitHub Desktop.
var model1 = new Backbone.Model({ first_name: 'Jordan', last_name: 'Aslam' });
var model2 = new Backbone.Model({ first_name: 'John', last_name: 'Doe' });
console.log(model1.match(‘Jordan’)); // true
console.log(model2.match(‘Doe’)); // true
console.log(model1.match(/Jo/)); // true
console.log(model2.match(/Jo/)); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment