Skip to content

Commit 79fbdfa

Browse files
Change to lodash
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
1 parent a7a91f7 commit 79fbdfa

File tree

3 files changed

+3
-160
lines changed

3 files changed

+3
-160
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
"html-entities": "1.3.1",
4646
"proxy-agent": "^6.4.0",
4747
"zxcvbn": "^4.4.2",
48-
"semver": "^7.5.3",
49-
"text-case": "^1.2.9"
48+
"semver": "^7.5.3"
5049
},
5150
"resolutions": {
5251
"selenium-webdriver": "4.10.0",

public/apps/resource-sharing/resource-sharing-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
EuiSuperSelectOption,
4040
} from '@elastic/eui';
4141

42-
import { titleCase } from 'text-case';
42+
import _ from 'lodash';
4343

4444
import type { CoreStart } from '../../../../../src/core/public';
4545

@@ -546,7 +546,7 @@ export const ResourceSharingPanel: React.FC<Props> = ({ api, toasts }) => {
546546
const options = raw
547547
.map((t) => ({
548548
value: t.type,
549-
text: titleCase(t.type),
549+
text: _.startCase(t.type),
550550
accessLevels: t.action_groups,
551551
}))
552552
// sort alphabetically by text (and by value if text is equal)

yarn.lock

Lines changed: 0 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -4492,162 +4492,6 @@ terser@^4.1.2:
44924492
source-map "~0.6.1"
44934493
source-map-support "~0.5.12"
44944494

4495-
text-camel-case@1.2.9:
4496-
version "1.2.9"
4497-
resolved "https://registry.yarnpkg.com/text-camel-case/-/text-camel-case-1.2.9.tgz#2dffe736f549731df50a9b0421f7ffd7a8e36c26"
4498-
integrity sha512-wKYs9SgRxYizJE1mneR7BbLNlGw2IYzJAS8XwkWIry0CTbO1gvvPkFsx5Z1/hr+VqUaBqx9q3yKd30HpZLdMsQ==
4499-
dependencies:
4500-
text-pascal-case "1.2.9"
4501-
4502-
text-capital-case@1.2.9:
4503-
version "1.2.9"
4504-
resolved "https://registry.yarnpkg.com/text-capital-case/-/text-capital-case-1.2.9.tgz#5b1a148c95ed036e4335a6de67afbf0760a2de90"
4505-
integrity sha512-X5zV8U8pxtq2xS2t46lgAWqZdDbgWMKq03MQSNwY2CJdQCsdTNh144E2Q/q9wBxWzSBUXn+jRc9kF+Gs8/pGhA==
4506-
dependencies:
4507-
text-no-case "1.2.9"
4508-
text-upper-case-first "1.2.9"
4509-
4510-
text-case@^1.2.9:
4511-
version "1.2.9"
4512-
resolved "https://registry.yarnpkg.com/text-case/-/text-case-1.2.9.tgz#a8add96930a27396d96b2e55243ddf5a2b198bd7"
4513-
integrity sha512-zZVdA8rMcjx9zhekdUuOPZShc25UTV7W8/ddKbgbPtfCEvIiToPtWiSd2lXLSuiGMovNhJ4+Tw49xll9o9ts+Q==
4514-
dependencies:
4515-
text-camel-case "1.2.9"
4516-
text-capital-case "1.2.9"
4517-
text-constant-case "1.2.9"
4518-
text-dot-case "1.2.9"
4519-
text-header-case "1.2.9"
4520-
text-is-lower-case "1.2.9"
4521-
text-is-upper-case "1.2.9"
4522-
text-kebab-case "1.2.9"
4523-
text-lower-case "1.2.9"
4524-
text-lower-case-first "1.2.9"
4525-
text-no-case "1.2.9"
4526-
text-param-case "1.2.9"
4527-
text-pascal-case "1.2.9"
4528-
text-path-case "1.2.9"
4529-
text-sentence-case "1.2.9"
4530-
text-snake-case "1.2.9"
4531-
text-swap-case "1.2.9"
4532-
text-title-case "1.2.9"
4533-
text-upper-case "1.2.9"
4534-
text-upper-case-first "1.2.9"
4535-
4536-
text-constant-case@1.2.9:
4537-
version "1.2.9"
4538-
resolved "https://registry.yarnpkg.com/text-constant-case/-/text-constant-case-1.2.9.tgz#75791de7676c14ed586f720f278ee4d7f396a6cf"
4539-
integrity sha512-Vosm6nC7Gag+JFakJHwqS9AXRNgl07j5KZ7srU9cYuKRzYwrxzeJ4RpEogRBNHw7CfmOm0j5FGEznblWtu7pIw==
4540-
dependencies:
4541-
text-no-case "1.2.9"
4542-
text-upper-case "1.2.9"
4543-
4544-
text-dot-case@1.2.9:
4545-
version "1.2.9"
4546-
resolved "https://registry.yarnpkg.com/text-dot-case/-/text-dot-case-1.2.9.tgz#302f95c905004be1543cc0d791d2b492098eaa93"
4547-
integrity sha512-N83hsnvGdSO9q9AfNSB9Cy1LFDNN2MCx53LcxtaPoDWPUTk47fv0JlvIY1tgY0wyzCiThF03kVj3jworvAOScA==
4548-
dependencies:
4549-
text-no-case "1.2.9"
4550-
4551-
text-header-case@1.2.9:
4552-
version "1.2.9"
4553-
resolved "https://registry.yarnpkg.com/text-header-case/-/text-header-case-1.2.9.tgz#b8a3fccb229a9abb6757951ca1bc81f1ed71b656"
4554-
integrity sha512-TqryEKcYisQAfWLbtT3xPnZlMZ/mySO1uS+LUg+B0eNuqgETrSzVpXIUj5E6Zf/EyJHgpZf4VndbAXtOMJuT4w==
4555-
dependencies:
4556-
text-capital-case "1.2.9"
4557-
4558-
text-is-lower-case@1.2.9:
4559-
version "1.2.9"
4560-
resolved "https://registry.yarnpkg.com/text-is-lower-case/-/text-is-lower-case-1.2.9.tgz#eb6abdbf0dea60895bd92733e6d18111f2585400"
4561-
integrity sha512-cEurrWSnYVYqL8FSwl5cK4mdfqF7qNDCcKJgXI3NnfTesiB8umxAhdlQoErrRYI1xEvYr2WN0MI333EehUhQjg==
4562-
4563-
text-is-upper-case@1.2.9:
4564-
version "1.2.9"
4565-
resolved "https://registry.yarnpkg.com/text-is-upper-case/-/text-is-upper-case-1.2.9.tgz#b20c21a7c43040a56080fc9105e9365d0cf123da"
4566-
integrity sha512-HxsWr3VCsXXiLlhD0c+Ey+mS2lOTCiSJbkepjaXNHl2bp33KiscQaiG0qLwQmmpZQm4SJCg2s9FkndxS0RNDLQ==
4567-
4568-
text-kebab-case@1.2.9:
4569-
version "1.2.9"
4570-
resolved "https://registry.yarnpkg.com/text-kebab-case/-/text-kebab-case-1.2.9.tgz#e0f1ede2cf95f48a1358f0518670e398c31f8b9d"
4571-
integrity sha512-nOUyNR5Ej2B9D/wyyXfwUEv26+pQuOb1pEX+ojE37mCIWo8QeOxw5y6nxuqDmG7NrEPzbO6265UMV+EICH13Cw==
4572-
dependencies:
4573-
text-no-case "1.2.9"
4574-
4575-
text-lower-case-first@1.2.9:
4576-
version "1.2.9"
4577-
resolved "https://registry.yarnpkg.com/text-lower-case-first/-/text-lower-case-first-1.2.9.tgz#424a9bb1f72c7a23aad692f7186faff663d13452"
4578-
integrity sha512-iiphHTV7PVH0MljrEQUA9iBE7jfDpXoi4RQju3WzZU3BRVbS6540cNZgxR19hWa0z6z/7cJTH0Ls9LPBaiUfKg==
4579-
4580-
text-lower-case@1.2.9:
4581-
version "1.2.9"
4582-
resolved "https://registry.yarnpkg.com/text-lower-case/-/text-lower-case-1.2.9.tgz#e2d4f29780e9100748553cfde3a5d93d51955d94"
4583-
integrity sha512-53AOnDrhPpiAUQkgY1SHleKUXp/u7GsqRX13NcCREZscmtjLLJ099uxMRjkK7q2KwHkFYVPl9ytkQlTkTQLS0w==
4584-
4585-
text-no-case@1.2.9:
4586-
version "1.2.9"
4587-
resolved "https://registry.yarnpkg.com/text-no-case/-/text-no-case-1.2.9.tgz#49bcf50e134463a478f810512b65d599a49a1a91"
4588-
integrity sha512-IcCt328KaapimSrytP4ThfC8URmHZb2DgOqCL9BYvGjpxY2lDiqCkIQk9sClZtwcELs2gTnq83a7jNc573FTLA==
4589-
dependencies:
4590-
text-lower-case "1.2.9"
4591-
4592-
text-param-case@1.2.9:
4593-
version "1.2.9"
4594-
resolved "https://registry.yarnpkg.com/text-param-case/-/text-param-case-1.2.9.tgz#9c0ff5acbd300567cbb8bd4e55035c75db45ba2a"
4595-
integrity sha512-nR/Ju9amY3aQS1en2CUCgqN/ZiZIVdDyjlJ3xX5J92ChBevGuA4o9K10fh3JGMkbzK97Vcb+bWQJ4Q+Svz+GyQ==
4596-
dependencies:
4597-
text-dot-case "1.2.9"
4598-
4599-
text-pascal-case@1.2.9:
4600-
version "1.2.9"
4601-
resolved "https://registry.yarnpkg.com/text-pascal-case/-/text-pascal-case-1.2.9.tgz#36e834f3fd018c496fb044b27220477a2e9c7e3b"
4602-
integrity sha512-o6ZxMGjWDTUW54pcghpXes+C2PqbYRMdU5mHrIhueb6z6nq1NueiIOeCUdrSjN/3wXfhCmnFjK7/d9aRGZNqSg==
4603-
dependencies:
4604-
text-no-case "1.2.9"
4605-
4606-
text-path-case@1.2.9:
4607-
version "1.2.9"
4608-
resolved "https://registry.yarnpkg.com/text-path-case/-/text-path-case-1.2.9.tgz#3d92d4df019c54b7c8e376d92542a6bfc63cf7e0"
4609-
integrity sha512-s8cJ6r5TkJp5ticXMgtxd7f12odEN4d1CfX5u4aoz6jcUtBR2lDqzIhVimkqWFMJ4UKPSrmilUha8Xc2BPi+ow==
4610-
dependencies:
4611-
text-dot-case "1.2.9"
4612-
4613-
text-sentence-case@1.2.9:
4614-
version "1.2.9"
4615-
resolved "https://registry.yarnpkg.com/text-sentence-case/-/text-sentence-case-1.2.9.tgz#6f86b335a3d74a232c3820e4414cc5f4feba4f69"
4616-
integrity sha512-/G/Yi5kZfUa1edFRV4O3lGZAkbDZTFvlwW8CYfH7szkEGe2k2MYEYbOyAkGRVQEGV6V6JiuUAaP3VS9c1tB6nQ==
4617-
dependencies:
4618-
text-no-case "1.2.9"
4619-
text-upper-case-first "1.2.9"
4620-
4621-
text-snake-case@1.2.9:
4622-
version "1.2.9"
4623-
resolved "https://registry.yarnpkg.com/text-snake-case/-/text-snake-case-1.2.9.tgz#b34dc6d83b08d1687b0bac37b40067f21a2c7ccb"
4624-
integrity sha512-+ZrqK19ynF/TLQZ7ynqVrL2Dy04uu9syYZwsm8PhzUdsY3XrwPy6QiRqhIEFqhyWbShPcfyfmheer5UEQqFxlw==
4625-
dependencies:
4626-
text-dot-case "1.2.9"
4627-
4628-
text-swap-case@1.2.9:
4629-
version "1.2.9"
4630-
resolved "https://registry.yarnpkg.com/text-swap-case/-/text-swap-case-1.2.9.tgz#4472c950208ed5141ae14ddb50b32ccfd3ea288a"
4631-
integrity sha512-g5fp12ldktYKK9wdHRMvvtSCQrZYNv/D+ZGLumDsvAY4q9T5bCMO2IWMkIP1F5gVQrysdHH6Xv877P/pjUq1iw==
4632-
4633-
text-title-case@1.2.9:
4634-
version "1.2.9"
4635-
resolved "https://registry.yarnpkg.com/text-title-case/-/text-title-case-1.2.9.tgz#2d74d99422f57acba392d32735a79f6badef814c"
4636-
integrity sha512-RAtC9cdmPp41ns5/HXZBsaQg71BsHT7uZpj2ojTtuFa8o2dNuRYYOrSmy5YdLRIAJQ6WK5hQVpV3jHuq7a+4Tw==
4637-
dependencies:
4638-
text-no-case "1.2.9"
4639-
text-upper-case-first "1.2.9"
4640-
4641-
text-upper-case-first@1.2.9:
4642-
version "1.2.9"
4643-
resolved "https://registry.yarnpkg.com/text-upper-case-first/-/text-upper-case-first-1.2.9.tgz#26724ab75b2e18ad2a3afa0da742f03ef6bedc3e"
4644-
integrity sha512-wEDD1B6XqJmEV+xEnBJd+2sBCHZ+7fvA/8Rv/o8+dAsp05YWjYP/kjB8sPH6zqzW0s6jtehIg4IlcKjcYxk2CQ==
4645-
4646-
text-upper-case@1.2.9:
4647-
version "1.2.9"
4648-
resolved "https://registry.yarnpkg.com/text-upper-case/-/text-upper-case-1.2.9.tgz#a23ad1126e4fa36b04bca0e138d06c4a05dffd14"
4649-
integrity sha512-K/0DNT7a4z8eah2spARtoJllTZyrNTo6Uc0ujhN/96Ir9uJ/slpahfs13y46H9osL3daaLl3O7iXOkW4xtX6bg==
4650-
46514495
throttleit@^1.0.0:
46524496
version "1.0.1"
46534497
resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.1.tgz#304ec51631c3b770c65c6c6f76938b384000f4d5"

0 commit comments

Comments
 (0)