UNPKG

@ianwalter/npm-short-name

Version:

Get the unscoped, camelCased name of a npm package

7 lines (5 loc) 184 B
import camelCase from 'camelcase' export default function npmShortName (name = '') { const parts = name.split('/') return parts.length ? camelCase(parts[parts.length - 1]) : '' }