switch to lodash-es

This commit is contained in:
Jake Potrebic 2020-09-29 17:41:00 -07:00
parent 18790a48ae
commit 45bfd3290d
No known key found for this signature in database
GPG Key ID: 7C58557EC9C421F8
6 changed files with 11 additions and 7 deletions

View File

@ -24,6 +24,7 @@
"highlight.js": "^10.2.0",
"jquery": "3.5.1",
"lodash": "4.17.20",
"lodash-es": "^4.17.15",
"moment": "^2.29.0",
"popper.js": "^1.16.1",
"query-string": "6.13.1",

View File

@ -94,7 +94,7 @@ import ProjectList from './components/ProjectList';
import queryString from 'query-string';
import { clearFromDefaults } from './utils';
import { Category, Platform, SortOptions } from './enums';
import debounce from 'lodash/debounce';
import { debounce } from 'lodash-es';
function defaultData() {
return {

View File

@ -52,7 +52,7 @@
</div>
</template>
<script>
import _ from 'lodash';
import { difference, remove } from 'lodash-es';
import axios from 'axios';
export default {
@ -81,7 +81,7 @@ export default {
this.inputs[platform] = '';
},
removeVersion(versions, version) {
_.remove(versions, v => v === version);
remove(versions, v => v === version);
this.changesMade = true;
},
save() {
@ -89,8 +89,8 @@ export default {
const removals = {};
for (const platform in this.platforms) {
const versions = this.data.find(o => o.platform === platform.toLowerCase()).versions;
additions[platform] = _.difference(versions, this.platforms[platform]);
removals[platform] = _.difference(this.platforms[platform], versions);
additions[platform] = difference(versions, this.platforms[platform]);
removals[platform] = difference(this.platforms[platform], versions);
}
let hasChanges = false;
for (const platform in this.platforms) {

View File

@ -121,7 +121,7 @@ import { clearFromEmpty, numberWithCommas } from '@/utils';
import { Category, Platform, Visibility } from '@/enums';
import Pagination from './Pagination';
import Icon from './Icon';
import debounce from 'lodash/debounce';
import { debounce } from 'lodash-es';
import { API } from '@/api';
export default {

View File

@ -1,4 +1,7 @@
import { createApp } from 'vue';
import $ from 'jquery';
import UserProfile from '@/UserProfile';
$.ajaxSetup(window.ajaxSettings);
createApp(UserProfile).mount('#user-profile');

View File

@ -6175,7 +6175,7 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
lodash-es@^4.2.1:
lodash-es@^4.17.15, lodash-es@^4.2.1:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==