|
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:
286 bytes
|
| Line | |
|---|
| 1 | define(['./noop', './get'], function (noop, get) {
|
|---|
| 2 |
|
|---|
| 3 | // Generates a function for a given object that returns a given property.
|
|---|
| 4 | function propertyOf(obj) {
|
|---|
| 5 | if (obj == null) return noop;
|
|---|
| 6 | return function(path) {
|
|---|
| 7 | return get(obj, path);
|
|---|
| 8 | };
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | return propertyOf;
|
|---|
| 12 |
|
|---|
| 13 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.