Remove lodash.uniqueId

This commit is contained in:
venashial
2022-04-03 11:45:04 -07:00
parent 44c8574f1b
commit 3646c0d0a3
8 changed files with 11 additions and 11 deletions

View File

@@ -61,7 +61,6 @@
"cssnano": "^5.1.1",
"highlight.js": "^11.5.0",
"insane": "^2.6.2",
"lodash.uniqueid": "^4.0.1",
"marked": "^4.0.12",
"postcss": "^8.4.8",
"postcss-easy-import": "^4.0.0",

6
pnpm-lock.yaml generated
View File

@@ -17,7 +17,6 @@ specifiers:
eslint-plugin-svelte3: ^3.2.1
highlight.js: ^11.5.0
insane: ^2.6.2
lodash.uniqueid: ^4.0.1
marked: ^4.0.12
mdsvex: ^0.10.5
mdsvexamples: ^0.0.8
@@ -55,7 +54,6 @@ dependencies:
cssnano: 5.1.1_postcss@8.4.8
highlight.js: 11.5.0
insane: 2.6.2
lodash.uniqueid: 4.0.1
marked: 4.0.12
postcss: 8.4.8
postcss-easy-import: 4.0.0_postcss@8.4.8
@@ -2133,10 +2131,6 @@ packages:
resolution: {integrity: sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=}
dev: false
/lodash.uniqueid/4.0.1:
resolution: {integrity: sha1-MmjyanyI5PSxdY1nknGBTjH6WyY=}
dev: false
/lodash/4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: false

View File

@@ -14,7 +14,7 @@
export let value = ''
export let size: 'sm' | 'md' | 'lg' = 'md'
export let color: 'raised' | 'primary' | 'primary-light' | 'danger'| 'danger-light' | 'transparent'
export let color: '' | 'raised' | 'primary' | 'primary-light' | 'danger'| 'danger-light' | 'transparent' = ''
/** Show notification badge in the upper right of button */
export let badge = false

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import uniqueId from 'lodash.uniqueid'
import { uniqueId } from '../utils/uniqueId'
import IconCheck from 'virtual:icons/heroicons-outline/check'
export let checked = false;

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import uniqueId from 'lodash.uniqueid'
import { uniqueId } from '../utils/uniqueId'
export let required = false;
export let label: string;

View File

@@ -0,0 +1,6 @@
let idCounter = 0;
export function uniqueId(prefix = ''): string {
const id = ++idCounter;
return prefix + id;
}

View File

@@ -39,6 +39,7 @@
position: relative;
justify-content: flex-start;
z-index: 1;
padding: 16px;
}
&__source {

View File

@@ -2,7 +2,7 @@
<script lang="ts">
import { CheckboxVirtualList } from "omorphia";
import IconStar from 'virtual:icons/heroicons-outline/star'
import uniqueId from 'lodash.uniqueid'
import { uniqueId } from 'omorphia/utils/uniqueId'
let options = Array(100).fill({})
.map(option => ({