From 55f290ea7c68e9918eedb4743815d519d9a20de7 Mon Sep 17 00:00:00 2001 From: anseki Date: Sun, 22 Feb 2015 23:45:24 +0900 Subject: [PATCH] Add: setBufferSize to README --- README.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 825b823..2913715 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,14 @@ readlineSync.setPrompt('> '.bold.red); command = readlineSync.prompt(); ``` +### setBufferSize + +```js +currentBufferSize = readlineSync.setBufferSize([newBufferSize]) +``` + +When readlineSync reads from TTY directly (without reading by shell), a size `newBufferSize` buffer is used. Even if the user's response exceeds it, it's usually no problem, because the buffer is used repeatedly. But, some platforms's TTY may not accept user's response that is too long. And set a enough size. Defaults to 1024. + ## Options An `options` Object can be specified to `prompt` method and `question` method. This Object can have following properties. @@ -213,6 +221,7 @@ Why did I choose it? : + I think that the security is important more than the speed. Some modules have problem about security. (Those don't protect data.) I think that the speed is not needed usually, because readlineSync is used while user types keys. ## Release History + * 2015-02-22 v0.6.0 Add `setBufferSize()`. * 2015-02-12 v0.5.5 Support the Synchronous Process Execution of Node v0.12(v0.11). * 2015-01-27 v0.5.0 Add `options.noTrim`. * 2014-07-12 v0.4.0 Add `options.noEchoBack`. diff --git a/package.json b/package.json index 92934cb..a69347c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "readline-sync", - "version": "0.5.6", + "version": "0.6.0", "title": "readlineSync", "description": "Synchronous Readline", "keywords": [