@timberio/tools
Advanced tools
Comparing version 0.4.0 to 0.5.0
import { IQueue } from "./types"; | ||
import Queue from "./queue"; | ||
import { atob, btoa } from "./encode"; | ||
import makeThrottle from "./throttle"; | ||
export { IQueue, Queue, makeThrottle }; | ||
export { IQueue, Queue, atob, btoa, makeThrottle }; |
@@ -8,4 +8,7 @@ "use strict"; | ||
exports.Queue = queue_1.default; | ||
const encode_1 = require("./encode"); | ||
exports.atob = encode_1.atob; | ||
exports.btoa = encode_1.btoa; | ||
const throttle_1 = __importDefault(require("./throttle")); | ||
exports.makeThrottle = throttle_1.default; | ||
//# sourceMappingURL=index.js.map |
import { IQueue } from "./types"; | ||
import Queue from "./queue"; | ||
import { atob, btoa } from "./encode"; | ||
import makeThrottle from "./throttle"; | ||
export { IQueue, Queue, makeThrottle }; | ||
export { IQueue, Queue, atob, btoa, makeThrottle }; |
import Queue from "./queue"; | ||
import { atob, btoa } from "./encode"; | ||
import makeThrottle from "./throttle"; | ||
@@ -7,3 +8,3 @@ export { | ||
// Functions | ||
makeThrottle }; | ||
atob, btoa, makeThrottle }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@timberio/tools", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Javascript logging tools", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -76,1 +76,31 @@ # 🌲 Timber - Javascript tools | ||
``` | ||
### atob(ascii: string): string | ||
**Node.js only** | ||
Converts ASCII text to a Base64 encoded string. Equivalent to [window.atob()](https://www.w3schools.com/jsref/met_win_atob.asp) in the browser. | ||
Used by the logger to convert an API key to Timber's `user:password` basic auth. | ||
**Usage example:** | ||
```typescript | ||
import { atob } from "@timberio/tools"; | ||
console.log(atob("hello world")); // <-- returns "aGVsbG8gd29ybGQ=" | ||
``` | ||
### btoa(base64: string): string | ||
**Node.js only** | ||
Converts Base64 encoded string to an ASCII string. Equivalent to [window.btoa()](https://www.w3schools.com/jsref/met_win_btoa.asp) | ||
**Usage example:** | ||
```typescript | ||
import { btoa } from "@timberio/tools"; | ||
console.log(btoa("aGVsbG8gd29ybGQ=")); // <-- returns "hello world" | ||
``` |
import { IQueue } from "./types"; | ||
import Queue from "./queue"; | ||
import { atob, btoa } from "./encode"; | ||
import makeThrottle from "./throttle"; | ||
@@ -11,3 +12,5 @@ | ||
// Functions | ||
atob, | ||
btoa, | ||
makeThrottle | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
55294
62
1041
106