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
| await page.evaluateOnNewDocument( | |
| `navigator.mediaDevices.getUserMedia = navigator.webkitGetUserMedia = navigator.mozGetUserMedia = navigator.getUserMedia = webkitRTCPeerConnection = RTCPeerConnection = MediaStreamTrack = undefined;` | |
| ) |
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
| .idea/ | |
| .gitlab-ci.yml | |
| .release-it.json | |
| test/ | |
| src/ | |
| nodemon.json | |
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
| { | |
| "watch": [ | |
| "src" | |
| ], | |
| "ext": "ts", | |
| "exec": "tsc" | |
| } |
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
Show hidden characters
| { | |
| "compilerOptions": { | |
| "target": "es6", | |
| "module": "commonjs", | |
| "declaration": true, | |
| "outDir": "./dist", | |
| "strict": true | |
| }, | |
| "include": [ | |
| "src" |
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
| require('dotenv').config() |
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
| const path = require('path') | |
| const env = process.env.NODE_ENV === 'production' ? 'production.env' : '.env' | |
| require('dotenv').config({ | |
| path: path.join(__dirname, env) | |
| }) |
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
| const {Parser} = require('json2csv') | |
| const data = [ | |
| { | |
| name: 'Max', | |
| url: 'https://github.com/tutv' | |
| }, | |
| { | |
| name: 'Min', | |
| url: 'https://github.com/m' |
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
| const fs = require('fs') | |
| const path = require('path') | |
| const {exec} = require('child_process') | |
| const uuid = require('uuid/v4') | |
| const _readFile = async (file = '') => { | |
| return new Promise((resolve, reject) => { | |
| fs.readFile(file, 'utf8', (error, data) => { | |
| if (error) return reject(error) |
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
| const isExistPackage = await _isExist(packageJson) | |
| if (!isExistPackage) { | |
| throw new Error('package.json not found.') | |
| } | |
| const packageContent = await _readFile(packageJson) | |
| const json = await _parseJSON(packageContent) | |
| const {main} = json | |
| if (!main) { | |
| throw new Error(`package.json doesn't have 'main' property.`) |
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
| { | |
| "txn_type":"subscr_signup", | |
| "subscr_id":"xxx", | |
| "last_name":"xxx", | |
| "residence_country":"VN", | |
| "mc_currency":"USD", | |
| "item_name":"Standard - Unlimited", | |
| "business":"xxx", | |
| "amount3":"49.50", | |
| "recurring":"1", |
NewerOlder