Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

polly-text-split

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polly-text-split - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.travis.yml

2

lib/defaults.js

@@ -0,3 +1,3 @@

exports.HARD_LIMIT = 1500
exports.SOFT_LIMIT = 1000
exports.HARD_LIMIT = 1500
exports.EXTRA_SPLIT_CHARS = ',;'

@@ -17,5 +17,5 @@ const { ValidationError } = require('./errors')

*/
constructor(softLimit, hardLimit, extraSplitChars) {
constructor(hardLimit, softLimit, extraSplitChars) {
this._hardLimit = hardLimit
this._softLimit = softLimit
this._hardLimit = hardLimit
this._extraSplitChars = extraSplitChars

@@ -30,5 +30,5 @@ this._batches = []

* @param {Object} options Object with configuration options.
* @param {number=1000} options.softLimit Limit of a min batch size.
* @param {number=1500} options.hardLimit Limit of a max possible batch size.
* @param {string=",;"} [options.extraSplitChars] String with characters, that can be used as split markers. Optional parameter.
* @param {number} options.hardLimit=1500 Limit of a max possible batch size.
* @param {number} options.softLimit=1000 Limit of a min batch size.
* @param {string} [options.extraSplitChars=,;] String with characters, that can be used as split markers. Optional parameter.
*/

@@ -52,3 +52,3 @@ configure(options) {

/**
* Splits text for batches of <1500 chars or of custom size set by configure().
* Splits text for batches of <=1500 chars or of custom size set by configure().
*

@@ -102,3 +102,3 @@ * @param {string} text Text input for splitting.

if (!splitIdx) {
// no split chars found - split by nearest space char
// no split chars found - split by the nearest space char
i = this._hardLimit

@@ -117,2 +117,2 @@ while (i > this._softLimit) {

module.exports = new TextSplit(SOFT_LIMIT, HARD_LIMIT, EXTRA_SPLIT_CHARS)
module.exports = new TextSplit(HARD_LIMIT, SOFT_LIMIT, EXTRA_SPLIT_CHARS)
{
"name": "polly-text-split",
"version": "0.1.0",
"description": "Text splitter for working with AWS Polly TTS.",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"test": "tap test/*.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/oleglegun/polly-text-split.git"
},
"keywords": [
"polly",
"aws",
"tts"
],
"author": "Oleg Legun <oleg.legun@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/oleglegun/polly-text-split/issues"
},
"homepage": "https://github.com/oleglegun/polly-text-split#readme",
"devDependencies": {
"tap": "^11.1.3"
}
"name": "polly-text-split",
"version": "0.1.1",
"description": "Text splitter for working with AWS Polly TTS.",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"test": "tap test/*.js",
"cover": "tap test/*.js --coverage"
},
"repository": {
"type": "git",
"url": "git+https://github.com/oleglegun/polly-text-split.git"
},
"keywords": ["polly", "aws", "tts"],
"author": "Oleg Legun <oleg.legun@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/oleglegun/polly-text-split/issues"
},
"homepage": "https://github.com/oleglegun/polly-text-split#readme",
"devDependencies": {
"tap": "^11.1.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc