How to use lowercase-keys - 2 common examples

To help you get started, we’ve selected a few lowercase-keys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lukechilds / responselike / test / responselike.js View on Github external
test('response has expected properties', t => {
	const response = new Response(f.statusCode, f.headers, f.body, f.url);
	t.is(response.statusCode, f.statusCode);
	t.deepEqual(response.headers, lowercaseKeys(f.headers));
	t.is(response.body, f.body);
	t.is(response.url, f.url);
});
github styleguidist / react-styleguidist / src / loaders / utils / parseExample.js View on Github external
}, {});
		} else {
			try {
				example.settings = JSON.parse(modifiers);
			} catch (err) {
				return {
					error: `Cannot parse modifiers for "${modifiers}". Use space-separated strings or JSON:\n\n${DOCS_DOCUMENTING}`,
				};
			}
		}
	}

	const updatedExample = updateExample(example);
	return {
		...updatedExample,
		settings: lowercaseKeys(updatedExample.settings),
	};
}

lowercase-keys

Lowercase the keys of an object

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis

Popular lowercase-keys functions