Skip to content

Commit

Permalink
Merge pull request #26 from zonkyio/native-array-prototype-includes
Browse files Browse the repository at this point in the history
Use native Array.prototype.includes
  • Loading branch information
bobisjan committed Dec 26, 2018
2 parents 06fd47e + 8065b66 commit ebfdf27
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 40 deletions.
3 changes: 1 addition & 2 deletions lib/generate-browserconfig-from-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = generateBrowserconfigFromConfiguration;

const xmlbuilder = require('xmlbuilder');
const hasTarget = require('./has-target');
const includes = require('./utils/includes');

const ALLOWED_ICON_ELEMENTS = [
'square70x70logo',
Expand Down Expand Up @@ -40,7 +39,7 @@ function constructTile(icons, color) {
const tile = {};

icons.forEach(function(icon) {
if (!includes(ALLOWED_ICON_ELEMENTS, icon.element)) {
if (!ALLOWED_ICON_ELEMENTS.includes(icon.element)) {
throw new Error(`The 'element' property of the icon for browserconfig.xml must be one of ${ALLOWED_ICON_ELEMENTS.join(', ')}`);
}

Expand Down
20 changes: 0 additions & 20 deletions lib/utils/includes.js

This file was deleted.

18 changes: 0 additions & 18 deletions node-tests/unit/utils/includes-test.js

This file was deleted.

0 comments on commit ebfdf27

Please sign in to comment.