convert-typing-name
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Convert typing name Travis CI Build Status

Convert the name of a Typescript typings package to it's npm package counterpart.

NPM Badge

Install

npm install convert-typing-name

Usage

const typingName = require("convert-typing-name");
 
typingName("a");
//=> "@types/a"
 
typingName("@a/b");
//=> "@types/a__b"
 
typingName.from("@types/a");
//=> "a"
 
typingName.from("@types/a__b");
//=> "@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

Migrating from 1.x

  • A minimum version of Node.js 10 is required.
  • typingName.toTyping is now typingName
  • typingName.fromTyping is now typingName.from

Package Sidebar

Install

npm i convert-typing-name

Weekly Downloads

5

Version

2.0.0

License

MIT

Unpacked Size

4.89 kB

Total Files

6

Last publish

Collaborators

  • richienb