field-descriptions
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -0,0 +0,0 @@ export interface FDobject { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FD = exports.GenMD = void 0; | ||
const lodash_1 = require("lodash"); | ||
const underline = "__"; | ||
@@ -25,6 +24,4 @@ const strikethrough = "~~"; | ||
function GenMD(text, options = GenMDOptionsDefault) { | ||
const sep = lodash_1.keys(lodash_1.pickBy(options)) | ||
.map((value) => { | ||
return edits[value]; | ||
}) | ||
const sep = Object.keys(pickBy(options)) | ||
.map((value) => edits[value]) | ||
.join(""); | ||
@@ -34,2 +31,11 @@ return sep + text + reverseString(sep); | ||
exports.GenMD = GenMD; | ||
function pickBy(object) { | ||
const obj = {}; | ||
for (const key in object) { | ||
if (object[key]) { | ||
obj[key] = object[key]; | ||
} | ||
} | ||
return obj; | ||
} | ||
function FD(values, options = { | ||
@@ -36,0 +42,0 @@ nameEdits: GenMDOptionsDefault, |
{ | ||
"name": "field-descriptions", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Make key-value data easier to display in discord embeds", | ||
"main": "lib/index.js", | ||
"main": "index.js", | ||
"types": "lib", | ||
@@ -23,10 +23,6 @@ "scripts": { | ||
"devDependencies": { | ||
"@types/lodash": "^4.14.165", | ||
"discord-webhook-node": "^1.1.8", | ||
"ts-node-dev": "^1.1.1", | ||
"typescript": "^4.1.2" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.17.20" | ||
} | ||
} |
@@ -0,0 +0,0 @@ # Install |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8328
0
3
70
- Removedlodash@^4.17.20
- Removedlodash@4.17.21(transitive)