Skip to content

keyvan-m-sadeghi/babel-plugin-transform-util-promisify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version Build Status

babel-plugin-transform-util-promisify

Transforms util.promisify to a function definition for node versions < 8, automatically detects if node version >= 8 and does nothing if so.

Install

npm install babel-plugin-transform-util-promisify --save-dev

Usage

Add at the top of plugins in .babelrc:

{
  "plugins": [
    "transform-util-promisify"
    ],
    "presets": [
      ["env", {
        "targets": {
          "node": "current"
        }
      }]
    ]
}

The plugin currently transforms code only in these forms:

import { promisify } from 'util';

and

const { promisify } = require('promisify');

License

MIT

About

Transforms util.promisify for node versions < 8

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published