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

Support chaining of map accessor [][] for each non-object in array #2

Open
northamerican opened this issue May 31, 2016 · 0 comments
Open

Comments

@northamerican
Copy link
Owner

These two tests describe the functionality:

test.skip('arr[].a[][] = x', t => {
    let arr = [{
        a: [10, 15]
    }, {
        a: [20, 25]
    }];

    arr[mapAccessorName].a[mapAccessorName][mapAccessorName] = 5;

    t.deepEqual(arr, [{
        a: [5, 5]
    }, {
        a: [5, 5]
    }]);
});
test.skip('arr[].a[][](n => x)', t => {
    let arr = [{
        a: [10, 15]
    }, {
        a: [20, 25]
    }];

    arr[mapAccessorName].a[mapAccessorName][mapAccessorName](n => n * 2);

    t.deepEqual(arr, [{
        a: [20, 30]
    }, {
        a: [40, 50]
    }]);
});
@northamerican northamerican changed the title Support chaining of map accessor [][] for running method on array of array Support chaining of map accessor [][] each non-object in array May 31, 2016
@northamerican northamerican changed the title Support chaining of map accessor [][] each non-object in array Support chaining of map accessor [][] for each non-object in array May 31, 2016
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

No branches or pull requests

1 participant