Omit property variable when using object destructuring

A possible way is to use // eslint-disable-next-line no-unused-vars e.g. // eslint-disable-next-line no-unused-vars const { a, …rest } = initObject Or by using ignoreRestSiblings The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to “omit” properties from an object, but by default the sibling properties are marked as “unused”. … Read more

Can ES6’s module loader also load assets (html/css/…)

If you use SystemJS then you can load assets by using plugins: // Will generate a <link> element for my/file.css System.import(‘my/file.css!’) .then(() => console.log(‘CSS file loaded’)); Alternatively, you can use an import statement. This will make sure that the CSS file is loaded before the your script executes: import ‘my/file.css!’; Finally, you can retrieve the … Read more