UNPKG

548 BPlain TextView Raw
1import { AbbreviatedPackument } from '../types/abbreviated-packument';
2import { RawAbbreviatedPackument } from '../types/raw-abbreviated-packument';
3
4export function normalizeRawAbbreviatedPackument({
5 rawAbbreviatedPackument,
6}: {
7 rawAbbreviatedPackument: RawAbbreviatedPackument;
8}): AbbreviatedPackument {
9 const {
10 'dist-tags': distTags,
11 name: id,
12 modified: modifiedAt,
13 } = rawAbbreviatedPackument;
14 return {
15 ...rawAbbreviatedPackument,
16 id,
17 distTags,
18 modifiedAt,
19 };
20}