<commit_before>@constructor can.Observe
@inherits can.Construct
@parent canjs
@group can.Observe.plugins plugins
@test can/observe/test.html
@plugin can/observe

@description Create observable objects.

@signature `new can.Observe([props])`

@param {Object} [props] Properties and values to seed the Observe with.
@return {can.Observe} An instance of `can.Observe` with the properties from _props_.

@signature `can.Observe([name,] [staticProperties,] instanceProperties)`

Creates a new extended constructor function. 
    
This is deprecated. In CanJS 1.2, by default, calling the constructor function
without `new` will create a `new` instance. Use [can.Construct.extend can.Observe.extend] 
instead of calling the constructor to extend.


@body

`can.Observe` provides a way for you to listen for and keep track of changes
to objects. When you use the getters and setters provided by `can.Observe`,
events are fired that you can react to. `can.Observe` also has support for
working with deep properties. Observable arrays are also available with
`[can.Observe.List]`, which is based on `can.Observe`.

## Working with Observes

To create an Observe, use `new can.Observe([props])`. This will return a
copy of `props` that emits events when its properties are changed with
`[can.Observe.prototype.attr attr]`.

You can read the values of properties on Observes directly, but you should
never set them directly. You can also read property values using `attr`.
Usually, you will want to do this when creating a `[can.compute]` or when
live-binding properties in an [can.EJS EJS] template. (If you are using
[can.Mustache Mustache], you don't need to use `attr`.)

@codestart
var aName = {a: 'Alexis'},
    observe = can.Observe(aName);

// Observes are copies of data:<commit_msg>Fix code example.<commit_after>@constructor can.Observe
@inherits can.Construct
@parent canjs
@group can.Observe.plugins plugins
@test can/observe/test.html
@plugin can/observe

@description Create observable objects.

@signature `new can.Observe([props])`

@param {Object} [props] Properties and values to seed the Observe with.
@return {can.Observe} An instance of `can.Observe` with the properties from _props_.

@signature `can.Observe([name,] [staticProperties,] instanceProperties)`

Creates a new extended constructor function. 
    
This is deprecated. In CanJS 1.2, by default, calling the constructor function
without `new` will create a `new` instance. Use [can.Construct.extend can.Observe.extend] 
instead of calling the constructor to extend.


@body

`can.Observe` provides a way for you to listen for and keep track of changes
to objects. When you use the getters and setters provided by `can.Observe`,
events are fired that you can react to. `can.Observe` also has support for
working with deep properties. Observable arrays are also available with
`[can.Observe.List]`, which is based on `can.Observe`.

## Working with Observes

To create an Observe, use `new can.Observe([props])`. This will return a
copy of `props` that emits events when its properties are changed with
`[can.Observe.prototype.attr attr]`.

You can read the values of properties on Observes directly, but you should
never set them directly. You can also read property values using `attr`.
Usually, you will want to do this when creating a `[can.compute]` or when
live-binding properties in an [can.EJS EJS] template. (If you are using
[can.Mustache Mustache], you don't need to use `attr`.)

@codestart
var aName = {a: 'Alexis'},
    observe = new can.Observe(aName);

// Observes are copies of data:
{'fraction_non_alphanumeric': 0.08879551820728292, 'fraction_numerical': 0.0011204481792717086, 'mean_word_length': 4.677265500794912, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5479684', 'n_tokens_mistral': 1028, 'n_tokens_neox': 1011, 'n_words': 470}