Skip to content

Instantly share code, notes, and snippets.

@kolodny
Created December 13, 2015 06:44
Show Gist options
  • Save kolodny/8bc9d82cf0f147161a9a to your computer and use it in GitHub Desktop.
Save kolodny/8bc9d82cf0f147161a9a to your computer and use it in GitHub Desktop.
{
"presets": ["es2015", "stage-0"]
}
const { foo } = { foo: 'bar' };
/* istanbul ignore next */
export default (foo, ...args) => {
console.log(foo, ...args);
}
const objectWithoutProperties = (obj, keys) => {
var target = {};
for (var i in obj) {
/* istanbul ignore if */
if (keys.indexOf(i) >= 0) continue;
/* istanbul ignore if */
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
}
const baz = objectWithoutProperties(foo, [])
{
"name": "nyc-ignore-example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"coverage": "nyc --require babel-register --reporter=lcov --reporter=text-lcov node ./ && nyc report"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-preset-es2015": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"nyc": "^5.0.0"
}
}
@kolodny
Copy link
Author

kolodny commented Dec 13, 2015

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment