|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
383 bytes
|
| Line | |
|---|
| 1 | define(['./_deepGet', './_toPath'], function (_deepGet, _toPath) {
|
|---|
| 2 |
|
|---|
| 3 | // Creates a function that, when passed an object, will traverse that object’s
|
|---|
| 4 | // properties down the given `path`, specified as an array of keys or indices.
|
|---|
| 5 | function property(path) {
|
|---|
| 6 | path = _toPath(path);
|
|---|
| 7 | return function(obj) {
|
|---|
| 8 | return _deepGet(obj, path);
|
|---|
| 9 | };
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | return property;
|
|---|
| 13 |
|
|---|
| 14 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.