babel-plugin-search-and-replace
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -10,2 +10,10 @@ module.exports = () => { | ||
state.opts.map(opt => { | ||
if ( | ||
typeof opt.search === "object" && | ||
path.node.value.match(opt.search) | ||
) { | ||
path.node.value = path.node.value.replace(opt.search, opt.replace); | ||
return; | ||
} | ||
if (path.node.value === opt.search) { | ||
@@ -12,0 +20,0 @@ path.node.value = opt.replace; |
{ | ||
"name": "babel-plugin-search-and-replace", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"main": "lib/index.js", | ||
@@ -13,7 +13,5 @@ "repository": "https://github.com/the-smaug/babel-plugin-search-and-replace", | ||
"devDependencies": { | ||
"jest": "21.2.1" | ||
}, | ||
"dependencies": { | ||
"jest": "21.2.1", | ||
"babel-core": "6.26.0" | ||
} | ||
} |
@@ -18,8 +18,8 @@ # babel-plugin-search-and-replace | ||
{ | ||
"search": "foo", | ||
"replace": "bar", | ||
}, | ||
{ | ||
"search": "searchedString", | ||
"replace": "replacement" | ||
}, | ||
{ | ||
"search": /myRegex/, | ||
"replace": "replacement" | ||
} | ||
@@ -26,0 +26,0 @@ ]]] |
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
88907
0
6
90
2
- Removedbabel-core@6.26.0
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-code-frame@6.26.0(transitive)
- Removedbabel-core@6.26.0(transitive)
- Removedbabel-generator@6.26.1(transitive)
- Removedbabel-helpers@6.24.1(transitive)
- Removedbabel-messages@6.23.0(transitive)
- Removedbabel-register@6.26.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbabel-template@6.26.0(transitive)
- Removedbabel-traverse@6.26.0(transitive)
- Removedbabel-types@6.26.0(transitive)
- Removedbabylon@6.18.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedchalk@1.1.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddetect-indent@4.0.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesutils@2.0.3(transitive)
- Removedglobals@9.18.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhome-or-tmp@2.0.0(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedjs-tokens@3.0.2(transitive)
- Removedjsesc@1.3.0(transitive)
- Removedjson5@0.5.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedms@2.0.0(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedprivate@0.1.8(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedslash@1.0.0(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-support@0.4.18(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedto-fast-properties@1.0.3(transitive)
- Removedtrim-right@1.0.1(transitive)