Convert the name of a Typescript typings package to it's npm package counterpart.
Install
npm install convert-typing-name
Usage
const typingName = ; ;//=> "@types/a" ;//=> "@types/a__b" typingName;//=> "a" typingName;//=> "@a/b"
API
typingName(name)
Convert the name of a npm package to it's Typescript typings package counterpart.
name
Type: string
The npm package name to convert.
typingName.from(name)
Convert the name of a Typescript typings package to it's npm package counterpart.
name
Type: string
The typings package name to convert.
Similar
- parse-pkg-name - Parse and stringify package names.
Migrating from 1.x
- A minimum version of Node.js 10 is required.
typingName.toTyping
is nowtypingName
typingName.fromTyping
is nowtypingName.from