File: 01-remove_base64-url_module.patch

package info (click to toggle)
node-uid-safe 2.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 124 kB
  • ctags: 3
  • sloc: makefile: 4; sh: 2
file content (26 lines) | stat: -rw-r--r-- 783 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: It has no sense require a module only for a simple
 replaces chain.
 Import the function directly from upstream: 
  https://github.com/joaquimserafim/base64-url/blob/master/index.js
 Author: Joaquim Serafim
 License: ISC
Author: Leo Iannacone <l3on@ubuntu.com>
Forwarded: not-needed

Index: node-uid-safe/index.js
===================================================================
--- node-uid-safe.orig/index.js
+++ node-uid-safe/index.js
@@ -12,8 +12,11 @@
  * @private
  */
 
-var escape = require('base64-url').escape
 var randomBytes = require('random-bytes')
+// from https://github.com/joaquimserafim/base64-url/blob/master/index.js
+function escape (str) {
+  return str.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
+};
 
 /**
  * Module exports.