source: imaps-frontend/node_modules/inline-style-prefixer/lib/utils/addNewValuesOnly.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 427 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = addNewValuesOnly;
7function addIfNew(list, value) {
8 if (list.indexOf(value) === -1) {
9 list.push(value);
10 }
11}
12
13function addNewValuesOnly(list, values) {
14 if (Array.isArray(values)) {
15 for (var i = 0, len = values.length; i < len; ++i) {
16 addIfNew(list, values[i]);
17 }
18 } else {
19 addIfNew(list, values);
20 }
21}
Note: See TracBrowser for help on using the repository browser.