Skip to content

Commit

Permalink
chore: rename lodash import
Browse files Browse the repository at this point in the history
  • Loading branch information
azech-hqs committed Nov 11, 2022
1 parent d7c6c18 commit afcad57
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/context/providers/espresso/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "@exabyte-io/code.js/dist/context";
import { Made } from "@exabyte-io/made.js";
import { PERIODIC_TABLE } from "@exabyte-io/periodic-table.js";
import _ from "lodash";
import lodash from "lodash";
import { mix } from "mixwith";
import s from "underscore.string";

Expand Down Expand Up @@ -122,7 +122,9 @@ export class QEPWXContextProvider extends mix(ExecutableContextProvider).with(

static symbolToAtomicSpecie(symbol, pseudo) {
const el = PERIODIC_TABLE[symbol];
const filename = pseudo ? _.get(pseudo, "filename", s.strRightBack(pseudo.path, "/")) : "";
const filename = pseudo
? lodash.get(pseudo, "filename", s.strRightBack(pseudo.path, "/"))
: "";
return el ? s.sprintf("%s %f %s", symbol, el.atomic_mass, filename) : undefined;
}
}
Expand All @@ -146,7 +148,10 @@ export class QENEBContextProvider extends mix(ExecutableContextProvider).with(
});

return {
..._.omit(PWXContexts[0], ["ATOMIC_POSITIONS", "ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS"]),
...lodash.omit(PWXContexts[0], [
"ATOMIC_POSITIONS",
"ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS",
]),
FIRST_IMAGE: PWXContexts[0].ATOMIC_POSITIONS,
LAST_IMAGE: PWXContexts[PWXContexts.length - 1].ATOMIC_POSITIONS,
INTERMEDIATE_IMAGES: PWXContexts.slice(1, PWXContexts.length - 1).map(
Expand Down

0 comments on commit afcad57

Please sign in to comment.