[Pkg-javascript-commits] [node-rollup-plugin-replace] 01/02: Added a patch to avoid default values

Julien Puydt julien.puydt at laposte.net
Wed Aug 16 10:04:11 UTC 2017


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository node-rollup-plugin-replace.

commit a10e7827719340cae551dc782cb0c4ee56434e27
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Sun Aug 13 13:22:51 2017 +0200

    Added a patch to avoid default values
---
 debian/patches/default_value | 16 ++++++++++++++++
 debian/patches/series        |  1 +
 2 files changed, 17 insertions(+)

diff --git a/debian/patches/default_value b/debian/patches/default_value
new file mode 100644
index 0000000..974671c
--- /dev/null
+++ b/debian/patches/default_value
@@ -0,0 +1,16 @@
+Description: don't use default values for arguments
+Author: Julien Puydt
+Forwarded: no
+
+--- a/src/index.js
++++ b/src/index.js
+@@ -5,7 +5,8 @@
+ 	return str.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' );
+ }
+ 
+-export default function replace ( options = {} ) {
++export default function replace ( options ) {
++	if (!options) options = {};
+ 	const values = options.values || options;
+ 	const delimiters = ( options.delimiters || [ '', '' ] ).map( escape );
+ 	const pattern = new RegExp( delimiters[0] + '(' + Object.keys( values ).join( '|' ) + ')' + delimiters[1], 'g' );
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c7f9401
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+default_value

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-rollup-plugin-replace.git



More information about the Pkg-javascript-commits mailing list