@protobufjs/base64
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -121,1 +121,10 @@ "use strict"; | ||
}; | ||
/** | ||
* Tests if the specified string appears to be base64 encoded. | ||
* @param {string} string String to test | ||
* @returns {boolean} `true` if probably base64 encoded, otherwise false | ||
*/ | ||
base64.test = function test(string) { | ||
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); | ||
}; |
{ | ||
"name": "@protobufjs/base64", | ||
"description": "A minimal base64 implementation for number arrays.", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>", | ||
@@ -10,3 +10,5 @@ "repository": { | ||
}, | ||
"license": "BSD-3-Clause" | ||
"license": "BSD-3-Clause", | ||
"main": "index.js", | ||
"types": "index.d.ts" | ||
} |
7624
5
157