Skip to content

Commit a6367f5

Browse files
authored
Correct the usage of lodash (LeetCode-OpenSource#242)
1 parent ab33742 commit a6367f5

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

package-lock.json

Lines changed: 13 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
"devDependencies": {
310310
"@types/fs-extra": "5.0.0",
311311
"@types/highlight.js": "^9.12.3",
312-
"@types/lodash.kebabcase": "^4.1.5",
312+
"@types/lodash": "^4.14.123",
313313
"@types/markdown-it": "0.0.7",
314314
"@types/mocha": "^2.2.42",
315315
"@types/node": "^7.0.43",
@@ -322,7 +322,6 @@
322322
"fs-extra": "^6.0.1",
323323
"highlight.js": "^9.15.6",
324324
"lodash": "^4.17.11",
325-
"lodash.kebabcase": "^4.1.1",
326325
"markdown-it": "^8.4.2",
327326
"require-from-string": "^2.0.2",
328327
"vsc-leetcode-cli": "2.6.2"

src/utils/problemUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) jdneo. All rights reserved.
22
// Licensed under the MIT license.
33

4-
import kebabCase = require("lodash.kebabcase");
4+
import * as _ from "lodash";
55
import { IProblem, langExt } from "../shared";
66

77
export function genFileExt(language: string): string {
@@ -13,7 +13,7 @@ export function genFileExt(language: string): string {
1313
}
1414

1515
export function genFileName(node: IProblem, language: string): string {
16-
const slug: string = kebabCase(node.name);
16+
const slug: string = _.kebabCase(node.name);
1717
const ext: string = genFileExt(language);
1818
return `${node.id}.${slug}.${ext}`;
1919
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy