Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observe dot separated keys #309

Merged
merged 2 commits into from
Mar 15, 2013
Merged

Observe dot separated keys #309

merged 2 commits into from
Mar 15, 2013

Conversation

daffl
Copy link
Contributor

@daffl daffl commented Mar 12, 2013

This allows to use the API mentioned in #257 (issue also reported in #296) for keys in an Observe that contain a .:

var ob = new can.Observe();

ob.attr('a.b', 'test');
ob.attr() // -> { a: { b: 'test' } }

ob.attr({
    'a.b': 'test'
});

ob.attr() // -> { 'a.b': 'test' }

ob.attr('a.b')
// will look for 'a.b' first
// and then for ob.attr('a').attr('b')

daffl added a commit that referenced this pull request Mar 15, 2013
@daffl daffl merged commit 6c9b53b into develop Mar 15, 2013
@daffl daffl deleted the observe-dot-separator-257-296 branch March 15, 2013 00:04
@daffl daffl mentioned this pull request Mar 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant