budibase/packages/builder/src/builderStore/index.js

20 lines
447 B
JavaScript
Raw Normal View History

2019-07-13 11:35:57 +02:00
import {createPackage} from "./createPackage";
import getStore from "./store";
import { last } from "lodash/fp";
const appName = last(window.location.hash.substr(1).split("/"));
export const database = getStore(appName);
export const createNewPackage = () =>
createPackage(packageInfo, database);
export const initialise = async () => {
try {
await database.initialise();
} catch(err) {
console.log(err);
}
}