Home

Awesome

is-sync-function npmjs.com The MIT License

Opposite of is-async-function. Check that given function is synchronous.

code climate standard code style travis build status coverage status dependency status

Install

npm i is-sync-function --save
npm test

Usage

For more use-cases see the tests

var isSyncFunction = require('is-sync-function')

var fs = require('fs')
isSyncFunction(fs.readFileSync) //=> true
isSyncFunction(fs.renameSync) //=> true
isSyncFunction(fs.chownSync) //=> true
isSyncFunction(fs.statSync) //=> true

isSyncFunction(fs.readFile) //=> false
isSyncFunction(fs.rename) //=> false
isSyncFunction(fs.chown) //=> false
isSyncFunction(fs.stat) //=> false

isSyncFunction(JSON.stringify) //=> true
isSyncFunction(JSON.parse) //=> true

Related

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github