value-from-record
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

README.md

install

yarn add value-from-record
yarn-tool add value-from-record
yt add value-from-record
import valueFromRecord, { keyFromRecord } from '../index';

const record = {
	Path: 'value of Path',
	path: 'value of path',
} as const

let actual;
let expected;

actual = keyFromRecord('PaTh', record);
expected = 'Path';

expect(actual).toStrictEqual(expected);

actual = valueFromRecord('PaTh', record);
expected = record['Path'];

expect(actual).toStrictEqual(expected);

Package Sidebar

Install

npm i value-from-record

Weekly Downloads

120

Version

3.0.4

License

ISC

Unpacked Size

90.4 kB

Total Files

16

Last publish

Collaborators

  • bluelovers