This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const betterSqlite = require("better-sqlite3"); | |
| const proxify = (get, set) => new Proxy({}, { get, set }); | |
| const valuesFragment = (obj) => { | |
| const keys = Object.keys(obj); | |
| return `(${keys.join(",")}) VALUES (${keys.map((k) => "@" + k).join(",")})`; | |
| }; | |
| module.exports = (dir, options) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function commandarize(methods) { | |
| const args = process.argv.slice(2).map((arg) => { | |
| const isJson = /^\[.+\]$|^\{.+\}$/.test(arg); | |
| return isJson ? JSON.parse(arg) : arg; | |
| }); | |
| const [methodName, ...params] = args; | |
| if (methodName) { | |
| const method = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const pick = | |
| (...options) => | |
| (data) => { | |
| const result = {}; | |
| for (let option of options) { | |
| if (option.constructor.name === "Array") { | |
| option = option.reduce((acc, val) => ({ ...acc, [val]: val }), {}); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Delivery Area Explorer</title> | |
| <link | |
| rel="stylesheet" | |
| href="https://unpkg.com/leaflet@1.9.2/dist/leaflet.css" |
OlderNewer