This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // HTTPS API | |
| import https from "https"; | |
| /** | |
| * Executes an HTTP request | |
| * @param {string | URL} url The url | |
| * @returns {Promise<any>} The response | |
| */ | |
| export default (url, { method, headers, data } = {}) => new Promise((res, rej) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import crypto from 'crypto' | |
| // WARNING: DO NOT CHANGE THESE WITH OPEN POSITIONS | |
| const PREFIX = 'X' | |
| const CHARSET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ' | |
| const RANDOM_LENGTH = 16 | |
| const EXPRESSION = new RegExp(`^${PREFIX}-[0-9A-Z]{${RANDOM_LENGTH}}-\\d+$`) | |
| // UNIQ-SEQ | |
| export class PositionId { |
OlderNewer