split-string
Advanced tools
+8
-2
@@ -42,3 +42,6 @@ /*! | ||
| if (closeIdx === -1) { | ||
| throw new Error('unclosed double quote: ' + str); | ||
| if (opts.strict !== false) { | ||
| throw new Error('unclosed double quote: ' + str); | ||
| } | ||
| closeIdx = idx; | ||
| } | ||
@@ -58,3 +61,6 @@ | ||
| if (closeIdx === -1) { | ||
| throw new Error('unclosed double quote: ' + str); | ||
| if (opts.strict !== false) { | ||
| throw new Error('unclosed single quote: ' + str); | ||
| } | ||
| closeIdx = idx; | ||
| } | ||
@@ -61,0 +67,0 @@ |
+2
-2
| { | ||
| "name": "split-string", | ||
| "description": "Split a string on a character except when the character is escaped.", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "homepage": "https://github.com/jonschlinkert/split-string", | ||
| "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
| "contributors": [ | ||
| "Brian Woodward <brian.woodward@gmail.com> (https://github.com/doowb)", | ||
| "Brian Woodward <brian.woodward@gmail.com> (https://twitter.com/doowb)", | ||
| "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)" | ||
@@ -10,0 +10,0 @@ ], |
+19
-3
@@ -105,2 +105,18 @@ # split-string [](https://www.npmjs.com/package/split-string) [](https://npmjs.org/package/split-string) [](https://npmjs.org/package/split-string) [](https://travis-ci.org/jonschlinkert/split-string) | ||
| ### options.strict | ||
| **Type**: `Boolean` | ||
| **Default**: `undefined` | ||
| When `true` or `undefined`, throws an error on unclosed double and single quotes. | ||
| Set to `false` to ignore errors and continue parsing. | ||
| **Example** | ||
| ```js | ||
| split('a.\'b.c', {strict: false}); | ||
| //=> ['a', 'b', 'c'] | ||
| ``` | ||
| ## About | ||
@@ -123,3 +139,3 @@ | ||
| | --- | --- | | ||
| | 3 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| | 7 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| | 1 | [doowb](https://github.com/doowb) | | ||
@@ -155,6 +171,6 @@ | ||
| Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
| MIT | ||
| Released under the [MIT License](LICENSE). | ||
| *** | ||
| _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 21, 2017._ | ||
| _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on April 11, 2017._ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9492
5.34%76
8.57%173
10.19%1
Infinity%