وبلاگ بلیان

ES6 برای انسان‌ها: آخرین استاندارد جاوا اسکریپت: ES2015 و فراتر از آن

ES6 for humans : the latest standard of JavaScript : ES2015 and beyond

معرفی کتاب «ES6 برای انسان‌ها: آخرین استاندارد جاوا اسکریپت: ES2015 و فراتر از آن» (با عنوان لاتین ES6 for humans : the latest standard of JavaScript : ES2015 and beyond) نوشتهٔ Deepak Grover, Hanu Prateek Kunduru (auth.)، منتشرشده توسط نشر Apress Imprint : Apress در سال 2017. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Learn ES6 best practices for code optimization and organization and walk through practical, common examples of how to implement complete components of your applications. While this book covers the basic concepts of modern JavaScript, it primarily focuses on the new syntax, data-types, functionalities, and everything else that's new in ES6, the latest standard of JavaScript. You'll examine how to use ES6 in functional programming and explore the new more modular and object-oriented approach to JavaScript. This book will help you sharpen and upgrade your JavaScript language skills so you to easily explore modern ES6 based frameworks or libraries such as ReactJS, ReactNative, Angular4 and Vue.js.__ES6 for Humans__ is a complete guide to writing ES6 and will enable you to start taking advantage of this exciting new version of JavaScript. **What You'll Learn** * Use all the new features added to JavaScript * Compare ES5 and ES6 in varied situations * Refresh your core JavaScript fundamentals * Understand the modular and object-oriented approach to JavaScript < **Who this Book Is For**Any Javascript developer who wants to fully understand and dive into the new features of ES6/ES2015. Developers with some background in programming, preferably in JavaScript. A basic understanding of coding concepts and exposure to object-oriented programming is expected. Contents at a Glance 5 Contents 6 About the Authors 12 About the Technical Reviewer 13 Acknowledgments 14 Chapter 1: Getting Started with ES6 15 ES6 The Specification 15 History of ECMA, ECMAScript, and JavaScript 16 One JavaScript 17 Using ES6 18 Setting Up ES6 Using Babel and webpack 19 Transpiling with Babel 19 Setting Up an ES6 Boilerplate 19 Start a New Project 19 Install webpack and webpack-dev-server 20 Install Babel in the Project 20 Configuring Webpack 21 Add Loaders 21 Adding Your Generated bundle.js script to your index.html 22 Setting Up a Development Server 23 Summary 24 Chapter 2: New Syntax in ES6 25 Variable Declarations: let, const, and Block Scoping 25 Block Scoping with let and const 26 More on Temporal Dead Zones 28 Variables Declarations in loops 29 Variable Declarations with Function Parameters and Global Scope 30 Arrow Functions 31 Using Arrow Functions to Create IIFEs 32 A Tale about this 33 1. Function Invocation 33 2. Method Invocation 34 3. Constructor Invocation 35 this in Arrow Functions 35 Using Arrow Functions 38 Default Function Parameters 39 Rest and Spread Operators 41 The Spread Operator 43 Object Literal Extensions 44 Template Literals and Delimiters 46 Tagged Template Literals 46 Iterating with for...of 47 Summary 49 Chapter 3: Destructuring 50 Destructuring of Objects and Arrays 50 Object Destructuring Syntax 51 Assignment Using Destructuring 53 Default Values 54 Nested Destructuring 55 Destructuring Using the rest Syntax 57 Destructured Parameters 58 Summary 60 Chapter 4: Classes in ES6 61 Classes in ES6 61 Defining Classes in ES6 63 Class Declarations 63 Class Expressions 64 Class Methods and Accessor Properties 65 Computed Method Names 68 Class Properties and Privacy 68 Using Constructor Environments 69 Using WeakMaps 69 Static Methods and Properties 70 Class Inheritance and the Super Keyword 71 Inheriting Static Properties 73 Method Overriding 74 Inheritable Built-Ins 75 Summary 76 Chapter 5: Modules 77 Module Systems and a Little History 77 The Module Pattern in Traditional JavaScript 78 Modules in ES6 78 Exporting 79 Default Exports 79 Importing 80 Importing Default Values 81 Exporting an Imported Binding 82 Renaming Identifiers 82 Loading Modules 83 Modules in Web Browsers 83 Loading Modules with 83 Loading Modules Asynchronously in Browsers 84 Common Pitfalls 84 Syntax 84 Read-Only Bindings 85 Destructing an Import Statement and Using Variables 85 Using eval() 86 Module Specifier 86 Summary 86 Chapter 6: Symbols in ES6 87 Symbols 87 Applications of Symbols 88 Symbols and Registry 91 Symbol.for(key) 91 Symbol.keyFor(symbol) 92 Built-In Symbols 92 Summary 92 Chapter 7: Arrays and Collections 93 Arrays and New Methods 93 Array.from() 93 Array.of() 95 New Array.Prototype Methods 96 Array.prototype.entries( ) 96 Array.prototype.keys( ) 97 Array.prototype.values( ) 97 Array.prototype.find( ) 98 Array.prototype.findIndex( ) 99 Array.prototype.fill( ) 99 Array.prototype.copyWithin( ) 100 Typed Arrays 101 Basics of Using Typed Arrays 101 Typed Arrays and Normal Arrays 102 Map and WeakMap 103 Map 103 Checking Keys Equality 104 WeakMap 105 Set and WeakSet 106 Set 106 WeakSet 107 Summary 108 Chapter 8: Iterators and Generators 109 Iterables and Iterators 109 Iteration Protocols 112 Iterable Protocol 112 Iterator Protocol 112 Iterator as an Iterable 113 return( ) and throw( ) in Iterators 114 Generators 114 Generator Function 115 Communicating with Generators 116 Completing Early 118 Summary 120 Chapter 9: Promises in ES6 121 Promises Overview 121 Creating a Promise 122 Consuming a Promise with then() and catch() 123 Chaining of Promises 125 Error Handling 126 Combining Promises with Promises.all 127 Summary 128 Chapter 10: Meta Programming 129 Meta Programming in ES5 and ES6 Overview 129 Proxies in ES6 130 Traps in Proxy Handler 131 has 133 ownKeys 134 apply 134 Revocable Proxy 135 Reflect 137 Summary 139 Chapter 11: Beyond ES6 140 ES2016 140 The includes method on Arrays 140 The Exponentiation Operator ** 141 ES2017 141 Asynchronous Functions 142 Atomics and Shared Memory 143 Object.entries() and Object.values() 143 padStart and padEnd 143 Object.getOwnPropertyDescriptors() 144 Trailing Commas in Function Parameter lists & calls 145 Summary 145 Index 146 Learn ES6 best practices for code optimization and organization and walk through practical, common examples of how to implement complete components of your applications. While this book covers the basic concepts of modern JavaScript, it primarily focuses on the new syntax, data-types, functionalities, and everything else that's new in ES6, the latest standard of JavaScript. You'll examine how to use ES6 in functional programming and explore the new more modular and object-oriented approach to JavaScript. This book will help you sharpen and upgrade your JavaScript language skills so you to easily explore modern ES6 based frameworks or libraries such as ReactJS, ReactNative, Angular4 and Vue.js. ES6 for Humans is a complete guide to writing ES6 and will enable you to start taking advantage of this exciting new version of JavaScript. What You'll Learn Use all the new features added to JavaScript Compare ES5 and ES6 in varied situations Refresh your core JavaScript fundamentals Understand the modular and object-oriented approach to JavaScript < Who this Book Is For Any Javascript developer who wants to fully understand and dive into the new features of ES6/ES2015. Developers with some background in programming, preferably in JavaScript. A basic understanding of coding concepts and exposure to object-oriented programming is expected. "Learn ES6 best practices for code optimization and organization and walk through practical, common examples of how to implement complete components of your applications. ES6 (ECMAScript 6) offers new features that will streamline and optimize your JavaScript code. You'll examine what is new in ES6 and see how to use it in functional programming. You'll also learn how to use the new more modular and object-oriented approach to JavaScript. Whether you are a JavaScript developer or a developer familiar with other languages, ES6 for Humans will get you up to speed with ES6 and enable you to start taking advantage of this exciting new version of JavaScript. This book is a complete guide to writing ES6. What You'll Learn* Use all the new features added to JavaScript * Compare ES5 and ES6 in varied situations * Refresh your core JavaScript fundamentals * Understand the modular and object-oriented approach to JavaScript Who this Book Is For This book is primarily intended for developers with some background in programming, preferably in JavaScript but this is not absolutely necessary as a JS primer is provided. A basic understanding of coding concepts and exposure to object-oriented programming is expected."-- Provided by publisher Front Matter....Pages i-xvii Getting Started with ES6....Pages 1-10 New Syntax in ES6....Pages 11-35 Destructuring....Pages 37-47 Classes in ES6....Pages 49-64 Modules....Pages 65-74 Symbols in ES6....Pages 75-80 Arrays and Collections....Pages 81-96 Iterators and Generators....Pages 97-108 Promises in ES6....Pages 109-116 Meta Programming....Pages 117-127 Beyond ES6....Pages 129-134 Back Matter....Pages 135-137 With a project-based learning model that enables you to learn by doing, this book presents ES6 best practices for code optimization and organization and walks you through practical, common examples of how to implement complete components of your applications. -- Edited summary from book
دانلود کتاب ES6 برای انسان‌ها: آخرین استاندارد جاوا اسکریپت: ES2015 و فراتر از آن