Skip to content

Instantly share code, notes, and snippets.

View thymikee's full-sized avatar
🙈
.

Michał Pierzchała thymikee

🙈
.
View GitHub Profile
@thymikee
thymikee / object-omit.js
Last active July 12, 2016 11:37
Omits keys from JS object
/**
* Omits keys from object functional style.
*
* @param {object} obj – object to omit keys from.
* @param {string} ...keys – array of string keys to extract from object.
* @return {object} – new `obj` without `keys`.
*
* Example:
* omit({ a: 1, b: 2, c: 3, x: 4, y: 5 }, 'a', 'x') returns { b: 2, c: 3, y: 5 }
*