New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

voca

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

voca - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

strip_bom.js

2

decapitalize.js

@@ -33,3 +33,3 @@ 'use strict';

if (subjectString === '') {
return subjectString;
return '';
}

@@ -36,0 +36,0 @@ return subjectString.substr(0, 1).toLowerCase() + subjectString.substr(1);

@@ -15,6 +15,7 @@ 'use strict';

/**
* Parses the tag name from html content
* Parses the tag name from html content.
*
* @param {string} tagContent The tag content
* @return {string} Returns the tag name
* @ignore
* @param {string} tagContent The tag content.
* @return {string} Returns the tag name.
*/

@@ -21,0 +22,0 @@ function parseTagName(tagContent) {

@@ -52,3 +52,3 @@ 'use strict';

if (subjectString === '') {
return subjectString;
return '';
}

@@ -55,0 +55,0 @@ return subjectString.replace(_const.REGEXP_NON_LATIN, _diacritics_map.getLatinCharacter).replace(_const.REGEXP_COMBINING_MARKS, removeCombiningMarks);

{
"name": "voca",
"version": "1.1.0",
"version": "1.2.0",
"description": "The ultimate JavaScript string library",

@@ -69,3 +69,3 @@ "homepage": "https://vocajs.com",

"codecov.io": "0.1.6",
"eslint": "3.12.2",
"eslint": "3.13.0",
"glob": "7.1.1",

@@ -80,3 +80,3 @@ "grunt": "1.0.1",

"mocha": "3.2.0",
"rollup": "0.38.0",
"rollup": "0.41.1",
"rollup-plugin-babel": "2.7.1",

@@ -87,2 +87,2 @@ "rollup-plugin-uglify": "1.0.1",

"dependencies": {}
}
}

@@ -105,3 +105,3 @@ # [![Voca JavaScript library logo][logo]][voca]

[@panzerdp](https://twitter.com/panzerdp)
[dmitri@rainsoft.io](mailto:dmitri@rainsoft.io)
[dmitri@rainsoft.io](mailto:dmitri@rainsoft.io)

@@ -114,5 +114,5 @@ ## License

[CONTRIBUTING]: https://github.com/panzerdp/voca/blob/master/.github/CONTRIBUTING.md
[voca_min_js]: https://raw.githubusercontent.com/panzerdp/voca/1.1.0/dist/voca.min.js
[source_map]: https://raw.githubusercontent.com/panzerdp/voca/1.1.0/dist/voca.min.js.map
[voca_js]: https://raw.githubusercontent.com/panzerdp/voca/1.1.0/dist/voca.js
[voca_min_js]: https://raw.githubusercontent.com/panzerdp/voca/1.2.0/dist/voca.min.js
[source_map]: https://raw.githubusercontent.com/panzerdp/voca/1.2.0/dist/voca.min.js.map
[voca_js]: https://raw.githubusercontent.com/panzerdp/voca/1.2.0/dist/voca.js
[voca]: https://vocajs.com

@@ -129,2 +129,3 @@ [logo]: https://github.com/panzerdp/voca/raw/master/jsdoc/template/static/images/voca-logo@300px.png

[snakeCase]: https://vocajs.com/#snakeCase
[titleCase]: https://vocajs.com/#titleCase
[upperCase]: https://vocajs.com/#upperCase

@@ -197,2 +198,3 @@

[stripTags]: https://vocajs.com/#stripTags
[stripTags]: https://vocajs.com/#stripTags
[stripBom]: https://vocajs.com/#stripBom

@@ -32,3 +32,3 @@ 'use strict';

/**
* Strips subject tags from `subject`.
* Strips HTML tags from `subject`.
*

@@ -177,5 +177,4 @@ * @function stripTags

}
return output;
}
module.exports = exports['default'];

@@ -12,2 +12,6 @@ 'use strict';

var _includes = require('./includes');
var _includes2 = _interopRequireDefault(_includes);
var _is_nil = require('./helper/object/is_nil');

@@ -25,2 +29,4 @@

var reduce = Array.prototype.reduce;
/**

@@ -34,3 +40,3 @@ * Removes whitespaces from the left side of the `subject`.

* @param {string} [subject=''] The string to trim.
* @param {string} [whitespace=whitespace] The whitespace characters to trim.
* @param {string} [whitespace=whitespace] The whitespace characters to trim. List all characters that you want to be stripped.
* @return {string} Returns the trimmed string.

@@ -53,14 +59,11 @@ * @example

}
var whitespaceLength = whitespaceString.length;
var matchWhitespace = true;
var totalWhitespaceLength = 0;
while (matchWhitespace) {
if (subjectString.indexOf(whitespaceString, totalWhitespaceLength) === totalWhitespaceLength) {
totalWhitespaceLength += whitespaceLength;
} else {
matchWhitespace = false;
return reduce.call(subjectString, function (trimmed, character) {
if (matchWhitespace && (0, _includes2.default)(whitespaceString, character)) {
return trimmed;
}
}
return subjectString.substring(totalWhitespaceLength);
matchWhitespace = false;
return trimmed + character;
}, '');
}
module.exports = exports['default'];

@@ -12,2 +12,6 @@ 'use strict';

var _includes = require('./includes');
var _includes2 = _interopRequireDefault(_includes);
var _is_nil = require('./helper/object/is_nil');

@@ -25,2 +29,4 @@

var reduceRight = Array.prototype.reduceRight;
/**

@@ -34,3 +40,3 @@ * Removes whitespaces from the right side of the `subject`.

* @param {string} [subject=''] The string to trim.
* @param {string} [whitespace=whitespace] The whitespace characters to trim.
* @param {string} [whitespace=whitespace] The whitespace characters to trim. List all characters that you want to be stripped.
* @return {string} Returns the trimmed string.

@@ -53,17 +59,11 @@ * @example

}
var whitespaceLength = whitespaceString.length;
var subjectLength = subjectString.length;
var matchWhitespace = true;
var totalWhitespaceLength = 0;
var position = void 0;
while (matchWhitespace) {
position = subjectLength - totalWhitespaceLength - whitespaceLength;
if (subjectString.indexOf(whitespaceString, position) === position) {
totalWhitespaceLength += whitespaceLength;
} else {
matchWhitespace = false;
return reduceRight.call(subjectString, function (trimmed, character) {
if (matchWhitespace && (0, _includes2.default)(whitespaceString, character)) {
return trimmed;
}
}
return subjectString.substring(0, subjectLength - totalWhitespaceLength);
matchWhitespace = false;
return character + trimmed;
}, '');
}
module.exports = exports['default'];

@@ -38,3 +38,3 @@ 'use strict';

* @param {string} [subject=''] The string to trim.
* @param {string} [whitespace=whitespace] The whitespace characters to trim.
* @param {string} [whitespace=whitespace] The whitespace characters to trim. List all characters that you want to be stripped.
* @return {string} Returns the trimmed string.

@@ -41,0 +41,0 @@ * @example

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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