Introduction

Edit This Page

isReactive

Returns true if the given value was created or extended by mobservable. Optionally accepts a second string parameter to see whether a specific property is observable.

  1. var person = makeReactive({
  2. firstName: "Sherlock",
  3. lastName: "Holmes"
  4. });
  5. person.age = 3;
  6. isReactive(person); // true
  7. isReactive(person, "firstName"); // true
  8. isReactive(person.firstName); // false (just a string)
  9. isReactive(person, "age"); // false