@transloadit/analyze-step
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,2 +0,36 @@ | ||
declare const _default: (step: $TSFixMe, robots: $TSFixMe, extrameta?: {}) => string; | ||
export default _default; | ||
type Condition = [value: string, operator: string, value: string]; | ||
type FileFilterStep = { | ||
accepts?: string | Condition[]; | ||
declines?: string | Condition[]; | ||
condition_type?: 'or' | 'and'; | ||
}; | ||
type StepWithDimensions = { | ||
width?: number | string; | ||
height?: number | string; | ||
crop?: { | ||
x1: number; | ||
x2: number; | ||
y1: number; | ||
y2: number; | ||
}; | ||
}; | ||
type PresetStep = { | ||
preset?: string; | ||
}; | ||
type ExtraMeta = { | ||
deviceName?: string; | ||
}; | ||
type FormatStep = { | ||
format?: string; | ||
}; | ||
type Robots = { | ||
[key: string]: { | ||
rname: string; | ||
purpose_words: string; | ||
}; | ||
}; | ||
type Step = Partial<FileFilterStep> & Partial<StepWithDimensions> & Partial<PresetStep> & Partial<FormatStep> & { | ||
[key: string]: any; | ||
}; | ||
export default function humanize(step: Step, robots: Robots, extrameta?: ExtraMeta): string; | ||
export {}; |
@@ -85,3 +85,3 @@ "use strict"; | ||
} | ||
else if (step[type] && step[type].length > 0) { | ||
else if (step[type] && Array.isArray(step[type])) { | ||
for (const [key, operator, val] of Object.values(step[type])) { | ||
@@ -247,3 +247,3 @@ const template = (0, lodash_1.clone)(templates[operator]); | ||
} | ||
exports.default = (step, robots, extrameta = {}) => { | ||
function humanize(step, robots, extrameta = {}) { | ||
let str = ``; | ||
@@ -374,3 +374,4 @@ const robot = robots[step.robot]; | ||
return str; | ||
}; | ||
} | ||
exports.default = humanize; | ||
//# sourceMappingURL=analyzeStep.js.map |
@@ -22,15 +22,14 @@ { | ||
"scripts": { | ||
"tsc": "tsc", | ||
"tsc": "tsc --build --clean && tsc --build", | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
}, | ||
"dependencies": { | ||
"@transloadit/format-duration-ms": "^0.1.2", | ||
"@transloadit/prettier-bytes": "^0.1.2", | ||
"@transloadit/format-duration-ms": "^0.1.3", | ||
"@transloadit/prettier-bytes": "^0.1.3", | ||
"inflection": "^3.0.0", | ||
"jsonpath": "1.0.2", | ||
"jsonpath-plus": "^7.2.0", | ||
"lodash": "^4.17.21" | ||
}, | ||
"version": "0.1.2", | ||
"gitHead": "5c487499031f01adcc6869b3a0b7a4ac3d7d21c0", | ||
"version": "0.1.3", | ||
"gitHead": "b9159b6f037336d9325656c35b9b15023d5c1ce7", | ||
"devDependencies": { | ||
@@ -37,0 +36,0 @@ "@types/jsonpath": "^0.2.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77695
5
593
- Removedjsonpath@1.0.2
- Removeddeep-is@0.1.4(transitive)
- Removedescodegen@1.14.3(transitive)
- Removedesprima@1.2.24.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedjsonpath@1.0.2(transitive)
- Removedlevn@0.3.0(transitive)
- Removedoptionator@0.8.3(transitive)
- Removedprelude-ls@1.1.2(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedstatic-eval@2.0.2(transitive)
- Removedtype-check@0.3.2(transitive)
- Removedunderscore@1.7.0(transitive)
- Removedword-wrap@1.2.5(transitive)