- Выразительный JavaScript (Eloquent JavaScript) - Хавербеке Марейн (Haverbeke Marjin)
- https://developer.mozilla.org/ru/docs/Web/JavaScript
- Airbnb Javascript Style Guide
- Node.js documentation
- TypeScript Handbook
- Экстремальное программирование: планирование - Кент Бек, Мартин Фаулер
- Рефакторинг: улучшение существующего кода - Мартин Фаулер
- Программист‑прагматик - Дейв Томас, Энди Хант
- The Passionate Programmer - Чед Фаулер (перевод главы на Хабре)
- The Twelve-Factor App
This file contains 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 dotenv = await fs.readFile('.env'); | |
dotenv | |
.toString('utf-8') | |
.split('\n') | |
.map(line => line.replace(/#.*$/, '')) | |
.map(line => line.trim()) | |
.filter(line => line.match(/\S/)) | |
.map(line => line.split('=')) | |
.forEach(([key, value]) => key in process.env || (process.env[key] = value)); |
This file contains 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 * as GLOBALS from './globals.js'; | |
const DEFAULTS = { ...GLOBALS }; | |
export class Config { | |
static get defaults () { return DEFAULTS } | |
static get globals () { return GLOBALS } | |
constructor (values) { | |
this.values = { ...Config.defaults }; |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<div id="log"></div> | |
<button id="button">Click me</button> | |
<script> | |
function create (handler) { |
This file contains 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 createTestCafe = require('testcafe'); | |
(async => { | |
process.env.params = JSON.stringify({ | |
'test1': { | |
'foo': 'bar' | |
}, | |
'test2': { | |
'foo': 'foobar' | |
} |
import { ClientFunction } from "testcafe";
fixtureChange.org
;
const changeUserState = ClientFunction((desiredState) => { const initialState = App.get('currentUser').get('login_state');
App.get('currentUser').set('login_state', desiredState);
This file contains 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 longRunningPostRequest = require('./setup/seed-database'); | |
const createTestCafe = require('testcafe'); | |
const RUN_OPTIONS = {pageLoadTimeout: 120000, selectorTimeout: 15000}; | |
const setupLicense = async () => { | |
const testcafe = await createTestCafe('localhost', 1337, 1338, undefined, true); | |
const runner = testcafe.createRunner(); | |
const failedCount = await runner | |
.src(['fixtures/setup-license.js']) |
module | ns | % |
---|---|---|
babel-core | 2415741000 | 25% |
testcafe-hammerhead | 2893672578 | 30% |
testcafe-browser-tools | 977508426 | 10% |
client-functions\selectors\selector-builder\add-api (babel-plugin-*) | 1875468857 | 20% |
total | 9541507872 | 100% |
NewerOlder