зеркало из https://github.com/microsoft/rnx-kit.git
57013d2191
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
test | ||
CHANGELOG.md | ||
README.md | ||
eslint.config.js | ||
package.json | ||
properties.d.ts | ||
properties.js | ||
tsconfig.json |
README.md
@rnx-kit/tools-language
@rnx-kit/tools-language
is a collection of supplemental JavaScript functions
and types.
You can import the entire package, or, to save space, import individual categories:
import * as tools from "@rnx-kit/tools-language";
Category | Function | Description |
---|---|---|
properties | hasProperty(obj, property) |
Returns whether property exists in obj . |
properties | keysOf(obj) |
Returns the names of the enumerable string properties of an object. Equivalent to calling Object.keys() , but type safe. |
properties | pickValues(obj, keys, names) |
Pick the value for each key property from obj and return each one in a new object. If names are given, use them in the new object, instead of keys . |