Practical Modern JavaScript. Dive into ES6 and the Future of JavaScript - Helion
ISBN: 978-14-919-4354-0
stron: 334, Format: ebook
Data wydania: 2017-06-26
Księgarnia: Helion
Cena książki: 160,65 zł (poprzednio: 186,80 zł)
Oszczędzasz: 14% (-26,15 zł)
To get the most out of modern JavaScript, you need learn the latest features of its parent specification, ECMAScript 6 (ES6). This book provides a highly practical look at ES6, without getting lost in the specification or its implementation details. Armed with practical examples, author Nicolas Bevacqua shows you new ways to deal with asynchronous flow control, declare objects or functions, and create proxies or unique sets, among many other features.
The first title in Bevacqua’s Modular JavaScript series, Practical Modern JavaScript prepares JavaScript and Node.js developers for applied lessons in modular design, testing, and deployment in subsequent books.
This book explains:
- How JavaScript and its standards development process have evolved
- Essential ES6 changes, including arrow functions, destructuring, let and const
- Class syntax for declaring object prototypes, and the new Symbol primitive
- How to handle flow control with Promises, iterators, generators, and async functions
- ES6 collection built-in types for creating object maps and unique sets
- How and when to use the new Proxy and Reflect built-ins
- Changes to Array, Math, numbers, strings, Unicode, and regular expressions, and other improvements since ES5
Osoby które kupowały "Practical Modern JavaScript. Dive into ES6 and the Future of JavaScript", wybierały także:
- D3.js w akcji 67,42 zł, (20,90 zł -69%)
- Tablice informatyczne. Node.js 16,86 zł, (5,90 zł -65%)
- Testowanie aplikacji w React.js. Kurs video. Praca z biblioteką Jest.js 69,00 zł, (27,60 zł -60%)
- JavaScript. Kurs video. Programowanie funkcyjne i reaktywne 98,98 zł, (39,59 zł -60%)
- AngularJS. Kurs video. Poziom pierwszy. Tworzenie aplikacji 119,00 zł, (47,60 zł -60%)
Spis treści
Practical Modern JavaScript. Dive into ES6 and the Future of JavaScript eBook -- spis treści
- Foreword
- Preface
- Who Should Read This Book
- Why Modern JavaScript?
- How Is This Book Organized?
- Conventions Used in This Book
- OReilly Safari
- How to Contact Us
- Acknowledgments
- 1. ECMAScript and the Future of JavaScript
- 1.1. A Brief History of JavaScript Standards
- 1.2. ECMAScript as a Rolling Standard
- 1.3. Browser Support and Complementary Tooling
- 1.3.1. Introduction to the Babel Transpiler
- 1.3.2. Code Quality and Consistency with ESLint
- 1.4. Feature Themes in ES6
- 1.5. Future of JavaScript
- 2. ES6 Essentials
- 2.1. Object Literals
- 2.1.1. Property Value Shorthands
- 2.1.2. Computed Property Names
- 2.1.3. Method Definitions
- 2.2. Arrow Functions
- 2.2.1. Lexical Scoping
- 2.2.2. Arrow Function Flavors
- 2.2.3. Merits and Use Cases
- 2.3. Assignment Destructuring
- 2.3.1. Destructuring Objects
- 2.3.2. Destructuring Arrays
- 2.3.3. Function Parameter Defaults
- 2.3.4. Function Parameter Destructuring
- 2.3.5. Use Cases for Destructuring
- 2.4. Rest Parameter and Spread Operator
- 2.4.1. Rest Parameters
- 2.4.2. Spread Operator
- 2.5. Template Literals
- 2.5.1. String Interpolation
- 2.5.2. Multiline Template Literals
- 2.5.3. Tagged Templates
- 2.6. let and const Statements
- 2.6.1. Block Scoping and let Statements
- 2.6.2. Temporal Dead Zone
- 2.6.3. Const Statements
- 2.6.4. Merits of const and let
- 2.1. Object Literals
- 3. Classes, Symbols, Objects, and Decorators
- 3.1. Classes
- 3.1.1. Class Fundamentals
- 3.1.2. Properties and Methods in Classes
- 3.1.3. Extending JavaScript Classes
- 3.2. Symbols
- 3.2.1. Local Symbols
- 3.2.2. Practical Use Cases for Symbols
- Defining protocols through symbols
- 3.2.3. Global Symbol Registry
- Getting symbols with Symbol.for(key)
- Using Symbol.keyFor(symbol) to retrieve symbol keys
- Best practices and considerations
- 3.2.4. Well-Known Symbols
- Shared across realms but not in the registry
- 3.3. Object Built-in Improvements
- 3.3.1. Extending Objects with Object.assign
- 3.3.2. Comparing Objects with Object.is
- 3.3.3. Object.setPrototypeOf
- 3.4. Decorators
- 3.4.1. A Primer on JavaScript Decorators
- 3.4.2. Stacking Decorators and a Warning About Immutability
- 3.4.3. Use Case By Example: Attributes in C#
- 3.4.4. Marking Properties in JavaScript
- 3.1. Classes
- 4. Iteration and Flow Control
- 4.1. Promises
- 4.1.1. Getting Started with Promises
- 4.1.2. Promise Continuation and Chaining
- 4.1.3. Creating a Promise from Scratch
- 4.1.4. Promise States and Fates
- 4.1.5. Promise#finally Proposal
- 4.1.6. Leveraging Promise.all and Promise.race
- 4.2. Iterator Protocol and Iterable Protocol
- 4.2.1. Understanding Iteration Principles
- 4.2.2. Infinite Sequences
- 4.2.3. Iterating Object Maps as Key/Value Pairs
- 4.2.4. Building Versatility Into Iterating a Playlist
- 4.3. Generator Functions and Generator Objects
- 4.3.1. Generator Fundamentals
- 4.3.2. Iterating over Generators by Hand
- 4.3.3. Mixing Generators into Iterables
- 4.3.4. Tree Traversal Using Generators
- 4.3.5. Consuming Generator Functions for Flexibility
- 4.3.6. Dealing with Asynchronous Flows
- 4.3.7. Throwing Errors at a Generator
- 4.3.8. Returning on Behalf of a Generator
- 4.3.9. Asynchronous I/O Using Generators
- 4.4. Async Functions
- 4.4.1. Flavors of Async Code
- 4.4.2. Using async/await
- 4.4.3. Concurrent Async Flows
- 4.4.4. Error Handling
- 4.4.5. Understanding Async Function Internals
- 4.5. Asynchronous Iteration
- 4.5.1. Async Iterators
- 4.5.2. Async Generators
- 4.1. Promises
- 5. Leveraging ECMAScript Collections
- 5.1. Using ES6 Maps
- 5.1.1. First Look into ES6 Maps
- 5.1.2. Hash-Maps and the DOM
- 5.2. Understanding and Using WeakMap
- 5.2.1. Is WeakMap a Worse Map?
- 5.3. Sets in ES6
- 5.4. ES6 WeakSets
- 5.1. Using ES6 Maps
- 6. Managing Property Access with Proxies
- 6.1. Getting Started with Proxy
- 6.1.1. Trapping get Accessors
- 6.1.2. Trapping set Accessors
- 6.1.3. Schema Validation with Proxies
- 6.2. Revocable Proxies
- 6.3. Proxy Trap Handlers
- 6.3.1. has Trap
- 6.3.2. deleteProperty Trap
- 6.3.3. defineProperty Trap
- 6.3.4. ownKeys Trap
- 6.4. Advanced Proxy Traps
- 6.4.1. getOwnPropertyDescriptor Trap
- 6.4.2. apply Trap
- 6.4.3. construct Trap
- 6.4.4. getPrototypeOf Trap
- 6.4.5. setPrototypeOf Trap
- 6.4.6. preventExtensions Trap
- 6.4.7. isExtensible Trap
- 6.1. Getting Started with Proxy
- 7. Built-in Improvements in ES6
- 7.1. Numbers
- 7.1.1. Binary and Octal Literals
- 7.1.2. Number.isNaN
- 7.1.3. Number.isFinite
- 7.1.4. Number.parseInt
- 7.1.5. Number.parseFloat
- 7.1.6. Number.isInteger
- 7.1.7. Number.EPSILON
- 7.1.8. Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER
- 7.1.9. Number.isSafeInteger
- 7.2. Math
- 7.2.1. Math.sign
- 7.2.2. Math.trunc
- 7.2.3. Math.cbrt
- 7.2.4. Math.expm1
- 7.2.5. Math.log1p
- 7.2.6. Math.log10
- 7.2.7. Math.log2
- 7.2.8. Trigonometric Functions
- 7.2.9. Math.hypot
- 7.2.10. Bitwise Computation Helpers
- Math.clz32
- Math.imul
- Math.fround
- 7.3. Strings and Unicode
- 7.3.1. String#startsWith
- 7.3.2. String#endsWith
- 7.3.3. String#includes
- 7.3.4. String#repeat
- 7.3.5. String Padding and Trimming
- 7.3.6. Unicode
- 7.3.7. String.prototype[Symbol.iterator]
- 7.3.8. A Proposal to Split Grapheme Segments
- 7.3.9. String#codePointAt
- 7.3.10. String.fromCodePoint
- 7.3.11. Unicode-Aware String Reversal
- 7.3.12. String#normalize
- 7.4. Regular Expressions
- 7.4.1. Sticky Matching Flag /y
- 7.4.2. Unicode Flag /u
- 7.4.3. Named Capture Groups
- 7.4.4. Unicode Property Escapes
- 7.4.5. Lookbehind Assertions
- 7.4.6. A New /s dotAll Flag
- 7.4.7. String#matchAll
- 7.5. Array
- 7.5.1. Array.from
- 7.5.2. Array.of
- 7.5.3. Array#copyWithin
- 7.5.4. Array#fill
- 7.5.5. Array#find and Array#findIndex
- 7.5.6. Array#keys
- 7.5.7. Array#values
- 7.5.8. Array#entries
- 7.5.9. Array.prototype[Symbol.iterator]
- 7.1. Numbers
- 8. JavaScript Modules
- 8.1. CommonJS
- 8.2. JavaScript Modules
- 8.2.1. Strict Mode
- 8.2.2. export Statements
- Exporting a default binding
- Named exports
- Exporting lists
- Bindings, not values
- Exporting from another module
- 8.2.3. import Statements
- Importing default exports
- Importing named exports
- Wildcard import statements
- 8.2.4. Dynamic import()
- 8.3. Practical Considerations for ES Modules
- 9. Practical Considerations
- 9.1. Variable Declarations
- 9.2. Template Literals
- 9.3. Shorthand Notation and Object Destructuring
- 9.4. Rest and Spread
- 9.5. Savoring Function Flavors
- 9.6. Classes and Proxies
- 9.7. Asynchronous Code Flows
- 9.8. Complexity Creep, Abstractions, and Conventions
- Index