UNPKG

@dpkit/zenodo

Version:

Fast TypeScript data management framework built on top of the Data Package standard and Polars DataFrames

19 lines (14 loc) 409 B
import type { Resource } from "@dpkit/core" import type { ZenodoResource } from "../Resource.ts" export function convertResourceToZenodo(resource: Resource) { const zenodoResource: Partial<ZenodoResource> = { key: resource.name, } if (resource.bytes) { zenodoResource.size = resource.bytes } if (resource.hash) { zenodoResource.checksum = resource.hash } return zenodoResource }