hello.js

var please = require('share');
console.log('thank you');

Monday, 24 April, 2017 UTC

typescript: Bubble sort using TypeScript

typescript: Bubble sort using TypeScript

Bubble sort is considered the simplest sorting algorithm to implement. In this lesson we cover the bubble sort algorithm, how it gets its name, and how to implement it using TypeScript / JavaScript. ... more


Friday, 21 April, 2017 UTC

typescript: Algorithm to determine if a string is a palindrome

typescript: Algorithm to determine if a string is a palindrome

A palindrome is a string that reads the same forward and backward, for example, radar, toot, and madam. In this lesson we discuss how to approach the palindrome problem using TypeScript / JavaScript. We also discuss a more complex algorithmic challenge ... more


Tuesday, 18 April, 2017 UTC

typescript: Deep Copy aka Clone objects using TypeScript

typescript: Deep Copy aka Clone objects using TypeScript

You can create copies of JavaScript objects by coping around properties e.g. `const x = {foo: 123}; const y = { foo: x.foo }`. However doing this manually for deep objects can be time consuming. In this lesson we cover one way of deep copying simple objects ... more


Tuesday, 18 April, 2017 UTC

typescript: Create high quality npm packages using TypeScript

typescript: Create high quality npm packages using TypeScript

The TypeScript compiler makes it super easy to create high quality NodeJS packages that can be used with compile time safety in other TypeScript packages. Using JavaScript packages written in TypeScript can save you a lot of time digging around docs and ... more


Friday, 14 April, 2017 UTC

js: Access Webpack Dev Server from Mobile Safari on an iPhone

js: Access Webpack Dev Server from Mobile Safari on an iPhone

Testing your sites on mobile devices is a critical part of the development process. Webpack dev server enables you to visit the server from any device using the `host` option. This lesson walks you through accessing webpack dev server using an iPhone. ... more


Thursday, 13 April, 2017 UTC

[Course] vue: Build a Server Rendered Vue.js App with Nuxt and Vuex

[Course] vue: Build a Server Rendered Vue.js App with Nuxt and Vuex

Vue.js has a first-class ecosystem to help construct Vue.js apps. This includes Nuxt.js which enables server-rendered applications and a page-based approach. This course will start with an empty app and walk through how to use Vue.js for building the ... more


Tuesday, 4 April, 2017 UTC

js: Understand Function Composition By Building Compose and ComposeAll Utility Functions

js: Understand Function Composition By Building Compose and ComposeAll Utility Functions

Function composition allows us to build up powerful functions from smaller, more focused functions. In this lesson we'll demystify how function composition works by building our own `compose` and `composeAll` functions. ... more


Thursday, 30 March, 2017 UTC

node: Setup Nodemon to automatically restart the server

node: Setup Nodemon to automatically restart the server

