JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 40
  • Score
    100M100P100Q60511F
  • License ISC

Pause/resume execution of an object's methods

Package Exports

  • pause-methods

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pause-methods) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pause-fn

npm version Build Status codecov

A Node.js module to pause/resume execution of a function

const {pause, resume} = require('pause-fn');
const paused = pause(process.stdout.write);

paused(1); //=> prints nothing
paused(2, 3); //=> prints nothing

resume(paused); //=> prints '1' and '2 3'

Installation

Use npm.

npm install pause-fn

API

const pauseFn = require('pause-fn');

pauseFn(func)

func: Function
Return: Function

runEslint(['some', 'invalid', 'files']);
/* throws an Error: ESLint found problems in 2 files.

/Users/shinnn/invalid/a.js
1:1  error  Parsing error: Unexpected token }

/Users/shinnn/files/b.js
1:1  error  'v' is not defined  no-undef
2:2  error  Missing semicolon   semi

✖ 3 problems (3 errors, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
`*/

License

ISC License © 2019 Shinnosuke Watanabe