PHP 8.2.30
Preview: property.js Size: 799 B
//opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/cli-table2/node_modules/lodash/utility/property.js

var baseProperty = require('../internal/baseProperty'),
    basePropertyDeep = require('../internal/basePropertyDeep'),
    isKey = require('../internal/isKey');

/**
 * Creates a function that returns the property value at `path` on a
 * given object.
 *
 * @static
 * @memberOf _
 * @category Utility
 * @param {Array|string} path The path of the property to get.
 * @returns {Function} Returns the new function.
 * @example
 *
 * var objects = [
 *   { 'a': { 'b': { 'c': 2 } } },
 *   { 'a': { 'b': { 'c': 1 } } }
 * ];
 *
 * _.map(objects, _.property('a.b.c'));
 * // => [2, 1]
 *
 * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
 * // => [1, 2]
 */
function property(path) {
  return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
}

module.exports = property;

Directory Contents

Dirs: 0 × Files: 16

Name Size Perms Modified Actions
839 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
1.70 KB lrw-r--r-- 2021-09-28 11:28:36
Edit Download
444 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
355 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
40 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
1.10 KB lrw-r--r-- 2021-09-28 11:28:36
Edit Download
957 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
907 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
912 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
2.37 KB lrw-r--r-- 2021-09-28 11:28:36
Edit Download
328 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
799 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
764 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download
1.66 KB lrw-r--r-- 2021-09-28 11:28:36
Edit Download
1.68 KB lrw-r--r-- 2021-09-28 11:28:36
Edit Download
570 B lrw-r--r-- 2021-09-28 11:28:36
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).