Skip to content

Commit

Permalink
Rename to defaultLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
suvash committed Mar 2, 2021
1 parent 7541bd0 commit 18d384a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fetchLayout, defaultLayoutName } from "./layouts";
import { fetchLayout, defaultLayout } from "./layouts";

function format(dirtyStr, dirtyOptions) {
const defaultOptions = {
layout: defaultLayoutName,
layout: defaultLayout,
};
const text = String(dirtyStr);
const options = { ...defaultOptions, ...dirtyOptions };
Expand Down Expand Up @@ -42,7 +42,7 @@ function wrapHandlerwithLayout(layout) {

function interceptElementById(dirtyIdSelector, dirtyOptions) {
const defaultOptions = {
layout: defaultLayoutName,
layout: defaultLayout,
enable: true,
};

Expand Down
2 changes: 1 addition & 1 deletion src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const layoutStore = {
traditional: traditional,
};

export const defaultLayoutName = "romanized";
export const defaultLayout = "romanized";

export function availableLayouts() {
return Object.keys(layoutStore);
Expand Down
6 changes: 3 additions & 3 deletions test/layouts.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
fetchLayout,
isValidLayout,
availableLayouts,
defaultLayoutName,
defaultLayout,
} from "../src/layouts";

describe("layouts", () => {
describe("defaultLayoutName", () => {
describe("defaultLayout", () => {
it("should be defined", () => {
expect(defaultLayoutName).to.equal("romanized");
expect(defaultLayout).to.equal("romanized");
});
});

Expand Down

0 comments on commit 18d384a

Please # to comment.