split-string
Advanced tools
Comparing version 1.0.0 to 1.0.1
10
index.js
@@ -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 @@ |
{ | ||
"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 @@ ], |
@@ -105,2 +105,18 @@ # split-string [![NPM version](https://img.shields.io/npm/v/split-string.svg?style=flat)](https://www.npmjs.com/package/split-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![NPM total downloads](https://img.shields.io/npm/dt/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/split-string.svg?style=flat&label=Travis)](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._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9492
76
173
1