1.0.6 • Published 6 years ago

fourdollar.promisify v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

fourdollar.promisify

Install

$ yarn add fourdollar.promisify

Usage

import promisify from 'fourdollar.promisify'
import {readFile} from 'fs'

async function readMe() {
  const readFile_ = promisify<(filename: string) => Promise<Buffer>>(readFile)
  return await readFile_(__dirname + '/promisify.ts')
}

readMe().then((buffer) => {
  console.log(buffer.toString())
})

License

Copyright (c) bynaki. All rights reserved.

Licensed under the MIT License.