My Account Log in

2 options

ECMAScript cookbook : over 70 recipes to help you learn the new ECMAScript (ES6/ES8) features and solve common JavaScript problems / Ross Harrison.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central College Complete Available online

View online
Format:
Book
Author/Creator:
Harrison, Ross, author.
Language:
English
Subjects (All):
JavaScript (Computer program language).
Physical Description:
1 online resource (338 pages) : illustrations
Edition:
1st ed.
Place of Publication:
Birmingham ; Mumbai : Packt Publishing, 2018.
Summary:
The recent releases of ECMAScript have transformed JavaScript by introducing new collections types, functional APIs, OOP, and other syntactic updates. ECMAScript is a specification that JavaScript, TypeScript and many others implement. Learning to write beautiful, efficient and modular code across all these languages requires good.
Contents:
Cover
Title Page
Copyright and Credits
Dedication
PacktPub.com
Contributors
Table of Contents
Preface
Chapter 1: Building with Modules
Introduction
Installing and configuring - Chrome
Getting ready
How to do it...
How it works...
There's more...
Installing and configuring - Firefox
Installing Python, using SimpleHTTPServer to host a local static file server
Creating an HTML page that loads an ECMAScript module
See also
Exporting/importing multiple modules for external use
Renaming imported modules
Nesting modules under a single namespace
Chapter 2: Staying Compatible with Legacy Browsers
Installing Node.js with NVM - Linux and macOS
Installing Node.js with NVM: Windows
Installing and configuring webpack
Adding fallback script tags to load client bundles
Shimming methods with Babel Polyfill
Supporting new language features with Babel
Using tools to analyze webpack bundles
Chapter 3: Working with Promises
Introduction.
Creating and waiting for Promises
Resolving Promise results
Rejecting Promise errors
Chaining Promises
Starting a Promise chain with Promise.resolve
Using Promise.all to resolve multiple promises
There's more
Handling errors with Promise.catch
Simulating finally with the promise API
Chapter 4: Working with async/await and Functions
Creating promises with an async function
Awaiting the result of async functions
Using async results in a Promise chain
Awaiting multiple results in a series
Awaiting multiple results concurrently
Using Promise.all to collect an array of async results
Handling errors when awaiting an async function
Handling errors thrown inside of Promise.all
Using finally to ensure an operation is performed
Chapter 5: Web Workers, Shared Memory, and Atomics.
Introduction
Enabling SharedArrayBuffers in Firefox
Enabling SharedArrayBuffers in Chrome
Performing work on separate threads with Web Workers
Sending messages to and from Web Workers
Sending data to a Web Worker
Stopping workers with terminate
Creating SharedArrayBuffer
Sending SharedArrayBuffer to a Web Worker
Reading SharedArray from multiple Web Workers
Using Atomics to coordinate the use of shared memory
Using promises to provide a simple interface for a worker
Chapter 6: Plain Objects
Using Object.assign to add properties to an object
Using Object.entries to get iterable property-name pairs
Using Object.is to compare two values
Defining function properties as methods on a plain object
Defining read-only props with Object.defineProperty
Overriding read-only props with Object.defineProperty
Creating a non-enumerable property with Object.defineProperty.
Getting ready
Creating an object using object structuring
Picking values from an object using destructuring
Using a spread operator to combine objects
Chapter 7: Creating Classes
Creating a new class
Assigning properties with constructor arguments
Defining methods on a class
Checking instance type with instanceOf
Using getters to create read-only properties
Using setters to encapsulate values
Using static methods to work with all instances
Chapter 8: Inheritance and Composition
Extending a class
Assigning additional properties with constructor arguments
Overriding parent class instance methods
Overriding parent class static methods
Calling super methods
Using composition rather than inheritance to add behavior
Using mix-ins to add behavior
Passing a class as an argument
How to do it.
How it works...
Checking class inheritance with Object.getPrototypeOf
Using throw to simulate abstract classes
Chapter 9: Larger Structures with Design Patterns
Defining steps with template functions
Assembling customized instances with builders
Replicating instances with factories
Processing a structure with the visitor pattern
Using a singleton to manage instances
Modifying an existing design pattern to fit different use cases
Combining existing design patterns to fit different use cases
Chapter 10: Working with Arrays
Using Array#find and Array#filter to find values in an array
Using Array#slice to get a subset of the array
Using Array#every and Array#some to test array values
Using Array.map to produce values
Using Array.reduce to transform data
Extracting array members with destructuring
Getting the head and tail of array using the rest operator
Combining arrays with the spread operator.
Getting ready.
Notes:
Description based on print version record.
ISBN:
9781788625630
1788625633

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Library Catalog Using Articles+ Library Account