Soon or later, we get tired of having to manually restart our Node.js application. We will install and configure [Nodemon](https://github.com/remy/nodemon) to help us with that headache. Remember to install it as a development dependency with `yarn add ... more


Thursday, 30 March, 2017 UTC

js: Add a Google OAuth 2.0 Login Button to Your Site

js: Add a Google OAuth 2.0 Login Button to Your Site

Many sites rely on Google's login functionality for creating accounts. This lesson walks you through using the Google OAuth 2.0 api to login to Google and access the basic profile information for your own site. ... more


Wednesday, 29 March, 2017 UTC

[Course] js: Publish JavaScript packages on npm

[Course] js: Publish JavaScript packages on npm

npm is like a giant library of code building blocks. There are tons of these “blocks”, aka “packages” that we can compose together to build cool things. We can use packages by other developers, but we can also write and publish our own. In this course ... more


Friday, 24 March, 2017 UTC

typescript: Getting started with Jest using TypeScript

typescript: Getting started with Jest using TypeScript

Jest is a painless JavaScript unit testing framework from Facebook. It is designed to be super easy to setup and is packed full of powerful features. In this lesson we see how easy it is to add to your TypeScript project. This will be followed by a quick ... more


Thursday, 23 March, 2017 UTC

node: Persist in-memory data to a file when developing Node.js LoopBack API's

node: Persist in-memory data to a file when developing Node.js LoopBack API's

In this lesson you will learn how to persist the data from the memory connector. As the name suggests, the memory connector stores the data in memory. This means that if you restart the server, the data is gone. In development mode it can be useful to ... more


Wednesday, 22 March, 2017 UTC

node: Create a model to persist data in a Node.js LoopBack API

node: Create a model to persist data in a Node.js LoopBack API

In this lesson you will learn what a LoopBack model is, you will create a Product model using the LoopbBack CLI. The product model will be based off the built-in PersistedModel which gives it basic functionality like Create, Ready, Update, Delete and ... more


Tuesday, 21 March, 2017 UTC

[Course] angular2: Use Objective C, Swift and Java api’s in NativeScript for Angular iOS and Android apps

[Course] angular2: Use Objective C, Swift and Java api’s in NativeScript for Angular iOS and Android apps

One of the really exciting aspects of NativeScript is the ability to write Objective C, Swift and Java apis directly from JavaScript and of course TypeScript. In this course, we will learn how to code directly against these powerful native api’s with ... more


Tuesday, 21 March, 2017 UTC

typescript: Serialize objects to JSON

typescript: Serialize objects to JSON

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. Doing JSON serialization and deserialization in JavaScript and TypeScript is super easy ... more


Tuesday, 21 March, 2017 UTC

node: Create a modern web API using Koa v2 and ES2017

node: Create a modern web API using Koa v2 and ES2017

We take advantage of the new Node.js features like `async/await` from ES2017 and the awesome `yarn` package-manager to create modern JSON APIs with Koa v2. Make sure you have at least Node.js 7.6.x installed. The `ctx` (context) variable encapsulates ... more


Tuesday, 21 March, 2017 UTC

js: Use a Javascript Array to Construct a Maybe

js: Use a Javascript Array to Construct a Maybe

Much of our code in real life is full of if statements that check the validity of a given input to see if a given computation should be performed. Using the ever popular Maybe construction allows us capture this disjunction in one place, keeping our functions ... more


Friday, 17 March, 2017 UTC

js: Get Deeply Nested Properties Safely with Ramda's path and pathOr Functions

js: Get Deeply Nested Properties Safely with Ramda's path and pathOr Functions

In this lesson we'll see how Ramda's `path` and `pathOr` functions can be used to safely access a deeply nested property from an object while avoiding the dreaded checks for `undefined` at each new property in the desired path. ... more


Thursday, 16 March, 2017 UTC

js: Create a Reusable Mapping Function with Ramda's Map

js: Create a Reusable Mapping Function with Ramda's Map

Using the map method of an array is a great way to create new data from an existing array in an immutable way and without writing any loops. The problem is that you need to call it on an existing array instance. In the lesson we'll see how to build our ... more


Thursday, 16 March, 2017 UTC

js: Capture Drawings and Signatures in a NativeScript app

js: Capture Drawings and Signatures in a NativeScript app

Using the [NativeScript-DrawingPad](https://github.com/bradmartin/nativescript-drawingpad) plugin in a NativeScript app you can create a drawing pad. This is great for capturing signatures or any touch drawing on the device. ... more


Wednesday, 15 March, 2017 UTC

js: Composing emails in a NativeScript app

js: Composing emails in a NativeScript app

We will use the [NativeScript-Email plugin from Eddy Verbruggen](https://github.com/EddyVerbruggen/nativescript-email) to compose email messages from our app that the user can send out. ... more


Tuesday, 14 March, 2017 UTC

js: Using the device Phone and SMS with NativeScript

js: Using the device Phone and SMS with NativeScript

We will use the [nativescript-phone plugin](https://github.com/msywensky/nativescript-phone) which provides a simple API to access the device's default phone and SMS applications. This allows us to dial phone numbers from our app using the device's phone ... more


Tuesday, 14 March, 2017 UTC

js: Using Speech Recognition with NativeScript

js: Using Speech Recognition with NativeScript

We will use the [NativeScript Speech Recognition plugin by Eddy Verbruggen](https://github.com/EddyVerbruggen/nativescript-speech-recognition) to convert speech to text. The plugin provides a clean abstraction over the [Android SpeechRecognizer](https://developer.android.com/reference/android/speech/SpeechRecognizer.html) ... more


Tuesday, 14 March, 2017 UTC

js: Use Speech Recognition with NativeScript

js: Use Speech Recognition with NativeScript

We will use the [NativeScript Speech Recognition plugin by Eddy Verbruggen](https://github.com/EddyVerbruggen/nativescript-speech-recognition) to convert speech to text. The plugin provides a clean abstraction over the [Android SpeechRecognizer](https://developer.android.com/reference/android/speech/SpeechRecognizer.html) ... more


Monday, 13 March, 2017 UTC

node: Initialize a LoopBack Node.js Project through the CLI

node: Initialize a LoopBack Node.js Project through the CLI

LoopBack is a framework built on top of Express for creating APIs. It allows you to create end-to-end REST APIs that can access data from many data sources such as MondoDB, PostgreSQL, MySQL or other REST APIs. In this lesson you will learn how to install ... more


Monday, 13 March, 2017 UTC

typescript: Using ES6 and ESNext with TypeScript

typescript: Using ES6 and ESNext with TypeScript

TypeScript is very particular about what is and isn't allowed in a TS file to protect you from common developer errors. By default if you set the compile target to ES5 it only allows you to use globally defined variables that were available in the ES5 ... more


Friday, 10 March, 2017 UTC

js: Convert a Promise.all Result to an Object with Ramda's zip and zipObj

js: Convert a Promise.all Result to an Object with Ramda's zip and zipObj

In this lesson, we'll use `Promise.all` to get an array that contains the resolved values from multiple promises. Then we'll see how we can use Ramda to convert that array of values into a single object using `zip` with `fromPairs`. Then we'll refactor ... more


Thursday, 9 March, 2017 UTC

[Course] js: Write simple asynchronous code with JavaScript generators

[Course] js: Write simple asynchronous code with JavaScript generators

Generators are a useful tool for handling asynchrony in your JavaScript applications. They were added to JavaScript with ES2015. When applied correctly they allow us to write asynchronous code that looks synchronous. They also turn one of JavaScripts ... more


Thursday, 9 March, 2017 UTC

js: Create a Query String from an Object using Ramda's toPairs function

js: Create a Query String from an Object using Ramda's toPairs function

In this lesson, we'll use Ramda's `toPairs` function, along with `map`, `join`, `concat` and `compose` to create a reusable function that will convert an object to a querystring. ... more


Thursday, 9 March, 2017 UTC

js: Filter an Array Based on Multiple Predicates with Ramda's allPass Function

js: Filter an Array Based on Multiple Predicates with Ramda's allPass Function

In this lesson, we'll filter a list of objects based on multiple conditions and we'll use Ramda's `allPass` function to create a joint predicate from multiple, individual predicate functions. ... more