@onflow/bytes
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
var r=function(r){return Buffer.from(r)};exports.bytes=function(r,e){var t=r;return"string"==typeof r?t=Buffer.from(r,"hex"):r instanceof Uint8Array&&(t=Buffer.from(r)),void 0!==e&&(t=function(r,e){var t=Buffer.alloc(e);return r.copy(t,e-r.length,0,r.length),t}(t,e)),t},exports.bytesToString=function(r){return r.toString("utf8")},exports.bytesToHex=function(r){return r.toString("hex")},exports.bytesToBuffer=r,exports.addressToBuffer=function(e){return r(e)},exports.scriptToBuffer=function(r){return Buffer.from(r,"utf8")},exports.keyToBuffer=function(r){return Buffer.from(r,"hex")},exports.hashToBuffer=function(r){return Buffer.from(r,"hex")},exports.bufferToHexString=function(r){return r.reduce(function(r,e){return r+("0"+e.toString(16)).slice(-2)},"")}; | ||
var r=function(r){return Buffer.from(r)};exports.addressToBuffer=function(e){return r(e)},exports.bufferToHexString=function(r){return r.reduce(function(r,e){return r+("0"+e.toString(16)).slice(-2)},"")},exports.bytes=function(r,e){var t=r;return"string"==typeof r?t=Buffer.from(r,"hex"):r instanceof Uint8Array&&(t=Buffer.from(r)),void 0!==e&&(t=function(r,e){var t=Buffer.alloc(e);return r.copy(t,e-r.length,0,r.length),t}(t,e)),t},exports.bytesToBuffer=r,exports.bytesToHex=function(r){return r.toString("hex")},exports.bytesToString=function(r){return r.toString("utf8")},exports.hashToBuffer=function(r){return Buffer.from(r,"hex")},exports.keyToBuffer=function(r){return Buffer.from(r,"hex")},exports.scriptToBuffer=function(r){return Buffer.from(r,"utf8")}; | ||
//# sourceMappingURL=bytes.js.map |
@@ -1,2 +0,2 @@ | ||
var r=function(r,n){var t=r;return"string"==typeof r?t=Buffer.from(r,"hex"):r instanceof Uint8Array&&(t=Buffer.from(r)),void 0!==n&&(t=function(r,n){var t=Buffer.alloc(n);return r.copy(t,n-r.length,0,r.length),t}(t,n)),t},n=function(r){return r.toString("utf8")},t=function(r){return r.toString("hex")},f=function(r){return Buffer.from(r)},u=function(r){return f(r)},e=function(r){return Buffer.from(r,"utf8")},o=function(r){return Buffer.from(r,"hex")},i=function(r){return Buffer.from(r,"hex")},c=function(r){return r.reduce(function(r,n){return r+("0"+n.toString(16)).slice(-2)},"")};export{r as bytes,n as bytesToString,t as bytesToHex,f as bytesToBuffer,u as addressToBuffer,e as scriptToBuffer,o as keyToBuffer,i as hashToBuffer,c as bufferToHexString}; | ||
var r=function(r,n){var t=r;return"string"==typeof r?t=Buffer.from(r,"hex"):r instanceof Uint8Array&&(t=Buffer.from(r)),void 0!==n&&(t=function(r,n){var t=Buffer.alloc(n);return r.copy(t,n-r.length,0,r.length),t}(t,n)),t},n=function(r){return r.toString("utf8")},t=function(r){return r.toString("hex")},f=function(r){return Buffer.from(r)},u=function(r){return f(r)},e=function(r){return Buffer.from(r,"utf8")},o=function(r){return Buffer.from(r,"hex")},i=function(r){return Buffer.from(r,"hex")},c=function(r){return r.reduce(function(r,n){return r+("0"+n.toString(16)).slice(-2)},"")};export{u as addressToBuffer,c as bufferToHexString,r as bytes,f as bytesToBuffer,t as bytesToHex,n as bytesToString,i as hashToBuffer,o as keyToBuffer,e as scriptToBuffer}; | ||
//# sourceMappingURL=bytes.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.bytes={})}(this,function(e){var r=function(e){return Buffer.from(e)};e.bytes=function(e,r){var f=e;return"string"==typeof e?f=Buffer.from(e,"hex"):e instanceof Uint8Array&&(f=Buffer.from(e)),void 0!==r&&(f=function(e,r){var f=Buffer.alloc(r);return e.copy(f,r-e.length,0,e.length),f}(f,r)),f},e.bytesToString=function(e){return e.toString("utf8")},e.bytesToHex=function(e){return e.toString("hex")},e.bytesToBuffer=r,e.addressToBuffer=function(e){return r(e)},e.scriptToBuffer=function(e){return Buffer.from(e,"utf8")},e.keyToBuffer=function(e){return Buffer.from(e,"hex")},e.hashToBuffer=function(e){return Buffer.from(e,"hex")},e.bufferToHexString=function(e){return e.reduce(function(e,r){return e+("0"+r.toString(16)).slice(-2)},"")}}); | ||
!function(e,f){"object"==typeof exports&&"undefined"!=typeof module?f(exports):"function"==typeof define&&define.amd?define(["exports"],f):f((e=e||self).bytes={})}(this,function(e){var f=function(e){return Buffer.from(e)};e.addressToBuffer=function(e){return f(e)},e.bufferToHexString=function(e){return e.reduce(function(e,f){return e+("0"+f.toString(16)).slice(-2)},"")},e.bytes=function(e,f){var r=e;return"string"==typeof e?r=Buffer.from(e,"hex"):e instanceof Uint8Array&&(r=Buffer.from(e)),void 0!==f&&(r=function(e,f){var r=Buffer.alloc(f);return e.copy(r,f-e.length,0,e.length),r}(r,f)),r},e.bytesToBuffer=f,e.bytesToHex=function(e){return e.toString("hex")},e.bytesToString=function(e){return e.toString("utf8")},e.hashToBuffer=function(e){return Buffer.from(e,"hex")},e.keyToBuffer=function(e){return Buffer.from(e,"hex")},e.scriptToBuffer=function(e){return Buffer.from(e,"utf8")}}); | ||
//# sourceMappingURL=bytes.umd.js.map |
{ | ||
"name": "@onflow/bytes", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "helpers for bytes and stuff", | ||
@@ -21,5 +21,5 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"jest": "25.1.0", | ||
"jest": "25.3.0", | ||
"jest-esm-transformer": "1.0.0", | ||
"microbundle": "0.11.0" | ||
"microbundle": "0.12.0-next.8" | ||
}, | ||
@@ -26,0 +26,0 @@ "source": "src/bytes.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
13985
13
49