tiny-fsearch
Advanced tools
Comparing version 1.0.1 to 1.1.0
10
index.js
@@ -12,2 +12,5 @@ // Core Binding Implementation | ||
/// RegExp verifier function. | ||
const assertRegExpString = (input) => new RegExp(input); | ||
const fsearch = (searchable, files, opts = {}) => { | ||
@@ -21,2 +24,5 @@ if (searchable instanceof RegExp) { | ||
// if an error occurs creating the RegExp object, then is emitted | ||
if (opts.isRegex) assertRegExpString(searchable); | ||
opts = Object.assign(_defaultOptions, opts, { input: searchable }); | ||
@@ -34,2 +40,6 @@ return _binding_raw._fsearch_impl(files, opts); | ||
// if an error occurs creating the RegExp object, then is emitted | ||
if (opts.isRegex) assertRegExpString(searchable); | ||
opts = Object.assign(_defaultOptions, opts, { input: searchable }); | ||
@@ -36,0 +46,0 @@ return _binding_raw._fquery_impl(source, opts); |
{ | ||
"name": "tiny-fsearch", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A small and versatile find-in-file/source library.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
23090
141