mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
13 lines
313 B
TypeScript
13 lines
313 B
TypeScript
import {Package} from '@verdaccio/types';
|
|
import _ from 'lodash';
|
|
|
|
/**
|
|
* Check whether the package metadta has enough data to be published
|
|
* @param pkg metadata
|
|
*/
|
|
|
|
export function isPublishablePackage(pkg: Package): boolean {
|
|
const keys: string[] = Object.keys(pkg);
|
|
|
|
return _.includes(keys, 'versions');
|
|
}
|