-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/topics/03. UI-Components/demos/BtnApp/app/views/main/main-page.js b/Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main-page.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/03. UI-Components/demos/BtnApp/app/views/main/main-page.js
rename to Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main-page.js
diff --git a/topics/03. UI-Components/demos/BtnApp/app/views/main/main-page.xml b/Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main-page.xml
old mode 100755
new mode 100644
similarity index 100%
rename from topics/03. UI-Components/demos/BtnApp/app/views/main/main-page.xml
rename to Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main-page.xml
diff --git a/topics/03. UI-Components/demos/BtnApp/app/views/main/main.css b/Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main.css
old mode 100755
new mode 100644
similarity index 94%
rename from topics/03. UI-Components/demos/BtnApp/app/views/main/main.css
rename to Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main.css
index d70e3c5..605f4a2
--- a/topics/03. UI-Components/demos/BtnApp/app/views/main/main.css
+++ b/Topics-old/03. UI-Components/demos/BtnApp/app/views/main/main.css
@@ -1,3 +1,3 @@
-.btn-new{
- background-color: red;
+.btn-new{
+ background-color: red;
}
\ No newline at end of file
diff --git a/topics/03. UI-Components/demos/BtnApp/app/views/web/web-page.js b/Topics-old/03. UI-Components/demos/BtnApp/app/views/web/web-page.js
old mode 100755
new mode 100644
similarity index 95%
rename from topics/03. UI-Components/demos/BtnApp/app/views/web/web-page.js
rename to Topics-old/03. UI-Components/demos/BtnApp/app/views/web/web-page.js
index 29cf357..5198c6a
--- a/topics/03. UI-Components/demos/BtnApp/app/views/web/web-page.js
+++ b/Topics-old/03. UI-Components/demos/BtnApp/app/views/web/web-page.js
@@ -1,13 +1,13 @@
-var pageModules = (function() {
-
- var pageModules = {
- onLoaded: function(args) {
- var page = args.object;
- page.bindingContext = page.navigationContext;
- }
- }
-
- return pageModules
-})();
-
-exports.onLoaded = pageModules.onLoaded;
+var pageModules = (function() {
+
+ var pageModules = {
+ onLoaded: function(args) {
+ var page = args.object;
+ page.bindingContext = page.navigationContext;
+ }
+ }
+
+ return pageModules
+})();
+
+exports.onLoaded = pageModules.onLoaded;
diff --git a/topics/03. UI-Components/demos/BtnApp/app/views/web/web-page.xml b/Topics-old/03. UI-Components/demos/BtnApp/app/views/web/web-page.xml
old mode 100755
new mode 100644
similarity index 97%
rename from topics/03. UI-Components/demos/BtnApp/app/views/web/web-page.xml
rename to Topics-old/03. UI-Components/demos/BtnApp/app/views/web/web-page.xml
index bc0513a..bf90556
--- a/topics/03. UI-Components/demos/BtnApp/app/views/web/web-page.xml
+++ b/Topics-old/03. UI-Components/demos/BtnApp/app/views/web/web-page.xml
@@ -1,4 +1,4 @@
-
-
-
-
+
+
+
+
diff --git a/topics/03. UI-Components/demos/BtnApp/package.json b/Topics-old/03. UI-Components/demos/BtnApp/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/03. UI-Components/demos/BtnApp/package.json
rename to Topics-old/03. UI-Components/demos/BtnApp/package.json
diff --git a/topics/03. UI-Components/slides/README.md b/Topics-old/03. UI-Components/slides/README.md
similarity index 95%
rename from topics/03. UI-Components/slides/README.md
rename to Topics-old/03. UI-Components/slides/README.md
index beaa188..f7f5a21 100644
--- a/topics/03. UI-Components/slides/README.md
+++ b/Topics-old/03. UI-Components/slides/README.md
@@ -1,553 +1,553 @@
-
-
-# UI and UI Components
-## Telerik NativeScript
-
-
-
-
-
-# Table of Contents
-- UI Components
-- Bindings Basics
-
-
-
-
-
-
-
-
-
-# The Basics
-
-- The UI of your app could be implemented with separate pages for each app screen
-- Or your application could use tab view with multiple screens in one page
-- For each page you need `.xml` file for the layout
-- For each `.xml` file, NativeScript searches for `.js` or `.ts` file for the business logic of the page
-- Each app have a Home page
-- To access variables or functions from the UI, you need to declare them in the `exports` object in the module
-
-
-
-# The Basics
-- you can specify code files and CSS files for your `.xml` using attributes
- - `codeFile`
- - `cssFile`
-
-```js
-
-
- ...
-
-
-```
-
-
-# The Basics
-- Provides a wide range of built-in user interface components
- - `layouts`
- - `widgets`
-- When your XML files are parsed NativeScript looks for components which match a name in the module `exports`
-
-```js
-var view = require("ui/core/view");
-var Button = (function (_super) {
- __extends(Button, _super);
- function Button() {
- _super.apply(this, arguments);
- }
- return Button;
-})(view.View);
-exports.Button = Button;
-```
-
-# The Basics
-
-- Default content components
- - pages
- - layouts
-- These components let you arrange your your user interactive components in specific ways
-
-
-
-
-
-
-# Button
-
-- Require button module
-
-```js
-var buttonModule = require("ui/button");
-var observable = require("data/observable");
-```
-- Tap event on button
-
-```xml
-
-```
-
-- Binding text property directly to model
-
-```js
-var model = new observable.Observable();
-var options = {
- sourceProperty: "buttonTitle",
- targetProperty: "text"
-};
-button.bind(options, model);
-model.set("buttonTitle", "Cancel");
-```
-
-
-# Label
-
-- Used for creating a lable text
-- Require label module
-
-```js
-var LabelModule = require("ui/label");
-```
-
-- Binding text property to view-model property
-
-```js
-
-```
-
-- Creating new label and set properties
-
-```js
-var label = new LabelModule.Label();
-label.text = "Some text here";
-label.className = "myClass";
-label.id = "myId";
-```
-
-
-# Label
-
-- Binding text property of `label` to an observable model
-
-```js
-var label = new LabelModule.Label();
-var model = new observableModule.Observable();
-var bindingOptions = {
- sourceProperty: "oldText",
- targetProperty: "text"
-};
-label.bind(bindingOptions, model);
-sourceModel.set("oldText", "changed");
-```
-
-
-# Text field
-
-- Used for creating input field
-- Require text field module
-
-```js
-var textFieldModule = require("ui/text-field");
-```
-
-- Properties of the text field
- - `hint` - like placeholder of input field
- - `text` - text value of the field
- - `secure` - hides text. Used for passwords
-
-
-
-# Text view
-- Used for inputing and showing multiline text
-- Require text view module
-
-```js
-var textFieldModule = require("ui/text-view");
-```
-
-- Properties of the text field
- - `hint` - like placeholder of input field
- - `text` - text value of the field
- - `editable` - makes it editable or not
-
-
-# Search bar
-- The SearchBar provides a user interface for entering search queries and submitting requests to search provider
-- Require search bar module
-
-```js
-var searchBarModule = require("ui/search-bar");
-```
-
-- Events of the serach bar
- - `submit` - submits the serach query
- - `clear` - clears the text. When **x** is pressed or all the text is deleted
-
-
-# Switch
-- Provides a two-state toggle switch with two options
-- Require switch module
-
-```js
-var switchModule = require("ui/switch");
-```
-
-- `propertyChange` event
-
-```js
-
-
-
-```
-
-```js
-function switchPropertyChange(args) {
- if (args.propertyName === "checked") {
- // Your code goes here
- }
-}
-exports.switchPropertyChange = switchPropertyChange;
-```
-
-
-# Slider
-- You can use to pick a numeric value within a configurable range
-- Require slider module
-
-```js
-var sliderModule = require("ui/slider");
-```
-
-- Slider properties
- - `maxValue`
- - `value`
- - `minValue`
-
-
-# Progress
-- Visual bar indicator of a progress in a operation
-- Require progress module
-
-```js
-var progressModule = require("ui/progress");
-```
-
-- Progress properties
- - `value`
- - `maxValue`
-
-
-# Activity indicator
-- Visual spinner indicator which shows that a task is in progress
-- Require activity indicator module
-
-```js
-var activityIndicatorModule = require("ui/activity-indicator");
-```
-
-- Shows it while image is loading
-
-```js
-var image = new imageModule.Image();
-var indicator = new activityIndicatorModule.ActivityIndicator();
-indicator.width = 100;
-indicator.height = 100;
-// Bind the busy property of the indicator to the isLoading property of the image
-indicator.bind({
- sourceProperty: "isLoading",
- targetProperty: "busy"
-}, image);
-```
-
-
-# Image
-- Shows an image.
-- You can load the image can be from ImageSource or from URL
-- Require image module
-
-```js
-var imageModule = require("ui/image");
-```
-
-- There are 4 stretch modes for the image
- - `none`
- - `fill`
- - `aspectFill`
- - `aspectFit`
-
-
-# Image
-
-- Different types of `image` load in `.xml`
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-# List View
-- Require list view module
-
-```js
-var listViewModule = require("ui/list-view");
-```
-- Shows items in a vertically scrolling list
-
-```xml
-
-
-
-
-
-
-
-```
-
-
-# HTML View
-
-- Represents a view with html content
-- Used for static web pages
-
-- Require html view module
-
-```js
-var htmlViewModule = require("ui/html-view");
-```
-
-```xml
-
-
-
-```
-
-
-# Web View
-
-- Shows web pages
-
-- Require web-view view module
-
-```js
-var webViewModule = require("ui/web-view");
-```
-
-```xml
-
-
-
-```
-
-
-# Tab View
-
-- Implements tab navigation
-
-- Require tab-view view module
-
-```js
-var tabViewModule = require("ui/tab-view");
-```
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-
-# Segmented bar
-
-- Implement discrete selection
-
-- Require segmented bar module
-
-```js
-var segmentedBarModule = require("ui/segmented-bar");
-```
-
-```xml
-
-
-
-
-
-
-
-
-
-```
-
-
-# Date and time pickers
-
-- Lets you choose a date
-
-- Require date picker module
-
-```js
-var datePickerModule = require("ui/date-picker");
-```
-
-
-```xml
-
-```
-
-- Require time picker module
-
-```js
-var timePickerModule = require("ui/time-picker");
-```
-
-```xml
-
-```
-
-
-# List picker
-
-- You can pick value from a list
-
-- Require date picker module
-
-```js
-var listPickerModule = require("ui/list-picker");
-```
-
-
-```xml
-
-```
-
-
-# Dialogs
-
-- Lets you create different types of dialogs
-
-- Require date picker module
- - `Alert`
- - `Confirm`
- - `Prompt`
- - `Login`
- - `Action`
-
-
-# Dialogs
-
-- Alert
-
-```js
-dialogs.alert({
- title: "Your title",
- message: "Your message",
- okButtonText: "Your button text"
-}).then(function () {
- console.log("Dialog closed!");
-});
-```
-
-- Confirm
-
-```js
-dialogs.confirm({
- title: "Your title",
- message: "Your message",
- okButtonText: "Your button text",
- cancelButtonText: "Cancel text",
- neutralButtonText: "Neutral text"
-}).then(function (result) {
- // result argument is boolean
- console.log("Dialog result: " + result);
-});
-```
-
-
-# Dialogs
-
-- Prompt
-
-```js
-dialogs.prompt({
- title: "Your title",
- message: "Your message",
- okButtonText: "Your button text",
- cancelButtonText: "Cancel text",
- neutralButtonText: "Neutral text",
- defaultText: "Default text",
- inputType: dialogs.inputType.password
-}).then(function (r) {
- console.log("Dialog result: " + r.result + ", text: " + r.text);
-});
-```
-
-
-# Dialogs
-- Login
-
-```js
-dialogs.login({
- title: "Your title",
- message: "Your message",
- okButtonText: "Your button text",
- cancelButtonText: "Cancel button text",
- neutralButtonText: "Neutral button text",
- userName: "User name label text",
- password: "Password label text"
-}).then(function (r) {
- console.log("Dialog result: " + r.result + ", user: " + r.userName + ", pwd: " + r.password);
-});
-```
-
-
-# Dialogs
-
-- Action
-
-```js
-dialogs.action({
- message: "Your message",
- cancelButtonText: "Cancel text",
- actions: ["Option1", "Option2"]
-}).then(function (result) {
- console.log("Dialog result: " + result)
-});
-```
-
-
-
-
-
-
-
-
-[link to the forum](http://telerikacademy.com/Forum/Category/70/mobile-apps-with-native-script)
+
+
+# UI and UI Components
+## Telerik NativeScript
+
+
+
+
+
+# Table of Contents
+- UI Components
+- Bindings Basics
+
+
+
+
+
+
+
+
+
+# The Basics
+
+- The UI of your app could be implemented with separate pages for each app screen
+- Or your application could use tab view with multiple screens in one page
+- For each page you need `.xml` file for the layout
+- For each `.xml` file, NativeScript searches for `.js` or `.ts` file for the business logic of the page
+- Each app have a Home page
+- To access variables or functions from the UI, you need to declare them in the `exports` object in the module
+
+
+
+# The Basics
+- you can specify code files and CSS files for your `.xml` using attributes
+ - `codeFile`
+ - `cssFile`
+
+```js
+
+
+ ...
+
+
+```
+
+
+# The Basics
+- Provides a wide range of built-in user interface components
+ - `layouts`
+ - `widgets`
+- When your XML files are parsed NativeScript looks for components which match a name in the module `exports`
+
+```js
+var view = require("ui/core/view");
+var Button = (function (_super) {
+ __extends(Button, _super);
+ function Button() {
+ _super.apply(this, arguments);
+ }
+ return Button;
+})(view.View);
+exports.Button = Button;
+```
+
+# The Basics
+
+- Default content components
+ - pages
+ - layouts
+- These components let you arrange your your user interactive components in specific ways
+
+
+
+
+
+
+# Button
+
+- Require button module
+
+```js
+var buttonModule = require("ui/button");
+var observable = require("data/observable");
+```
+- Tap event on button
+
+```xml
+
+```
+
+- Binding text property directly to model
+
+```js
+var model = new observable.Observable();
+var options = {
+ sourceProperty: "buttonTitle",
+ targetProperty: "text"
+};
+button.bind(options, model);
+model.set("buttonTitle", "Cancel");
+```
+
+
+# Label
+
+- Used for creating a lable text
+- Require label module
+
+```js
+var LabelModule = require("ui/label");
+```
+
+- Binding text property to view-model property
+
+```js
+
+```
+
+- Creating new label and set properties
+
+```js
+var label = new LabelModule.Label();
+label.text = "Some text here";
+label.className = "myClass";
+label.id = "myId";
+```
+
+
+# Label
+
+- Binding text property of `label` to an observable model
+
+```js
+var label = new LabelModule.Label();
+var model = new observableModule.Observable();
+var bindingOptions = {
+ sourceProperty: "oldText",
+ targetProperty: "text"
+};
+label.bind(bindingOptions, model);
+sourceModel.set("oldText", "changed");
+```
+
+
+# Text field
+
+- Used for creating input field
+- Require text field module
+
+```js
+var textFieldModule = require("ui/text-field");
+```
+
+- Properties of the text field
+ - `hint` - like placeholder of input field
+ - `text` - text value of the field
+ - `secure` - hides text. Used for passwords
+
+
+
+# Text view
+- Used for inputing and showing multiline text
+- Require text view module
+
+```js
+var textFieldModule = require("ui/text-view");
+```
+
+- Properties of the text field
+ - `hint` - like placeholder of input field
+ - `text` - text value of the field
+ - `editable` - makes it editable or not
+
+
+# Search bar
+- The SearchBar provides a user interface for entering search queries and submitting requests to search provider
+- Require search bar module
+
+```js
+var searchBarModule = require("ui/search-bar");
+```
+
+- Events of the serach bar
+ - `submit` - submits the serach query
+ - `clear` - clears the text. When **x** is pressed or all the text is deleted
+
+
+# Switch
+- Provides a two-state toggle switch with two options
+- Require switch module
+
+```js
+var switchModule = require("ui/switch");
+```
+
+- `propertyChange` event
+
+```js
+
+
+
+```
+
+```js
+function switchPropertyChange(args) {
+ if (args.propertyName === "checked") {
+ // Your code goes here
+ }
+}
+exports.switchPropertyChange = switchPropertyChange;
+```
+
+
+# Slider
+- You can use to pick a numeric value within a configurable range
+- Require slider module
+
+```js
+var sliderModule = require("ui/slider");
+```
+
+- Slider properties
+ - `maxValue`
+ - `value`
+ - `minValue`
+
+
+# Progress
+- Visual bar indicator of a progress in a operation
+- Require progress module
+
+```js
+var progressModule = require("ui/progress");
+```
+
+- Progress properties
+ - `value`
+ - `maxValue`
+
+
+# Activity indicator
+- Visual spinner indicator which shows that a task is in progress
+- Require activity indicator module
+
+```js
+var activityIndicatorModule = require("ui/activity-indicator");
+```
+
+- Shows it while image is loading
+
+```js
+var image = new imageModule.Image();
+var indicator = new activityIndicatorModule.ActivityIndicator();
+indicator.width = 100;
+indicator.height = 100;
+// Bind the busy property of the indicator to the isLoading property of the image
+indicator.bind({
+ sourceProperty: "isLoading",
+ targetProperty: "busy"
+}, image);
+```
+
+
+# Image
+- Shows an image.
+- You can load the image can be from ImageSource or from URL
+- Require image module
+
+```js
+var imageModule = require("ui/image");
+```
+
+- There are 4 stretch modes for the image
+ - `none`
+ - `fill`
+ - `aspectFill`
+ - `aspectFit`
+
+
+# Image
+
+- Different types of `image` load in `.xml`
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+# List View
+- Require list view module
+
+```js
+var listViewModule = require("ui/list-view");
+```
+- Shows items in a vertically scrolling list
+
+```xml
+
+
+
+
+
+
+
+```
+
+
+# HTML View
+
+- Represents a view with html content
+- Used for static web pages
+
+- Require html view module
+
+```js
+var htmlViewModule = require("ui/html-view");
+```
+
+```xml
+
+
+
+```
+
+
+# Web View
+
+- Shows web pages
+
+- Require web-view view module
+
+```js
+var webViewModule = require("ui/web-view");
+```
+
+```xml
+
+
+
+```
+
+
+# Tab View
+
+- Implements tab navigation
+
+- Require tab-view view module
+
+```js
+var tabViewModule = require("ui/tab-view");
+```
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+# Segmented bar
+
+- Implement discrete selection
+
+- Require segmented bar module
+
+```js
+var segmentedBarModule = require("ui/segmented-bar");
+```
+
+```xml
+
+
+
+
+
+
+
+
+
+```
+
+
+# Date and time pickers
+
+- Lets you choose a date
+
+- Require date picker module
+
+```js
+var datePickerModule = require("ui/date-picker");
+```
+
+
+```xml
+
+```
+
+- Require time picker module
+
+```js
+var timePickerModule = require("ui/time-picker");
+```
+
+```xml
+
+```
+
+
+# List picker
+
+- You can pick value from a list
+
+- Require date picker module
+
+```js
+var listPickerModule = require("ui/list-picker");
+```
+
+
+```xml
+
+```
+
+
+# Dialogs
+
+- Lets you create different types of dialogs
+
+- Require date picker module
+ - `Alert`
+ - `Confirm`
+ - `Prompt`
+ - `Login`
+ - `Action`
+
+
+# Dialogs
+
+- Alert
+
+```js
+dialogs.alert({
+ title: "Your title",
+ message: "Your message",
+ okButtonText: "Your button text"
+}).then(function () {
+ console.log("Dialog closed!");
+});
+```
+
+- Confirm
+
+```js
+dialogs.confirm({
+ title: "Your title",
+ message: "Your message",
+ okButtonText: "Your button text",
+ cancelButtonText: "Cancel text",
+ neutralButtonText: "Neutral text"
+}).then(function (result) {
+ // result argument is boolean
+ console.log("Dialog result: " + result);
+});
+```
+
+
+# Dialogs
+
+- Prompt
+
+```js
+dialogs.prompt({
+ title: "Your title",
+ message: "Your message",
+ okButtonText: "Your button text",
+ cancelButtonText: "Cancel text",
+ neutralButtonText: "Neutral text",
+ defaultText: "Default text",
+ inputType: dialogs.inputType.password
+}).then(function (r) {
+ console.log("Dialog result: " + r.result + ", text: " + r.text);
+});
+```
+
+
+# Dialogs
+- Login
+
+```js
+dialogs.login({
+ title: "Your title",
+ message: "Your message",
+ okButtonText: "Your button text",
+ cancelButtonText: "Cancel button text",
+ neutralButtonText: "Neutral button text",
+ userName: "User name label text",
+ password: "Password label text"
+}).then(function (r) {
+ console.log("Dialog result: " + r.result + ", user: " + r.userName + ", pwd: " + r.password);
+});
+```
+
+
+# Dialogs
+
+- Action
+
+```js
+dialogs.action({
+ message: "Your message",
+ cancelButtonText: "Cancel text",
+ actions: ["Option1", "Option2"]
+}).then(function (result) {
+ console.log("Dialog result: " + result)
+});
+```
+
+
+
+
+
+
+
+
+[link to the forum](http://telerikacademy.com/Forum/Category/70/mobile-apps-with-native-script)
diff --git a/topics/03. UI-Components/slides/index.html b/Topics-old/03. UI-Components/slides/index.html
similarity index 100%
rename from topics/03. UI-Components/slides/index.html
rename to Topics-old/03. UI-Components/slides/index.html
diff --git a/topics/03. UI-Components/slides/open.js b/Topics-old/03. UI-Components/slides/open.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/03. UI-Components/slides/open.js
rename to Topics-old/03. UI-Components/slides/open.js
diff --git a/topics/03. UI-Components/slides/package.json b/Topics-old/03. UI-Components/slides/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/03. UI-Components/slides/package.json
rename to Topics-old/03. UI-Components/slides/package.json
diff --git a/topics/04. Layouts/README.md b/Topics-old/04. Layouts/README.md
similarity index 100%
rename from topics/04. Layouts/README.md
rename to Topics-old/04. Layouts/README.md
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/Thumbs.db b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/Thumbs.db
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/Thumbs.db
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/Thumbs.db
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/icon.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/icon.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/Thumbs.db b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/Thumbs.db
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/Thumbs.db
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/Thumbs.db
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/icon.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/icon.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/Thumbs.db b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/Thumbs.db
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/Thumbs.db
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/Thumbs.db
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/icon.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/icon.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/Thumbs.db b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/Thumbs.db
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/Thumbs.db
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/Thumbs.db
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-568h@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-568h@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-568h@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-667h@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-667h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-667h@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-667h@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-736h@3x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-736h@3x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-736h@3x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-736h@3x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-568h@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-568h@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-568h@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-667h@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-667h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-667h@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape-667h@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@3x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@3x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@3x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Landscape@3x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default-Portrait@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Default@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small-50@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/Icon-Small@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-40@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-60@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-72@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon-76@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon.png
diff --git a/topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon@2x.png b/Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon@2x.png
rename to Topics-old/04. Layouts/demos/Layouts/app/App_Resources/iOS/icon@2x.png
diff --git a/topics/04. Layouts/demos/Layouts/app/app.css b/Topics-old/04. Layouts/demos/Layouts/app/app.css
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/app.css
rename to Topics-old/04. Layouts/demos/Layouts/app/app.css
diff --git a/topics/04. Layouts/demos/Layouts/app/app.js b/Topics-old/04. Layouts/demos/Layouts/app/app.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/app.js
rename to Topics-old/04. Layouts/demos/Layouts/app/app.js
diff --git a/topics/04. Layouts/demos/Layouts/app/package.json b/Topics-old/04. Layouts/demos/Layouts/app/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/package.json
rename to Topics-old/04. Layouts/demos/Layouts/app/package.json
diff --git a/topics/04. Layouts/demos/Layouts/app/references.d.ts b/Topics-old/04. Layouts/demos/Layouts/app/references.d.ts
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/references.d.ts
rename to Topics-old/04. Layouts/demos/Layouts/app/references.d.ts
diff --git a/topics/04. Layouts/demos/Layouts/app/views/main/main-page.js b/Topics-old/04. Layouts/demos/Layouts/app/views/main/main-page.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/views/main/main-page.js
rename to Topics-old/04. Layouts/demos/Layouts/app/views/main/main-page.js
diff --git a/topics/04. Layouts/demos/Layouts/app/views/main/main-page.xml b/Topics-old/04. Layouts/demos/Layouts/app/views/main/main-page.xml
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/app/views/main/main-page.xml
rename to Topics-old/04. Layouts/demos/Layouts/app/views/main/main-page.xml
diff --git a/topics/04. Layouts/demos/Layouts/package.json b/Topics-old/04. Layouts/demos/Layouts/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/demos/Layouts/package.json
rename to Topics-old/04. Layouts/demos/Layouts/package.json
diff --git a/topics/04. Layouts/slides/README.md b/Topics-old/04. Layouts/slides/README.md
similarity index 97%
rename from topics/04. Layouts/slides/README.md
rename to Topics-old/04. Layouts/slides/README.md
index 16c389a..c54b690 100644
--- a/topics/04. Layouts/slides/README.md
+++ b/Topics-old/04. Layouts/slides/README.md
@@ -1,200 +1,200 @@
-
-
-# Layouts
-## Telerik NativeScript
-
-
-
-
-
-# Table of Contents
-- Layout process
- - Measure pass
- - Layout pass
- - Alignment
- - Margins
- - Paddings
-- Layouts
- - Predefined layouts
-
-
-
-
-
-
-
-# Layout process
-
-- Process of measuring and positioning the child views of a Layout container
-- Layout is an intensive process
-- The speed and performance depend on the count of the children and the complexity of the layout container
-
-- Layout completes in two passes
- - measure pass
- - layout pass
-- Every layout container provides its own onMeasure() and onLayout()
-
-
-# Measure pass
-
-- In the measure pass, each View is measured to retrieve its desired size
-- The measure pass evaluates the following properties
- - width
- - height
- - minWidth
- - minHeight
- - visibility
- - marginTop
- - marginRight
- - marginBotton
- - marginLeft
-
-
-# Layout pass
-
-- During the layout pass, each View is placed in a specific layout slot
-- This slot is determined by the desired size of the view (retrieved from the measure pass) and the following properties:
- - marginTop
- - marginRight
- - marginBottom
- - marginLeft
- - horizontalAlignment
- - verticalAlignment
-
-
-# Alignment
-
-- Layout applies horizontal and vertical alignment only when an element is allocated more size than it needs
-
-- Horizontal alignment
-
-| Member | Description |
-|:--------|:----------------------------------------------------------------------------------------------------|
-| left | The view is aligned to the left of the layout slot of the parent element. |
-| center | The view is aligned to the center of the layout slot of the parent element. |
-| right | The view is aligned to the right of the layout slot of the parent element. |
-| stretch | The view is stretched to fill the layout slot of the parent element. width takes precedence, if set.|
-
-
-# Alignment
-
-- Vertical alignment
-
-| Member | Description |
-|:--------|:-------------------------------------------------------------------------------------------------------|
-| top | The view is aligned to the top of the layout slot of the parent element. |
-| center | The view is aligned to the center of the layout slot of the parent element. |
-| bottom | The view is aligned to the bottom of the layout slot of the parent element. |
-| stretch | The view is stretched to fill the layout slot of the parent element. height takes precedence, if set. |
-
-
-# Margins and Paddings
-- `Margins` - describe the distance between a view and its parent
-- `Paddings` - describe the distance between the layout container and its children
-- The four margin properties:
- - `marginTop [paddingTop]`
- - `marginRight [paddingRight]`
- - `marginBottom [paddingBottom]`
- - `marginLeft [paddingLeft]`
-
-
-# Margins and Paddings
-
-- Through XML, you can choose between the following approaches
-
- - `Set one value`: For all the sides
- - `Set two values`: Starting from the top clockwise `[first] [second] [first] [second]`
- - `Set four values`: Startin from the top clockwise `[first] [second] [third] [fourth]`
-
-
-
-
-
-
-
-# Layouts
-
-- Layout is the base class for all views
-- Provides positioning of child elements
-- You can use the various layout containers to position elements
-- They evaluate the base properties of View such as width, height, minWidth and alignments, and expose additional properties for positioning child views (such as the four paddings)
-
-
-# Predefined Layouts
-
-- There are 5 types of predefined layouts
- - **AbsoluteLayout**
- - **DockLayout**
- - **GridLayout**
- - **StackLayout**
- - **WrapLayout**
-
-
-# Absolute Layout
-
-- The `AbsoluteLayout` us the simplest layout in NativeScript
-- It uses absolute left-top coordinates to position its children
-- The `AbsoluteLayout` will not enforce any layout constraints on its children and will not resize them at runtime when its size changes
-
- - **left** - distance, in pixels, between the left edge of the child and the left edge of its parent container
- - **top** - distance, in pixels, between the top edge of the child and the top edge of its parent container
-
-
-# Dock Layout
-
-- The `DockLayout` is a layout that provides an docking mechanism
-- Child could be docked to the `left`, `right`, `top`, `bottom` or center of the layout
-- To define the docking side of a child element, use its `dock` property
-
-
-# Dock Layout
-- To dock a child element to the center of the `DockLayout`, it must be the last child of the `DockLayout` and the `stretchLastChild` property of the `DockLayout` must be set to true
-
- - **stretchLastChild** - indicates whether the last child element within a `DockLayout` stretches to fill the remaining available space
- - **dock** - position of a child element that is inside a `DockLayout`
-
-
-# Grid Layout
-- The `GridLayout` is a layout that arranges its child elements in a table structure of rows and columns
-- A cell can contain multiple child elements, they can span over multiple rows and columns, and even overlap each other.
-- The GridLayout has one column and one row by default.
-- To add additional columns and rows, you have to specify column definition items
-- The width of a column and the height of a row can be specified in three ways
- - **Absolute** - fixed size of pixels
- - **Star** `(*)` - takes as much space as available
- - **Auto** - takes as much space as needed
-
-
-# Grid Layout
-- Properties
- - **columns** - width of the columns
- - **rows** - height of the rows
- - **col**
- - **row**
- - **rowSpan**
- - **colSpan**
-
-
-# Stack Layout
-- The StackLayout stacks its child elements below or beside each other
-- It is very useful to create any kinds of lists
- - the `orientation` property specifies the stack direction
-
-
-# Wrap Layout
-- The WrapLayout is similar to the StackLayout
-- Wraps the childs to new columns/rows if no space is left
-- The WrapLayout is often used with items of the same size
- - **orientation**
- - **itemWidth**
- - **itemHeight**
-
-
-
-
-[link to the forum](http://telerikacademy.com/Forum/Category/70/mobile-apps-with-native-script)
+
+
+# Layouts
+## Telerik NativeScript
+
+
+
+
+
+# Table of Contents
+- Layout process
+ - Measure pass
+ - Layout pass
+ - Alignment
+ - Margins
+ - Paddings
+- Layouts
+ - Predefined layouts
+
+
+
+
+
+
+
+# Layout process
+
+- Process of measuring and positioning the child views of a Layout container
+- Layout is an intensive process
+- The speed and performance depend on the count of the children and the complexity of the layout container
+
+- Layout completes in two passes
+ - measure pass
+ - layout pass
+- Every layout container provides its own onMeasure() and onLayout()
+
+
+# Measure pass
+
+- In the measure pass, each View is measured to retrieve its desired size
+- The measure pass evaluates the following properties
+ - width
+ - height
+ - minWidth
+ - minHeight
+ - visibility
+ - marginTop
+ - marginRight
+ - marginBotton
+ - marginLeft
+
+
+# Layout pass
+
+- During the layout pass, each View is placed in a specific layout slot
+- This slot is determined by the desired size of the view (retrieved from the measure pass) and the following properties:
+ - marginTop
+ - marginRight
+ - marginBottom
+ - marginLeft
+ - horizontalAlignment
+ - verticalAlignment
+
+
+# Alignment
+
+- Layout applies horizontal and vertical alignment only when an element is allocated more size than it needs
+
+- Horizontal alignment
+
+| Member | Description |
+|:--------|:----------------------------------------------------------------------------------------------------|
+| left | The view is aligned to the left of the layout slot of the parent element. |
+| center | The view is aligned to the center of the layout slot of the parent element. |
+| right | The view is aligned to the right of the layout slot of the parent element. |
+| stretch | The view is stretched to fill the layout slot of the parent element. width takes precedence, if set.|
+
+
+# Alignment
+
+- Vertical alignment
+
+| Member | Description |
+|:--------|:-------------------------------------------------------------------------------------------------------|
+| top | The view is aligned to the top of the layout slot of the parent element. |
+| center | The view is aligned to the center of the layout slot of the parent element. |
+| bottom | The view is aligned to the bottom of the layout slot of the parent element. |
+| stretch | The view is stretched to fill the layout slot of the parent element. height takes precedence, if set. |
+
+
+# Margins and Paddings
+- `Margins` - describe the distance between a view and its parent
+- `Paddings` - describe the distance between the layout container and its children
+- The four margin properties:
+ - `marginTop [paddingTop]`
+ - `marginRight [paddingRight]`
+ - `marginBottom [paddingBottom]`
+ - `marginLeft [paddingLeft]`
+
+
+# Margins and Paddings
+
+- Through XML, you can choose between the following approaches
+
+ - `Set one value`: For all the sides
+ - `Set two values`: Starting from the top clockwise `[first] [second] [first] [second]`
+ - `Set four values`: Startin from the top clockwise `[first] [second] [third] [fourth]`
+
+
+
+
+
+
+
+# Layouts
+
+- Layout is the base class for all views
+- Provides positioning of child elements
+- You can use the various layout containers to position elements
+- They evaluate the base properties of View such as width, height, minWidth and alignments, and expose additional properties for positioning child views (such as the four paddings)
+
+
+# Predefined Layouts
+
+- There are 5 types of predefined layouts
+ - **AbsoluteLayout**
+ - **DockLayout**
+ - **GridLayout**
+ - **StackLayout**
+ - **WrapLayout**
+
+
+# Absolute Layout
+
+- The `AbsoluteLayout` us the simplest layout in NativeScript
+- It uses absolute left-top coordinates to position its children
+- The `AbsoluteLayout` will not enforce any layout constraints on its children and will not resize them at runtime when its size changes
+
+ - **left** - distance, in pixels, between the left edge of the child and the left edge of its parent container
+ - **top** - distance, in pixels, between the top edge of the child and the top edge of its parent container
+
+
+# Dock Layout
+
+- The `DockLayout` is a layout that provides an docking mechanism
+- Child could be docked to the `left`, `right`, `top`, `bottom` or center of the layout
+- To define the docking side of a child element, use its `dock` property
+
+
+# Dock Layout
+- To dock a child element to the center of the `DockLayout`, it must be the last child of the `DockLayout` and the `stretchLastChild` property of the `DockLayout` must be set to true
+
+ - **stretchLastChild** - indicates whether the last child element within a `DockLayout` stretches to fill the remaining available space
+ - **dock** - position of a child element that is inside a `DockLayout`
+
+
+# Grid Layout
+- The `GridLayout` is a layout that arranges its child elements in a table structure of rows and columns
+- A cell can contain multiple child elements, they can span over multiple rows and columns, and even overlap each other.
+- The GridLayout has one column and one row by default.
+- To add additional columns and rows, you have to specify column definition items
+- The width of a column and the height of a row can be specified in three ways
+ - **Absolute** - fixed size of pixels
+ - **Star** `(*)` - takes as much space as available
+ - **Auto** - takes as much space as needed
+
+
+# Grid Layout
+- Properties
+ - **columns** - width of the columns
+ - **rows** - height of the rows
+ - **col**
+ - **row**
+ - **rowSpan**
+ - **colSpan**
+
+
+# Stack Layout
+- The StackLayout stacks its child elements below or beside each other
+- It is very useful to create any kinds of lists
+ - the `orientation` property specifies the stack direction
+
+
+# Wrap Layout
+- The WrapLayout is similar to the StackLayout
+- Wraps the childs to new columns/rows if no space is left
+- The WrapLayout is often used with items of the same size
+ - **orientation**
+ - **itemWidth**
+ - **itemHeight**
+
+
+
+
+[link to the forum](http://telerikacademy.com/Forum/Category/70/mobile-apps-with-native-script)
diff --git a/topics/04. Layouts/slides/index.html b/Topics-old/04. Layouts/slides/index.html
similarity index 100%
rename from topics/04. Layouts/slides/index.html
rename to Topics-old/04. Layouts/slides/index.html
diff --git a/topics/04. Layouts/slides/open.js b/Topics-old/04. Layouts/slides/open.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/slides/open.js
rename to Topics-old/04. Layouts/slides/open.js
diff --git a/topics/04. Layouts/slides/package.json b/Topics-old/04. Layouts/slides/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/04. Layouts/slides/package.json
rename to Topics-old/04. Layouts/slides/package.json
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-hdpi/icon.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-hdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-hdpi/icon.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-ldpi/icon.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-ldpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-ldpi/icon.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-mdpi/icon.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-mdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-mdpi/icon.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/a1.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/a1.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/a1.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/a1.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/b1.jpg b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/b1.jpg
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/b1.jpg
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/b1.jpg
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-568h@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-568h@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-568h@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Landscape@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default-Portrait@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Default@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small-50@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/Icon-Small@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-40@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-60@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-72@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon-76@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon.png
diff --git a/topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon@2x.png b/Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon@2x.png
rename to Topics-old/05. Styling/Demos/Fonts/app/App_Resources/iOS/icon@2x.png
diff --git a/topics/05. Styling/Demos/Fonts/app/app.css b/Topics-old/05. Styling/Demos/Fonts/app/app.css
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/app.css
rename to Topics-old/05. Styling/Demos/Fonts/app/app.css
diff --git a/topics/05. Styling/Demos/Fonts/app/app.js b/Topics-old/05. Styling/Demos/Fonts/app/app.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/app.js
rename to Topics-old/05. Styling/Demos/Fonts/app/app.js
diff --git a/topics/05. Styling/Demos/Fonts/app/fonts/FontAwesome.ttf b/Topics-old/05. Styling/Demos/Fonts/app/fonts/FontAwesome.ttf
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/fonts/FontAwesome.ttf
rename to Topics-old/05. Styling/Demos/Fonts/app/fonts/FontAwesome.ttf
diff --git a/topics/05. Styling/Demos/Fonts/app/fonts/IndieFlower.ttf b/Topics-old/05. Styling/Demos/Fonts/app/fonts/IndieFlower.ttf
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/fonts/IndieFlower.ttf
rename to Topics-old/05. Styling/Demos/Fonts/app/fonts/IndieFlower.ttf
diff --git a/topics/05. Styling/Demos/Fonts/app/fonts/JosefinSans-Regular.ttf b/Topics-old/05. Styling/Demos/Fonts/app/fonts/JosefinSans-Regular.ttf
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/fonts/JosefinSans-Regular.ttf
rename to Topics-old/05. Styling/Demos/Fonts/app/fonts/JosefinSans-Regular.ttf
diff --git a/topics/05. Styling/Demos/Fonts/app/fonts/Lobster-Regular.ttf b/Topics-old/05. Styling/Demos/Fonts/app/fonts/Lobster-Regular.ttf
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/fonts/Lobster-Regular.ttf
rename to Topics-old/05. Styling/Demos/Fonts/app/fonts/Lobster-Regular.ttf
diff --git a/topics/05. Styling/Demos/Fonts/app/fonts/Material-Design-Iconic-Font.ttf b/Topics-old/05. Styling/Demos/Fonts/app/fonts/Material-Design-Iconic-Font.ttf
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/fonts/Material-Design-Iconic-Font.ttf
rename to Topics-old/05. Styling/Demos/Fonts/app/fonts/Material-Design-Iconic-Font.ttf
diff --git a/topics/05. Styling/Demos/Fonts/app/fonts/MaterialIcons-Regular.ttf b/Topics-old/05. Styling/Demos/Fonts/app/fonts/MaterialIcons-Regular.ttf
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/fonts/MaterialIcons-Regular.ttf
rename to Topics-old/05. Styling/Demos/Fonts/app/fonts/MaterialIcons-Regular.ttf
diff --git a/topics/05. Styling/Demos/Fonts/app/main-page.css b/Topics-old/05. Styling/Demos/Fonts/app/main-page.css
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/main-page.css
rename to Topics-old/05. Styling/Demos/Fonts/app/main-page.css
diff --git a/topics/05. Styling/Demos/Fonts/app/main-page.js b/Topics-old/05. Styling/Demos/Fonts/app/main-page.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/main-page.js
rename to Topics-old/05. Styling/Demos/Fonts/app/main-page.js
diff --git a/topics/05. Styling/Demos/Fonts/app/main-page.xml b/Topics-old/05. Styling/Demos/Fonts/app/main-page.xml
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/main-page.xml
rename to Topics-old/05. Styling/Demos/Fonts/app/main-page.xml
diff --git a/topics/05. Styling/Demos/Fonts/app/package.json b/Topics-old/05. Styling/Demos/Fonts/app/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/app/package.json
rename to Topics-old/05. Styling/Demos/Fonts/app/package.json
diff --git a/topics/05. Styling/Demos/Fonts/package.json b/Topics-old/05. Styling/Demos/Fonts/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/Demos/Fonts/package.json
rename to Topics-old/05. Styling/Demos/Fonts/package.json
diff --git a/topics/05. Styling/README.md b/Topics-old/05. Styling/README.md
similarity index 100%
rename from topics/05. Styling/README.md
rename to Topics-old/05. Styling/README.md
diff --git a/topics/05. Styling/slides/README.md b/Topics-old/05. Styling/slides/README.md
similarity index 96%
rename from topics/05. Styling/slides/README.md
rename to Topics-old/05. Styling/slides/README.md
index 61124b9..c740e89 100644
--- a/topics/05. Styling/slides/README.md
+++ b/Topics-old/05. Styling/slides/README.md
@@ -1,222 +1,222 @@
-
-
-# Styling
-## Telerik NativeScript
-
-
-
-
-
-# Table of Contents
-- Introduction
-- Applying CSS Styles
-- Supported Selectors
-- Supported Properties
-- Using Fonts
-- Import External CSS
-
-
-
-
-
-
-
-# Introduction
-- You change the looks and appearance of views (elements) in NativeScript with CSS
-- Or changing the style object of the elements in JavaScript
-- Only a subset of the CSS language is supported.
-- Each View instance exposes a style property, which holds all the style properties for the view
-
-
-
-
-
-
-# Applying CSS Styles
-
-- Application wide CSS
- - applies to every application page
-- When the app starts, NativeScript checks for the **app.css** file if such exists and loads the styles
-
-```js
-var application = require("application");
-application.mainModule = "main-page";
-application.cssFile = "style.css";
-application.start();
-```
-
-- The path to the CSS file is relative to the application root folder
-
-
-# Applying CSS Styles
-
-- Page specific CSS
- - applies to the page's UI views
-- When the `.xml` page is loaded, NativeScript looks for a CSS file with the same name if such exists and loads the styles
-
-```js
-var application = require("application");
-application.mainModule = "main-page";
-application.cssFile = "style.css";
-application.start();
-```
-
-- The path to the CSS file is relative to the application root folder
-
-
-# Applying CSS Styles
-
-- After the CSS is applied there are two ways to add more properties
-
- - Add CSS from a string
-
- ```js
- page.addCss("button {background-color: blue}");
- ```
-
- - Add CSS from a file
-
- ```js
- page.addCssFile(cssFileName);
- ```
-- The path to the CSS file is relative to the application root folder
-
-
-# Applying CSS Styles
-
-- There is a way to apply CSS styles using inline CSS in the `.xml` file
-
-```xml
-
-```
-
-- The whole page CSS could be replaced
-
-```js
-page.css = "button { color: red }";
-```
-
-
-# Import External CSS
-
-- External CSS could be imported from local file, url, or resource
-
-- According to documentation
-```css
-@import { url('http://some-domain.com/your-style.css') }
-@import { url('res://your-style.css') }
-@import { url('~/your-style.css') }
-```
-- Tested and working
-```css
-@import '~/your-style.css';
-```
-
-
-
-
-
-
-# Currently supported CSS Selectors
-
-- Currently NativeScript supports only three CSS Selectors
-
- - Type selector
-
- ```css
- button { background-color: gray }
- ```
-
- - Class selector
-
- ```css
- .title { font-size: 32 }
- ```
-
- - ID Selector
-
- ```css
- #login-button { background-color: blue }
- ```
-
-
-# Currently supported CSS Properties
-
-|**CSS** | **Property** |
-|:--------------------|:------------------------|
-|color | color |
-|background-color | backgroundColor |
-|background-image | backgroundImage |
-|background-repeat | backgroundRepeat |
-|background-position | backgroundPosition |
-|background-size | backgroundSize |
-|border-color | borderColor |
-|border-width | borderWidth |
-
-
-# Currently supported CSS Properties
-
-|**CSS** | **Property** |
-|:--------------------|:------------------------|
-|border-radius | borderRadius |
-|font | font |
-|font-family | fontFamily |
-|font-size | fontSize |
-|font-style | fontStyle |
-|font-weight | fontWeight |
-|text-align | textAlignment |
-|vertical-align | verticalAlignment |
-
-
-# Currently supported CSS Properties
-|**CSS** | **Property** |
-|:--------------------|:------------------------|
-|horizontal-align | horizontalAlignment |
-|margin | margin |
-|margin-top | marginTop |
-|margin-right | marginRight |
-|margin-bottom | marginBottom |
-|margin-left | marginLeft |
-|width | width |
-|height | height |
-
-
-
-# Currently supported CSS Properties
-
-|**CSS** | **Property** |
-|:--------------------|:------------------------|
-|min-width | minWidth |
-|min-height | minHeight |
-|padding | padding Sets |
-|padding-top | paddingTop |
-|padding-right | paddingRight |
-|padding-bottom | paddingBottom |
-|padding-left | paddingLeft |
-|visibility | visibility |
-|opacity | opacity |
-
-
-
-
-
-
-
-
-# Fonts
-
-- The font-family property can hold several values
- - serif (ex. Times New Roman)
- - sans-serif (ex. Helvetica)
- - monospace (ex. Courier New)
-
-
-
-
-
-[link to the forum](http://telerikacademy.com/Forum/Category/70/mobile-apps-with-native-script)
+
+
+# Styling
+## Telerik NativeScript
+
+
+
+
+
+# Table of Contents
+- Introduction
+- Applying CSS Styles
+- Supported Selectors
+- Supported Properties
+- Using Fonts
+- Import External CSS
+
+
+
+
+
+
+
+# Introduction
+- You change the looks and appearance of views (elements) in NativeScript with CSS
+- Or changing the style object of the elements in JavaScript
+- Only a subset of the CSS language is supported.
+- Each View instance exposes a style property, which holds all the style properties for the view
+
+
+
+
+
+
+# Applying CSS Styles
+
+- Application wide CSS
+ - applies to every application page
+- When the app starts, NativeScript checks for the **app.css** file if such exists and loads the styles
+
+```js
+var application = require("application");
+application.mainModule = "main-page";
+application.cssFile = "style.css";
+application.start();
+```
+
+- The path to the CSS file is relative to the application root folder
+
+
+# Applying CSS Styles
+
+- Page specific CSS
+ - applies to the page's UI views
+- When the `.xml` page is loaded, NativeScript looks for a CSS file with the same name if such exists and loads the styles
+
+```js
+var application = require("application");
+application.mainModule = "main-page";
+application.cssFile = "style.css";
+application.start();
+```
+
+- The path to the CSS file is relative to the application root folder
+
+
+# Applying CSS Styles
+
+- After the CSS is applied there are two ways to add more properties
+
+ - Add CSS from a string
+
+ ```js
+ page.addCss("button {background-color: blue}");
+ ```
+
+ - Add CSS from a file
+
+ ```js
+ page.addCssFile(cssFileName);
+ ```
+- The path to the CSS file is relative to the application root folder
+
+
+# Applying CSS Styles
+
+- There is a way to apply CSS styles using inline CSS in the `.xml` file
+
+```xml
+
+```
+
+- The whole page CSS could be replaced
+
+```js
+page.css = "button { color: red }";
+```
+
+
+# Import External CSS
+
+- External CSS could be imported from local file, url, or resource
+
+- According to documentation
+```css
+@import { url('http://some-domain.com/your-style.css') }
+@import { url('res://your-style.css') }
+@import { url('~/your-style.css') }
+```
+- Tested and working
+```css
+@import '~/your-style.css';
+```
+
+
+
+
+
+
+# Currently supported CSS Selectors
+
+- Currently NativeScript supports only three CSS Selectors
+
+ - Type selector
+
+ ```css
+ button { background-color: gray }
+ ```
+
+ - Class selector
+
+ ```css
+ .title { font-size: 32 }
+ ```
+
+ - ID Selector
+
+ ```css
+ #login-button { background-color: blue }
+ ```
+
+
+# Currently supported CSS Properties
+
+|**CSS** | **Property** |
+|:--------------------|:------------------------|
+|color | color |
+|background-color | backgroundColor |
+|background-image | backgroundImage |
+|background-repeat | backgroundRepeat |
+|background-position | backgroundPosition |
+|background-size | backgroundSize |
+|border-color | borderColor |
+|border-width | borderWidth |
+
+
+# Currently supported CSS Properties
+
+|**CSS** | **Property** |
+|:--------------------|:------------------------|
+|border-radius | borderRadius |
+|font | font |
+|font-family | fontFamily |
+|font-size | fontSize |
+|font-style | fontStyle |
+|font-weight | fontWeight |
+|text-align | textAlignment |
+|vertical-align | verticalAlignment |
+
+
+# Currently supported CSS Properties
+|**CSS** | **Property** |
+|:--------------------|:------------------------|
+|horizontal-align | horizontalAlignment |
+|margin | margin |
+|margin-top | marginTop |
+|margin-right | marginRight |
+|margin-bottom | marginBottom |
+|margin-left | marginLeft |
+|width | width |
+|height | height |
+
+
+
+# Currently supported CSS Properties
+
+|**CSS** | **Property** |
+|:--------------------|:------------------------|
+|min-width | minWidth |
+|min-height | minHeight |
+|padding | padding Sets |
+|padding-top | paddingTop |
+|padding-right | paddingRight |
+|padding-bottom | paddingBottom |
+|padding-left | paddingLeft |
+|visibility | visibility |
+|opacity | opacity |
+
+
+
+
+
+
+
+
+# Fonts
+
+- The font-family property can hold several values
+ - serif (ex. Times New Roman)
+ - sans-serif (ex. Helvetica)
+ - monospace (ex. Courier New)
+
+
+
+
+
+[link to the forum](http://telerikacademy.com/Forum/Category/70/mobile-apps-with-native-script)
diff --git a/topics/05. Styling/slides/index.html b/Topics-old/05. Styling/slides/index.html
similarity index 100%
rename from topics/05. Styling/slides/index.html
rename to Topics-old/05. Styling/slides/index.html
diff --git a/topics/05. Styling/slides/open.js b/Topics-old/05. Styling/slides/open.js
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/slides/open.js
rename to Topics-old/05. Styling/slides/open.js
diff --git a/topics/05. Styling/slides/package.json b/Topics-old/05. Styling/slides/package.json
old mode 100755
new mode 100644
similarity index 100%
rename from topics/05. Styling/slides/package.json
rename to Topics-old/05. Styling/slides/package.json
diff --git a/topics/06. Modules/README.md b/Topics-old/06. Modules/README.md
similarity index 100%
rename from topics/06. Modules/README.md
rename to Topics-old/06. Modules/README.md
diff --git a/topics/06. Modules/slides/README.md b/Topics-old/06. Modules/slides/README.md
similarity index 100%
rename from topics/06. Modules/slides/README.md
rename to Topics-old/06. Modules/slides/README.md
diff --git a/topics/06. Modules/slides/index.html b/Topics-old/06. Modules/slides/index.html
similarity index 100%
rename from topics/06. Modules/slides/index.html
rename to Topics-old/06. Modules/slides/index.html
diff --git a/topics/07. Data-binding/README.md b/Topics-old/07. Data-binding/README.md
similarity index 100%
rename from topics/07. Data-binding/README.md
rename to Topics-old/07. Data-binding/README.md
diff --git a/topics/07. Data-binding/slides/README.md b/Topics-old/07. Data-binding/slides/README.md
similarity index 100%
rename from topics/07. Data-binding/slides/README.md
rename to Topics-old/07. Data-binding/slides/README.md
diff --git a/topics/07. Data-binding/slides/index.html b/Topics-old/07. Data-binding/slides/index.html
similarity index 100%
rename from topics/07. Data-binding/slides/index.html
rename to Topics-old/07. Data-binding/slides/index.html
diff --git a/topics/08. Events/README.md b/Topics-old/08. Events/README.md
similarity index 100%
rename from topics/08. Events/README.md
rename to Topics-old/08. Events/README.md
diff --git a/topics/08. Events/demos/.jshintrc b/Topics-old/08. Events/demos/.jshintrc
similarity index 100%
rename from topics/08. Events/demos/.jshintrc
rename to Topics-old/08. Events/demos/.jshintrc
diff --git a/topics/08. Events/demos/app/App_Resources/Android/drawable-hdpi/icon.png b/Topics-old/08. Events/demos/app/App_Resources/Android/drawable-hdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/Android/drawable-hdpi/icon.png
rename to Topics-old/08. Events/demos/app/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/topics/08. Events/demos/app/App_Resources/Android/drawable-ldpi/icon.png b/Topics-old/08. Events/demos/app/App_Resources/Android/drawable-ldpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/Android/drawable-ldpi/icon.png
rename to Topics-old/08. Events/demos/app/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/topics/08. Events/demos/app/App_Resources/Android/drawable-mdpi/icon.png b/Topics-old/08. Events/demos/app/App_Resources/Android/drawable-mdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/Android/drawable-mdpi/icon.png
rename to Topics-old/08. Events/demos/app/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/topics/08. Events/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png b/Topics-old/08. Events/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
rename to Topics-old/08. Events/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-568h@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-568h@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-568h@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-667h@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-667h@2x.png
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-667h@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-667h@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-736h@3x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-736h@3x.png
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-736h@3x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-736h@3x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape@3x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape@3x.png
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Landscape@3x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Landscape@3x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Portrait.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Portrait.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Portrait.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Portrait.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default-Portrait@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Portrait@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default-Portrait@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default-Portrait@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Default@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Default@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Default@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Default@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Icon-Small-50.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small-50.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Icon-Small-50.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small-50.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Icon-Small-50@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Icon-Small.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Icon-Small.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/Icon-Small@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/Icon-Small@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/Icon-Small@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-40.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-40.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-40.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-40.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-40@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-40@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-40@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-40@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-60.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-60.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-60.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-60.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-60@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-60@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-60@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-60@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-72.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-72.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-72.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-72.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-72@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-72@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-72@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-72@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-76.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-76.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-76.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-76.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon-76@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon-76@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon-76@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon-76@2x.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon.png
diff --git a/topics/08. Events/demos/app/App_Resources/iOS/icon@2x.png b/Topics-old/08. Events/demos/app/App_Resources/iOS/icon@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/08. Events/demos/app/App_Resources/iOS/icon@2x.png
rename to Topics-old/08. Events/demos/app/App_Resources/iOS/icon@2x.png
diff --git a/topics/08. Events/demos/app/app.js b/Topics-old/08. Events/demos/app/app.js
similarity index 100%
rename from topics/08. Events/demos/app/app.js
rename to Topics-old/08. Events/demos/app/app.js
diff --git a/topics/08. Events/demos/app/package.json b/Topics-old/08. Events/demos/app/package.json
similarity index 100%
rename from topics/08. Events/demos/app/package.json
rename to Topics-old/08. Events/demos/app/package.json
diff --git a/topics/08. Events/demos/app/references.d.ts b/Topics-old/08. Events/demos/app/references.d.ts
similarity index 100%
rename from topics/08. Events/demos/app/references.d.ts
rename to Topics-old/08. Events/demos/app/references.d.ts
diff --git a/topics/08. Events/demos/app/styles/app.css b/Topics-old/08. Events/demos/app/styles/app.css
similarity index 100%
rename from topics/08. Events/demos/app/styles/app.css
rename to Topics-old/08. Events/demos/app/styles/app.css
diff --git a/topics/08. Events/demos/app/views/main/main-view-model.js b/Topics-old/08. Events/demos/app/views/main/main-view-model.js
similarity index 100%
rename from topics/08. Events/demos/app/views/main/main-view-model.js
rename to Topics-old/08. Events/demos/app/views/main/main-view-model.js
diff --git a/topics/08. Events/demos/app/views/main/main.js b/Topics-old/08. Events/demos/app/views/main/main.js
similarity index 100%
rename from topics/08. Events/demos/app/views/main/main.js
rename to Topics-old/08. Events/demos/app/views/main/main.js
diff --git a/topics/08. Events/demos/app/views/main/main.xml b/Topics-old/08. Events/demos/app/views/main/main.xml
similarity index 100%
rename from topics/08. Events/demos/app/views/main/main.xml
rename to Topics-old/08. Events/demos/app/views/main/main.xml
diff --git a/topics/08. Events/demos/app/views/next/next.js b/Topics-old/08. Events/demos/app/views/next/next.js
similarity index 100%
rename from topics/08. Events/demos/app/views/next/next.js
rename to Topics-old/08. Events/demos/app/views/next/next.js
diff --git a/topics/08. Events/demos/app/views/next/next.xml b/Topics-old/08. Events/demos/app/views/next/next.xml
similarity index 100%
rename from topics/08. Events/demos/app/views/next/next.xml
rename to Topics-old/08. Events/demos/app/views/next/next.xml
diff --git a/topics/08. Events/demos/package.json b/Topics-old/08. Events/demos/package.json
similarity index 100%
rename from topics/08. Events/demos/package.json
rename to Topics-old/08. Events/demos/package.json
diff --git a/topics/08. Events/slides/README.md b/Topics-old/08. Events/slides/README.md
similarity index 100%
rename from topics/08. Events/slides/README.md
rename to Topics-old/08. Events/slides/README.md
diff --git a/topics/08. Events/slides/img/operator-table.png b/Topics-old/08. Events/slides/img/operator-table.png
similarity index 100%
rename from topics/08. Events/slides/img/operator-table.png
rename to Topics-old/08. Events/slides/img/operator-table.png
diff --git a/topics/08. Events/slides/index.html b/Topics-old/08. Events/slides/index.html
similarity index 100%
rename from topics/08. Events/slides/index.html
rename to Topics-old/08. Events/slides/index.html
diff --git a/topics/08. Events/slides/open.js b/Topics-old/08. Events/slides/open.js
similarity index 100%
rename from topics/08. Events/slides/open.js
rename to Topics-old/08. Events/slides/open.js
diff --git a/topics/08. Events/slides/package.json b/Topics-old/08. Events/slides/package.json
similarity index 100%
rename from topics/08. Events/slides/package.json
rename to Topics-old/08. Events/slides/package.json
diff --git a/topics/09. Transpilers/README.md b/Topics-old/09. Transpilers/README.md
similarity index 100%
rename from topics/09. Transpilers/README.md
rename to Topics-old/09. Transpilers/README.md
diff --git a/topics/09. Transpilers/slides/README.md b/Topics-old/09. Transpilers/slides/README.md
similarity index 100%
rename from topics/09. Transpilers/slides/README.md
rename to Topics-old/09. Transpilers/slides/README.md
diff --git a/topics/09. Transpilers/slides/img/operator-table.png b/Topics-old/09. Transpilers/slides/img/operator-table.png
similarity index 100%
rename from topics/09. Transpilers/slides/img/operator-table.png
rename to Topics-old/09. Transpilers/slides/img/operator-table.png
diff --git a/topics/09. Transpilers/slides/index.html b/Topics-old/09. Transpilers/slides/index.html
similarity index 100%
rename from topics/09. Transpilers/slides/index.html
rename to Topics-old/09. Transpilers/slides/index.html
diff --git a/topics/09. Transpilers/slides/open.js b/Topics-old/09. Transpilers/slides/open.js
similarity index 100%
rename from topics/09. Transpilers/slides/open.js
rename to Topics-old/09. Transpilers/slides/open.js
diff --git a/topics/09. Transpilers/slides/package.json b/Topics-old/09. Transpilers/slides/package.json
similarity index 100%
rename from topics/09. Transpilers/slides/package.json
rename to Topics-old/09. Transpilers/slides/package.json
diff --git a/topics/10. Gestures/README.md b/Topics-old/10. Gestures/README.md
similarity index 100%
rename from topics/10. Gestures/README.md
rename to Topics-old/10. Gestures/README.md
diff --git a/topics/10. Gestures/demos/app/.jshintrc b/Topics-old/10. Gestures/demos/app/.jshintrc
similarity index 100%
rename from topics/10. Gestures/demos/app/.jshintrc
rename to Topics-old/10. Gestures/demos/app/.jshintrc
diff --git a/topics/10. Gestures/demos/app/App_Resources/Android/drawable-hdpi/icon.png b/Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-hdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/Android/drawable-hdpi/icon.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/Android/drawable-ldpi/icon.png b/Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-ldpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/Android/drawable-ldpi/icon.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/Android/drawable-mdpi/icon.png b/Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-mdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/Android/drawable-mdpi/icon.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png b/Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-568h@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-568h@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-568h@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-667h@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-667h@2x.png
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-667h@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-667h@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-736h@3x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-736h@3x.png
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-736h@3x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-736h@3x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@3x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@3x.png
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@3x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Landscape@3x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default-Portrait@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Default@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Default@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Default@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/Icon-Small@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/Icon-Small@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-40.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-40.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-40.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-40.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-40@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-40@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-40@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-40@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-60.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-60.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-60.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-60.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-60@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-60@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-60@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-60@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-72.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-72.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-72.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-72.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-72@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-72@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-72@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-72@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-76.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-76.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-76.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-76.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon-76@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-76@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon-76@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon-76@2x.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon.png
diff --git a/topics/10. Gestures/demos/app/App_Resources/iOS/icon@2x.png b/Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/10. Gestures/demos/app/App_Resources/iOS/icon@2x.png
rename to Topics-old/10. Gestures/demos/app/App_Resources/iOS/icon@2x.png
diff --git a/topics/10. Gestures/demos/app/app.css b/Topics-old/10. Gestures/demos/app/app.css
similarity index 100%
rename from topics/10. Gestures/demos/app/app.css
rename to Topics-old/10. Gestures/demos/app/app.css
diff --git a/topics/10. Gestures/demos/app/app.js b/Topics-old/10. Gestures/demos/app/app.js
similarity index 100%
rename from topics/10. Gestures/demos/app/app.js
rename to Topics-old/10. Gestures/demos/app/app.js
diff --git a/topics/10. Gestures/demos/app/package.json b/Topics-old/10. Gestures/demos/app/package.json
similarity index 100%
rename from topics/10. Gestures/demos/app/package.json
rename to Topics-old/10. Gestures/demos/app/package.json
diff --git a/topics/10. Gestures/demos/app/references.d.ts b/Topics-old/10. Gestures/demos/app/references.d.ts
similarity index 100%
rename from topics/10. Gestures/demos/app/references.d.ts
rename to Topics-old/10. Gestures/demos/app/references.d.ts
diff --git a/topics/10. Gestures/demos/app/views/main/main.js b/Topics-old/10. Gestures/demos/app/views/main/main.js
similarity index 100%
rename from topics/10. Gestures/demos/app/views/main/main.js
rename to Topics-old/10. Gestures/demos/app/views/main/main.js
diff --git a/topics/10. Gestures/demos/app/views/main/main.xml b/Topics-old/10. Gestures/demos/app/views/main/main.xml
similarity index 100%
rename from topics/10. Gestures/demos/app/views/main/main.xml
rename to Topics-old/10. Gestures/demos/app/views/main/main.xml
diff --git a/topics/10. Gestures/demos/package.json b/Topics-old/10. Gestures/demos/package.json
similarity index 100%
rename from topics/10. Gestures/demos/package.json
rename to Topics-old/10. Gestures/demos/package.json
diff --git a/topics/10. Gestures/slides/README.md b/Topics-old/10. Gestures/slides/README.md
similarity index 100%
rename from topics/10. Gestures/slides/README.md
rename to Topics-old/10. Gestures/slides/README.md
diff --git a/topics/10. Gestures/slides/index.html b/Topics-old/10. Gestures/slides/index.html
similarity index 100%
rename from topics/10. Gestures/slides/index.html
rename to Topics-old/10. Gestures/slides/index.html
diff --git a/topics/10. Gestures/slides/open.js b/Topics-old/10. Gestures/slides/open.js
similarity index 100%
rename from topics/10. Gestures/slides/open.js
rename to Topics-old/10. Gestures/slides/open.js
diff --git a/topics/10. Gestures/slides/package.json b/Topics-old/10. Gestures/slides/package.json
similarity index 100%
rename from topics/10. Gestures/slides/package.json
rename to Topics-old/10. Gestures/slides/package.json
diff --git a/topics/11. Animations/README.md b/Topics-old/11. Animations/README.md
similarity index 100%
rename from topics/11. Animations/README.md
rename to Topics-old/11. Animations/README.md
diff --git a/topics/11. Animations/demos/.jshintrc b/Topics-old/11. Animations/demos/.jshintrc
similarity index 100%
rename from topics/11. Animations/demos/.jshintrc
rename to Topics-old/11. Animations/demos/.jshintrc
diff --git a/topics/11. Animations/demos/app/App_Resources/Android/drawable-hdpi/icon.png b/Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-hdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/Android/drawable-hdpi/icon.png
rename to Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/topics/11. Animations/demos/app/App_Resources/Android/drawable-ldpi/icon.png b/Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-ldpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/Android/drawable-ldpi/icon.png
rename to Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/topics/11. Animations/demos/app/App_Resources/Android/drawable-mdpi/icon.png b/Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-mdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/Android/drawable-mdpi/icon.png
rename to Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/topics/11. Animations/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png b/Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
rename to Topics-old/11. Animations/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-568h@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-568h@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-568h@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-667h@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-667h@2x.png
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-667h@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-667h@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-736h@3x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-736h@3x.png
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-736h@3x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-736h@3x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@3x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@3x.png
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@3x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Landscape@3x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Portrait.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Portrait.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Portrait.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Portrait.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default-Portrait@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Portrait@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default-Portrait@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default-Portrait@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Default@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Default@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Default@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Default@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/Icon-Small@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/Icon-Small@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-40.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-40.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-40.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-40.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-40@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-40@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-40@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-40@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-60.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-60.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-60.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-60.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-60@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-60@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-60@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-60@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-72.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-72.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-72.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-72.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-72@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-72@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-72@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-72@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-76.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-76.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-76.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-76.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon-76@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-76@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon-76@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon-76@2x.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon.png
diff --git a/topics/11. Animations/demos/app/App_Resources/iOS/icon@2x.png b/Topics-old/11. Animations/demos/app/App_Resources/iOS/icon@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/11. Animations/demos/app/App_Resources/iOS/icon@2x.png
rename to Topics-old/11. Animations/demos/app/App_Resources/iOS/icon@2x.png
diff --git a/topics/11. Animations/demos/app/app.js b/Topics-old/11. Animations/demos/app/app.js
similarity index 100%
rename from topics/11. Animations/demos/app/app.js
rename to Topics-old/11. Animations/demos/app/app.js
diff --git a/topics/11. Animations/demos/app/package.json b/Topics-old/11. Animations/demos/app/package.json
similarity index 100%
rename from topics/11. Animations/demos/app/package.json
rename to Topics-old/11. Animations/demos/app/package.json
diff --git a/topics/11. Animations/demos/app/references.d.ts b/Topics-old/11. Animations/demos/app/references.d.ts
similarity index 100%
rename from topics/11. Animations/demos/app/references.d.ts
rename to Topics-old/11. Animations/demos/app/references.d.ts
diff --git a/topics/11. Animations/demos/app/styles/app.css b/Topics-old/11. Animations/demos/app/styles/app.css
similarity index 100%
rename from topics/11. Animations/demos/app/styles/app.css
rename to Topics-old/11. Animations/demos/app/styles/app.css
diff --git a/topics/11. Animations/demos/app/views/animationSets/animationSets.js b/Topics-old/11. Animations/demos/app/views/animationSets/animationSets.js
similarity index 100%
rename from topics/11. Animations/demos/app/views/animationSets/animationSets.js
rename to Topics-old/11. Animations/demos/app/views/animationSets/animationSets.js
diff --git a/topics/11. Animations/demos/app/views/animationSets/animationSets.xml b/Topics-old/11. Animations/demos/app/views/animationSets/animationSets.xml
similarity index 100%
rename from topics/11. Animations/demos/app/views/animationSets/animationSets.xml
rename to Topics-old/11. Animations/demos/app/views/animationSets/animationSets.xml
diff --git a/topics/11. Animations/demos/app/views/chained/chained.js b/Topics-old/11. Animations/demos/app/views/chained/chained.js
similarity index 100%
rename from topics/11. Animations/demos/app/views/chained/chained.js
rename to Topics-old/11. Animations/demos/app/views/chained/chained.js
diff --git a/topics/11. Animations/demos/app/views/chained/chained.xml b/Topics-old/11. Animations/demos/app/views/chained/chained.xml
similarity index 100%
rename from topics/11. Animations/demos/app/views/chained/chained.xml
rename to Topics-old/11. Animations/demos/app/views/chained/chained.xml
diff --git a/topics/11. Animations/demos/app/views/main/main.js b/Topics-old/11. Animations/demos/app/views/main/main.js
similarity index 100%
rename from topics/11. Animations/demos/app/views/main/main.js
rename to Topics-old/11. Animations/demos/app/views/main/main.js
diff --git a/topics/11. Animations/demos/app/views/main/main.xml b/Topics-old/11. Animations/demos/app/views/main/main.xml
similarity index 100%
rename from topics/11. Animations/demos/app/views/main/main.xml
rename to Topics-old/11. Animations/demos/app/views/main/main.xml
diff --git a/topics/11. Animations/demos/app/views/multiple/multiple.js b/Topics-old/11. Animations/demos/app/views/multiple/multiple.js
similarity index 100%
rename from topics/11. Animations/demos/app/views/multiple/multiple.js
rename to Topics-old/11. Animations/demos/app/views/multiple/multiple.js
diff --git a/topics/11. Animations/demos/app/views/multiple/multiple.xml b/Topics-old/11. Animations/demos/app/views/multiple/multiple.xml
similarity index 100%
rename from topics/11. Animations/demos/app/views/multiple/multiple.xml
rename to Topics-old/11. Animations/demos/app/views/multiple/multiple.xml
diff --git a/topics/11. Animations/demos/app/views/single/single.js b/Topics-old/11. Animations/demos/app/views/single/single.js
similarity index 100%
rename from topics/11. Animations/demos/app/views/single/single.js
rename to Topics-old/11. Animations/demos/app/views/single/single.js
diff --git a/topics/11. Animations/demos/app/views/single/single.xml b/Topics-old/11. Animations/demos/app/views/single/single.xml
similarity index 100%
rename from topics/11. Animations/demos/app/views/single/single.xml
rename to Topics-old/11. Animations/demos/app/views/single/single.xml
diff --git a/topics/11. Animations/demos/package.json b/Topics-old/11. Animations/demos/package.json
similarity index 100%
rename from topics/11. Animations/demos/package.json
rename to Topics-old/11. Animations/demos/package.json
diff --git a/topics/11. Animations/slides/README.md b/Topics-old/11. Animations/slides/README.md
similarity index 100%
rename from topics/11. Animations/slides/README.md
rename to Topics-old/11. Animations/slides/README.md
diff --git a/topics/11. Animations/slides/index.html b/Topics-old/11. Animations/slides/index.html
similarity index 100%
rename from topics/11. Animations/slides/index.html
rename to Topics-old/11. Animations/slides/index.html
diff --git a/topics/12. Action-Bar/README.md b/Topics-old/12. Action-Bar/README.md
similarity index 100%
rename from topics/12. Action-Bar/README.md
rename to Topics-old/12. Action-Bar/README.md
diff --git a/topics/12. Action-Bar/slides/README.md b/Topics-old/12. Action-Bar/slides/README.md
similarity index 100%
rename from topics/12. Action-Bar/slides/README.md
rename to Topics-old/12. Action-Bar/slides/README.md
diff --git a/topics/12. Action-Bar/slides/index.html b/Topics-old/12. Action-Bar/slides/index.html
similarity index 100%
rename from topics/12. Action-Bar/slides/index.html
rename to Topics-old/12. Action-Bar/slides/index.html
diff --git a/topics/13. Hardware-access/README.md b/Topics-old/13. Hardware-access/README.md
similarity index 100%
rename from topics/13. Hardware-access/README.md
rename to Topics-old/13. Hardware-access/README.md
diff --git a/topics/13. Hardware-access/slides/README.md b/Topics-old/13. Hardware-access/slides/README.md
similarity index 100%
rename from topics/13. Hardware-access/slides/README.md
rename to Topics-old/13. Hardware-access/slides/README.md
diff --git a/topics/13. Hardware-access/slides/index.html b/Topics-old/13. Hardware-access/slides/index.html
similarity index 100%
rename from topics/13. Hardware-access/slides/index.html
rename to Topics-old/13. Hardware-access/slides/index.html
diff --git a/topics/14. Native-API-access/README.md b/Topics-old/14. Native-API-access/README.md
similarity index 100%
rename from topics/14. Native-API-access/README.md
rename to Topics-old/14. Native-API-access/README.md
diff --git a/topics/14. Native-API-access/slides/README.md b/Topics-old/14. Native-API-access/slides/README.md
similarity index 100%
rename from topics/14. Native-API-access/slides/README.md
rename to Topics-old/14. Native-API-access/slides/README.md
diff --git a/topics/14. Native-API-access/slides/index.html b/Topics-old/14. Native-API-access/slides/index.html
similarity index 100%
rename from topics/14. Native-API-access/slides/index.html
rename to Topics-old/14. Native-API-access/slides/index.html
diff --git a/topics/15. Working-with-remote-data/README.md b/Topics-old/15. Working-with-remote-data/README.md
similarity index 100%
rename from topics/15. Working-with-remote-data/README.md
rename to Topics-old/15. Working-with-remote-data/README.md
diff --git a/topics/15. Working-with-remote-data/slides/README.md b/Topics-old/15. Working-with-remote-data/slides/README.md
similarity index 100%
rename from topics/15. Working-with-remote-data/slides/README.md
rename to Topics-old/15. Working-with-remote-data/slides/README.md
diff --git a/topics/15. Working-with-remote-data/slides/index.html b/Topics-old/15. Working-with-remote-data/slides/index.html
similarity index 100%
rename from topics/15. Working-with-remote-data/slides/index.html
rename to Topics-old/15. Working-with-remote-data/slides/index.html
diff --git a/topics/16. Working-with-App-cloud/README.md b/Topics-old/16. Working-with-App-cloud/README.md
similarity index 100%
rename from topics/16. Working-with-App-cloud/README.md
rename to Topics-old/16. Working-with-App-cloud/README.md
diff --git a/topics/16. Working-with-App-cloud/slides/README.md b/Topics-old/16. Working-with-App-cloud/slides/README.md
similarity index 100%
rename from topics/16. Working-with-App-cloud/slides/README.md
rename to Topics-old/16. Working-with-App-cloud/slides/README.md
diff --git a/topics/16. Working-with-App-cloud/slides/index.html b/Topics-old/16. Working-with-App-cloud/slides/index.html
similarity index 100%
rename from topics/16. Working-with-App-cloud/slides/index.html
rename to Topics-old/16. Working-with-App-cloud/slides/index.html
diff --git a/topics/17. Working-with-local-data/README.md b/Topics-old/17. Working-with-local-data/README.md
similarity index 100%
rename from topics/17. Working-with-local-data/README.md
rename to Topics-old/17. Working-with-local-data/README.md
diff --git a/topics/17. Working-with-local-data/slides/README.md b/Topics-old/17. Working-with-local-data/slides/README.md
similarity index 100%
rename from topics/17. Working-with-local-data/slides/README.md
rename to Topics-old/17. Working-with-local-data/slides/README.md
diff --git a/topics/17. Working-with-local-data/slides/index.html b/Topics-old/17. Working-with-local-data/slides/index.html
similarity index 100%
rename from topics/17. Working-with-local-data/slides/index.html
rename to Topics-old/17. Working-with-local-data/slides/index.html
diff --git a/topics/18. Application-Lifecycle/demos/.jshintrc b/Topics-old/18. Application-Lifecycle/demos/.jshintrc
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/.jshintrc
rename to Topics-old/18. Application-Lifecycle/demos/.jshintrc
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-hdpi/icon.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-hdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-hdpi/icon.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-ldpi/icon.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-ldpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-ldpi/icon.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-mdpi/icon.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-mdpi/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-mdpi/icon.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-568h@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-568h@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-568h@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-568h@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-667h@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-667h@2x.png
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-667h@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-667h@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-736h@3x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-736h@3x.png
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-736h@3x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-736h@3x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-568h@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape-667h@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@3x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@3x.png
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@3x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Landscape@3x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default-Portrait@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Default@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small-50@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/Icon-Small@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-40@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-60@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-72@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon-76@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon.png
diff --git a/topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon@2x.png b/Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon@2x.png
old mode 100755
new mode 100644
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon@2x.png
rename to Topics-old/18. Application-Lifecycle/demos/app/App_Resources/iOS/icon@2x.png
diff --git a/topics/18. Application-Lifecycle/demos/app/app-lifecycle/all.js b/Topics-old/18. Application-Lifecycle/demos/app/app-lifecycle/all.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/app-lifecycle/all.js
rename to Topics-old/18. Application-Lifecycle/demos/app/app-lifecycle/all.js
diff --git a/topics/18. Application-Lifecycle/demos/app/app-lifecycle/android.js b/Topics-old/18. Application-Lifecycle/demos/app/app-lifecycle/android.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/app-lifecycle/android.js
rename to Topics-old/18. Application-Lifecycle/demos/app/app-lifecycle/android.js
diff --git a/topics/18. Application-Lifecycle/demos/app/app-lifecycle/index.js b/Topics-old/18. Application-Lifecycle/demos/app/app-lifecycle/index.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/app-lifecycle/index.js
rename to Topics-old/18. Application-Lifecycle/demos/app/app-lifecycle/index.js
diff --git a/topics/18. Application-Lifecycle/demos/app/app.css b/Topics-old/18. Application-Lifecycle/demos/app/app.css
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/app.css
rename to Topics-old/18. Application-Lifecycle/demos/app/app.css
diff --git a/topics/18. Application-Lifecycle/demos/app/app.js b/Topics-old/18. Application-Lifecycle/demos/app/app.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/app.js
rename to Topics-old/18. Application-Lifecycle/demos/app/app.js
diff --git a/topics/18. Application-Lifecycle/demos/app/ios-lifecycle.js b/Topics-old/18. Application-Lifecycle/demos/app/ios-lifecycle.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/ios-lifecycle.js
rename to Topics-old/18. Application-Lifecycle/demos/app/ios-lifecycle.js
diff --git a/topics/18. Application-Lifecycle/demos/app/main-page.js b/Topics-old/18. Application-Lifecycle/demos/app/main-page.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/main-page.js
rename to Topics-old/18. Application-Lifecycle/demos/app/main-page.js
diff --git a/topics/18. Application-Lifecycle/demos/app/main-page.xml b/Topics-old/18. Application-Lifecycle/demos/app/main-page.xml
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/main-page.xml
rename to Topics-old/18. Application-Lifecycle/demos/app/main-page.xml
diff --git a/topics/18. Application-Lifecycle/demos/app/main-view-model.js b/Topics-old/18. Application-Lifecycle/demos/app/main-view-model.js
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/main-view-model.js
rename to Topics-old/18. Application-Lifecycle/demos/app/main-view-model.js
diff --git a/topics/18. Application-Lifecycle/demos/app/package.json b/Topics-old/18. Application-Lifecycle/demos/app/package.json
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/package.json
rename to Topics-old/18. Application-Lifecycle/demos/app/package.json
diff --git a/topics/18. Application-Lifecycle/demos/app/references.d.ts b/Topics-old/18. Application-Lifecycle/demos/app/references.d.ts
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/app/references.d.ts
rename to Topics-old/18. Application-Lifecycle/demos/app/references.d.ts
diff --git a/topics/18. Application-Lifecycle/demos/package.json b/Topics-old/18. Application-Lifecycle/demos/package.json
similarity index 100%
rename from topics/18. Application-Lifecycle/demos/package.json
rename to Topics-old/18. Application-Lifecycle/demos/package.json
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/ecstatic b/topics/00. Course-introduction/slides/node_modules/.bin/ecstatic
deleted file mode 100755
index b17afd5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/ecstatic
+++ /dev/null
@@ -1,288 +0,0 @@
-#! /usr/bin/env node
-
-var path = require('path'),
- fs = require('fs'),
- url = require('url'),
- mime = require('mime'),
- urlJoin = require('url-join'),
- showDir = require('./ecstatic/showdir'),
- version = JSON.parse(
- fs.readFileSync(__dirname + '/../package.json').toString()
- ).version,
- status = require('./ecstatic/status-handlers'),
- etag = require('./ecstatic/etag'),
- optsParser = require('./ecstatic/opts');
-
-var ecstatic = module.exports = function (dir, options) {
- if (typeof dir !== 'string') {
- options = dir;
- dir = options.root;
- }
-
- var root = path.join(path.resolve(dir), '/'),
- opts = optsParser(options),
- cache = opts.cache,
- autoIndex = opts.autoIndex,
- baseDir = opts.baseDir,
- defaultExt = opts.defaultExt,
- handleError = opts.handleError,
- serverHeader = opts.serverHeader;
-
- opts.root = dir;
- if (defaultExt && /^\./.test(defaultExt)) defaultExt = defaultExt.replace(/^\./, '');
-
- return function middleware (req, res, next) {
-
- // Strip any null bytes from the url
- while(req.url.indexOf('%00') !== -1) {
- req.url = req.url.replace(/\%00/g, '');
- }
- // Figure out the path for the file from the given url
- var parsed = url.parse(req.url);
- try {
- decodeURIComponent(req.url); // check validity of url
- var pathname = decodePathname(parsed.pathname);
- }
- catch (err) {
- return status[400](res, next, { error: err });
- }
-
- var file = path.normalize(
- path.join(root,
- path.relative(
- path.join('/', baseDir),
- pathname
- )
- )
- ),
- gzipped = file + '.gz';
-
- if(serverHeader !== false) {
- // Set common headers.
- res.setHeader('server', 'ecstatic-'+version);
- }
-
- // TODO: This check is broken, which causes the 403 on the
- // expected 404.
- if (file.slice(0, root.length) !== root) {
- return status[403](res, next);
- }
-
- if (req.method && (req.method !== 'GET' && req.method !== 'HEAD' )) {
- return status[405](res, next);
- }
-
- function statFile() {
- fs.stat(file, function (err, stat) {
- if (err && (err.code === 'ENOENT' || err.code === 'ENOTDIR')) {
- if (req.statusCode == 404) {
- // This means we're already trying ./404.html and can not find it.
- // So send plain text response with 404 status code
- status[404](res, next);
- }
- else if (!path.extname(parsed.pathname).length && defaultExt) {
- // If there is no file extension in the path and we have a default
- // extension try filename and default extension combination before rendering 404.html.
- middleware({
- url: parsed.pathname + '.' + defaultExt + ((parsed.search)? parsed.search:'')
- }, res, next);
- }
- else {
- // Try to serve default ./404.html
- middleware({
- url: (handleError ? ('/' + path.join(baseDir, '404.' + defaultExt)) : req.url),
- statusCode: 404
- }, res, next);
- }
- }
- else if (err) {
- status[500](res, next, { error: err });
- }
- else if (stat.isDirectory()) {
- // 302 to / if necessary
- if (!parsed.pathname.match(/\/$/)) {
- res.statusCode = 302;
- res.setHeader('location', parsed.pathname + '/' +
- (parsed.query? ('?' + parsed.query):'')
- );
- return res.end();
- }
-
- if (autoIndex) {
- return middleware({
- url: urlJoin(encodeURIComponent(pathname), '/index.' + defaultExt)
- }, res, function (err) {
- if (err) {
- return status[500](res, next, { error: err });
- }
- if (opts.showDir) {
- return showDir(opts, stat)(req, res);
- }
-
- return status[403](res, next);
- });
- }
-
- if (opts.showDir) {
- return showDir(opts, stat)(req, res);
- }
-
- status[404](res, next);
-
- }
- else {
- serve(stat);
- }
- });
- }
-
- // Look for a gzipped file if this is turned on
- if (opts.gzip && shouldCompress(req)) {
- fs.stat(gzipped, function (err, stat) {
- if (!err && stat.isFile()) {
- file = gzipped;
- return serve(stat);
- } else {
- statFile();
- }
- });
- } else {
- statFile();
- }
-
- function serve(stat) {
- // Do a MIME lookup, fall back to octet-stream and handle gzip
- // special case.
- var defaultType = opts.contentType || 'application/octet-stream',
- contentType = mime.lookup(file, defaultType),
- charSet;
-
- if (contentType) {
- charSet = mime.charsets.lookup(contentType, 'utf-8');
- if (charSet) {
- contentType += '; charset=' + charSet;
- }
- }
-
- if (path.extname(file) === '.gz') {
- res.setHeader('Content-Encoding', 'gzip');
-
- // strip gz ending and lookup mime type
- contentType = mime.lookup(path.basename(file, ".gz"), defaultType);
- }
-
- var range = (req.headers && req.headers['range']);
- if (range) {
- var total = stat.size;
- var parts = range.replace(/bytes=/, "").split("-");
- var partialstart = parts[0];
- var partialend = parts[1];
- var start = parseInt(partialstart, 10);
- var end = Math.min(total-1, partialend ? parseInt(partialend, 10) : total-1);
- var chunksize = (end-start)+1;
- if (start > end || isNaN(start) || isNaN(end)) {
- return status['416'](res, next);
- }
- var fstream = fs.createReadStream(file, {start: start, end: end});
- fstream.on('error', function (err) {
- status['500'](res, next, { error: err });
- });
- res.on('close', function () {
- fstream.destroy();
- });
- res.writeHead(206, {
- 'Content-Range': 'bytes ' + start + '-' + end + '/' + total,
- 'Accept-Ranges': 'bytes',
- 'Content-Length': chunksize,
- 'Content-Type': contentType
- });
- fstream.pipe(res);
- return;
- }
-
- // TODO: Helper for this, with default headers.
- res.setHeader('etag', etag(stat));
- res.setHeader('last-modified', (new Date(stat.mtime)).toUTCString());
- res.setHeader('cache-control', cache);
-
- // Return a 304 if necessary
- if ( req.headers
- && (
- (req.headers['if-none-match'] === etag(stat))
- || (new Date(Date.parse(req.headers['if-modified-since'])) >= stat.mtime)
- )
- ) {
- return status[304](res, next);
- }
-
- res.setHeader('content-length', stat.size);
- res.setHeader('content-type', contentType);
-
- // set the response statusCode if we have a request statusCode.
- // This only can happen if we have a 404 with some kind of 404.html
- // In all other cases where we have a file we serve the 200
- res.statusCode = req.statusCode || 200;
-
- if (req.method === "HEAD") {
- return res.end();
- }
-
- var stream = fs.createReadStream(file);
-
- stream.pipe(res);
- stream.on('error', function (err) {
- status['500'](res, next, { error: err });
- });
- }
- };
-};
-
-ecstatic.version = version;
-ecstatic.showDir = showDir;
-
-// Check to see if we should try to compress a file with gzip.
-function shouldCompress(req) {
- var headers = req.headers;
-
- return headers && headers['accept-encoding'] &&
- headers['accept-encoding']
- .split(",")
- .some(function (el) {
- return ['*','compress', 'gzip', 'deflate'].indexOf(el) != -1;
- })
- ;
-}
-
-// See: https://github.com/jesusabdullah/node-ecstatic/issues/109
-function decodePathname(pathname) {
- var pieces = pathname.replace(/\\/g,"/").split('/');
-
- return pieces.map(function (piece) {
- piece = decodeURIComponent(piece);
-
- if (process.platform === 'win32' && /\\/.test(piece)) {
- throw new Error('Invalid forward slash character');
- }
-
- return piece;
- }).join('/');
-}
-
-if (!module.parent) {
- var http = require('http'),
- opts = require('minimist')(process.argv.slice(2)),
- port = opts.port || opts.p || 8000,
- dir = opts.root || opts._[0] || process.cwd();
-
- if (opts.help || opts.h) {
- var u = console.error;
- u('usage: ecstatic [dir] {options} --port PORT');
- u('see https://npm.im/ecstatic for more docs');
- return;
- }
-
- http.createServer(ecstatic(dir, opts))
- .listen(port, function () {
- console.log('ecstatic serving ' + dir + ' at http://0.0.0.0:' + port);
- });
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/he b/topics/00. Course-introduction/slides/node_modules/.bin/he
deleted file mode 100755
index 234710c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/he
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env node
-(function() {
-
- var fs = require('fs');
- var he = require('../he.js');
- var strings = process.argv.splice(2);
- var stdin = process.stdin;
- var data;
- var timeout;
- var action;
- var options = {};
- var log = console.log;
-
- var main = function() {
- var option = strings[0];
- var count = 0;
-
- if (/^(?:-h|--help|undefined)$/.test(option)) {
- log(
- 'he v%s - http://mths.be/he',
- he.version
- );
- log([
- '\nUsage:\n',
- '\the [--escape] string',
- '\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] string',
- '\the [--decode] [--attribute] [--strict] string',
- '\the [-v | --version]',
- '\the [-h | --help]',
- '\nExamples:\n',
- '\the --escape \\ ',
- '\techo \'© 𝌆\' | he --decode'
- ].join('\n'));
- return process.exit(1);
- }
-
- if (/^(?:-v|--version)$/.test(option)) {
- log('v%s', he.version);
- return process.exit(1);
- }
-
- strings.forEach(function(string) {
- // Process options
- if (string == '--escape') {
- action = 'escape';
- return;
- }
- if (string == '--encode') {
- action = 'encode';
- return;
- }
- if (string == '--use-named-refs') {
- action = 'encode';
- options.useNamedReferences = true;
- return;
- }
- if (string == '--everything') {
- action = 'encode';
- options.encodeEverything = true;
- return;
- }
- if (string == '--allow-unsafe') {
- action = 'encode';
- options.allowUnsafeSymbols = true;
- return;
- }
- if (string == '--decode') {
- action = 'decode';
- return;
- }
- if (string == '--attribute') {
- action = 'decode';
- options.isAttributeValue = true;
- return;
- }
- if (string == '--strict') {
- action = 'decode';
- options.strict = true;
- return;
- }
- // Process string(s)
- var result;
- if (!action) {
- log('Error: he requires at least one option and a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- try {
- result = he[action](string, options);
- log(result);
- count++;
- } catch(error) {
- log(error.message + '\n');
- log('Error: failed to %s.', action);
- log('If you think this is a bug in he, please report it:');
- log('https://github.com/mathiasbynens/he/issues/new');
- log(
- '\nStack trace using he@%s:\n',
- he.version
- );
- log(error.stack);
- return process.exit(1);
- }
- });
- if (!count) {
- log('Error: he requires a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- // Return with exit status 0 outside of the `forEach` loop, in case
- // multiple strings were passed in.
- return process.exit(0);
- };
-
- if (stdin.isTTY) {
- // handle shell arguments
- main();
- } else {
- // Either the script is called from within a non-TTY context, or `stdin`
- // content is being piped in.
- if (!process.stdout.isTTY) {
- // The script was called from a non-TTY context. This is a rather uncommon
- // use case we don’t actively support. However, we don’t want the script
- // to wait forever in such cases, so…
- timeout = setTimeout(function() {
- // …if no piped data arrived after a whole minute, handle shell
- // arguments instead.
- main();
- }, 60000);
- }
- data = '';
- stdin.on('data', function(chunk) {
- clearTimeout(timeout);
- data += chunk;
- });
- stdin.on('end', function() {
- strings.push(data.trim());
- main();
- });
- stdin.resume();
- }
-
-}());
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/hs b/topics/00. Course-introduction/slides/node_modules/.bin/hs
deleted file mode 100755
index 8b3de28..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/hs
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var colors = require('colors'),
- os = require('os'),
- httpServer = require('../lib/http-server'),
- portfinder = require('portfinder'),
- opener = require('opener'),
- argv = require('optimist')
- .boolean('cors')
- .argv;
-
-var ifaces = os.networkInterfaces();
-
-if (argv.h || argv.help) {
- console.log([
- 'usage: http-server [path] [options]',
- '',
- 'options:',
- ' -p Port to use [8080]',
- ' -a Address to use [0.0.0.0]',
- ' -d Show directory listings [true]',
- ' -i Display autoIndex [true]',
- ' -e --ext Default file extension if none supplied [none]',
- ' -s --silent Suppress log messages from output',
- ' --cors Enable CORS via the "Access-Control-Allow-Origin" header',
- ' -o [path] Open browser window after starting the server',
- ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.',
- ' To disable caching, use -c-1.',
- '',
- ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com',
- '',
- ' -S --ssl Enable https.',
- ' -C --cert Path to ssl cert file (default: cert.pem).',
- ' -K --key Path to ssl key file (default: key.pem).',
- '',
- ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
- ' -h --help Print this list and exit.'
- ].join('\n'));
- process.exit();
-}
-
-var port = argv.p || parseInt(process.env.PORT, 10),
- host = argv.a || '0.0.0.0',
- ssl = !!argv.S || !!argv.ssl,
- proxy = argv.P || argv.proxy,
- logger;
-
-if (!argv.s && !argv.silent) {
- logger = {
- info: console.log,
- request: function (req, res, error) {
- var date = new Date().toUTCString();
- if (error) {
- logger.info(
- '[%s] "%s %s" Error (%s): "%s"',
- date, req.method.red, req.url.red,
- error.status.toString().red, error.message.red
- );
- }
- else {
- logger.info(
- '[%s] "%s %s" "%s"',
- date, req.method.cyan, req.url.cyan,
- req.headers['user-agent']
- );
- }
- }
- };
-}
-else if (colors) {
- logger = {
- info: function () {},
- request: function () {}
- };
-}
-
-if (!port) {
- portfinder.basePort = 8080;
- portfinder.getPort(function (err, port) {
- if (err) { throw err; }
- listen(port);
- });
-}
-else {
- listen(port);
-}
-
-function listen(port) {
- var options = {
- root: argv._[0],
- cache: argv.c,
- showDir: argv.d,
- autoIndex: argv.i,
- robots: argv.r || argv.robots,
- ext: argv.e || argv.ext,
- logFn: logger.request,
- proxy: proxy
- };
-
- if (argv.cors) {
- options.cors = true;
- }
-
- if (ssl) {
- options.https = {
- cert: argv.C || argv.cert || 'cert.pem',
- key: argv.K || argv.key || 'key.pem'
- };
- }
-
- var server = httpServer.createServer(options);
- server.listen(port, host, function () {
- var canonicalHost = host === '0.0.0.0' ? '127.0.0.1' : host,
- protocol = ssl ? 'https:' : 'http:';
-
- logger.info(['Starting up http-server, serving '.yellow,
- server.root.cyan,
- ssl ? (' through'.yellow + ' https'.cyan) : '',
- '\nAvailable on:'.yellow
- ].join(''));
-
- Object.keys(ifaces).forEach(function (dev) {
- ifaces[dev].forEach(function (details) {
- if (details.family === 'IPv4') {
- logger.info((' ' + protocol + details.address + ':' + port.toString()).green);
- }
- });
- });
-
- if (typeof proxy === 'string') {
- logger.info('Unhandled requests will be served from: ' + proxy);
- }
-
- logger.info('Hit CTRL-C to stop the server');
- if (argv.o) {
- opener(
- protocol + '//' + canonicalHost + ':' + port,
- { command: argv.o !== true ? argv.o : null }
- );
- }
- });
-}
-
-if (process.platform === 'win32') {
- require('readline').createInterface({
- input: process.stdin,
- output: process.stdout
- }).on('SIGINT', function () {
- process.emit('SIGINT');
- });
-}
-
-process.on('SIGINT', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
-
-process.on('SIGTERM', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/http-server b/topics/00. Course-introduction/slides/node_modules/.bin/http-server
deleted file mode 100755
index 8b3de28..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/http-server
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var colors = require('colors'),
- os = require('os'),
- httpServer = require('../lib/http-server'),
- portfinder = require('portfinder'),
- opener = require('opener'),
- argv = require('optimist')
- .boolean('cors')
- .argv;
-
-var ifaces = os.networkInterfaces();
-
-if (argv.h || argv.help) {
- console.log([
- 'usage: http-server [path] [options]',
- '',
- 'options:',
- ' -p Port to use [8080]',
- ' -a Address to use [0.0.0.0]',
- ' -d Show directory listings [true]',
- ' -i Display autoIndex [true]',
- ' -e --ext Default file extension if none supplied [none]',
- ' -s --silent Suppress log messages from output',
- ' --cors Enable CORS via the "Access-Control-Allow-Origin" header',
- ' -o [path] Open browser window after starting the server',
- ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.',
- ' To disable caching, use -c-1.',
- '',
- ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com',
- '',
- ' -S --ssl Enable https.',
- ' -C --cert Path to ssl cert file (default: cert.pem).',
- ' -K --key Path to ssl key file (default: key.pem).',
- '',
- ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
- ' -h --help Print this list and exit.'
- ].join('\n'));
- process.exit();
-}
-
-var port = argv.p || parseInt(process.env.PORT, 10),
- host = argv.a || '0.0.0.0',
- ssl = !!argv.S || !!argv.ssl,
- proxy = argv.P || argv.proxy,
- logger;
-
-if (!argv.s && !argv.silent) {
- logger = {
- info: console.log,
- request: function (req, res, error) {
- var date = new Date().toUTCString();
- if (error) {
- logger.info(
- '[%s] "%s %s" Error (%s): "%s"',
- date, req.method.red, req.url.red,
- error.status.toString().red, error.message.red
- );
- }
- else {
- logger.info(
- '[%s] "%s %s" "%s"',
- date, req.method.cyan, req.url.cyan,
- req.headers['user-agent']
- );
- }
- }
- };
-}
-else if (colors) {
- logger = {
- info: function () {},
- request: function () {}
- };
-}
-
-if (!port) {
- portfinder.basePort = 8080;
- portfinder.getPort(function (err, port) {
- if (err) { throw err; }
- listen(port);
- });
-}
-else {
- listen(port);
-}
-
-function listen(port) {
- var options = {
- root: argv._[0],
- cache: argv.c,
- showDir: argv.d,
- autoIndex: argv.i,
- robots: argv.r || argv.robots,
- ext: argv.e || argv.ext,
- logFn: logger.request,
- proxy: proxy
- };
-
- if (argv.cors) {
- options.cors = true;
- }
-
- if (ssl) {
- options.https = {
- cert: argv.C || argv.cert || 'cert.pem',
- key: argv.K || argv.key || 'key.pem'
- };
- }
-
- var server = httpServer.createServer(options);
- server.listen(port, host, function () {
- var canonicalHost = host === '0.0.0.0' ? '127.0.0.1' : host,
- protocol = ssl ? 'https:' : 'http:';
-
- logger.info(['Starting up http-server, serving '.yellow,
- server.root.cyan,
- ssl ? (' through'.yellow + ' https'.cyan) : '',
- '\nAvailable on:'.yellow
- ].join(''));
-
- Object.keys(ifaces).forEach(function (dev) {
- ifaces[dev].forEach(function (details) {
- if (details.family === 'IPv4') {
- logger.info((' ' + protocol + details.address + ':' + port.toString()).green);
- }
- });
- });
-
- if (typeof proxy === 'string') {
- logger.info('Unhandled requests will be served from: ' + proxy);
- }
-
- logger.info('Hit CTRL-C to stop the server');
- if (argv.o) {
- opener(
- protocol + '//' + canonicalHost + ':' + port,
- { command: argv.o !== true ? argv.o : null }
- );
- }
- });
-}
-
-if (process.platform === 'win32') {
- require('readline').createInterface({
- input: process.stdin,
- output: process.stdout
- }).on('SIGINT', function () {
- process.emit('SIGINT');
- });
-}
-
-process.on('SIGINT', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
-
-process.on('SIGTERM', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/mime b/topics/00. Course-introduction/slides/node_modules/.bin/mime
deleted file mode 100755
index 20b1ffe..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/mime
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var mime = require('./mime.js');
-var file = process.argv[2];
-var type = mime.lookup(file);
-
-process.stdout.write(type + '\n');
-
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/mkdirp b/topics/00. Course-introduction/slides/node_modules/.bin/mkdirp
deleted file mode 100755
index d95de15..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env node
-
-var mkdirp = require('../');
-var minimist = require('minimist');
-var fs = require('fs');
-
-var argv = minimist(process.argv.slice(2), {
- alias: { m: 'mode', h: 'help' },
- string: [ 'mode' ]
-});
-if (argv.help) {
- fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
- return;
-}
-
-var paths = argv._.slice();
-var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
-
-(function next () {
- if (paths.length === 0) return;
- var p = paths.shift();
-
- if (mode === undefined) mkdirp(p, cb)
- else mkdirp(p, mode, cb)
-
- function cb (err) {
- if (err) {
- console.error(err.message);
- process.exit(1);
- }
- else next();
- }
-})();
diff --git a/topics/00. Course-introduction/slides/node_modules/.bin/opener b/topics/00. Course-introduction/slides/node_modules/.bin/opener
deleted file mode 100755
index 8951fa2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/.bin/opener
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env node
-
-"use strict";
-
-var childProcess = require("child_process");
-
-function opener(args, options, callback) {
- // http://stackoverflow.com/q/1480971/3191, but see below for Windows.
- var command = process.platform === "win32" ? "cmd" :
- process.platform === "darwin" ? "open" :
- "xdg-open";
-
- if (typeof args === "string") {
- args = [args];
- }
-
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
-
- if (options && typeof options === "object" && options.command) {
- if (process.platform === "win32") {
- // *always* use cmd on windows
- args = [options.command].concat(args);
- } else {
- command = options.command;
- }
- }
-
- if (process.platform === "win32") {
- // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and
- // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the
- // responsibility to "cmd /c", which has that logic built in.
- //
- // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
- // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
- //
- // Additionally, on Windows ampersand needs to be escaped when passed to "start"
- args = args.map(function(value) {
- return value.replace(/&/g, '^&');
- });
- args = ["/c", "start", '""'].concat(args);
- }
-
- return childProcess.execFile(command, args, options, callback);
-}
-
-// Export `opener` for programmatic access.
-// You might use this to e.g. open a website: `opener("http://google.com")`
-module.exports = opener;
-
-// If we're being called from the command line, just execute, using the command-line arguments.
-if (require.main && require.main.id === module.id) {
- opener(process.argv.slice(2), function (error) {
- if (error) {
- throw error;
- }
- });
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/async/.travis.yml b/topics/00. Course-introduction/slides/node_modules/async/.travis.yml
deleted file mode 100644
index 6e5919d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/async/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/topics/00. Course-introduction/slides/node_modules/async/LICENSE b/topics/00. Course-introduction/slides/node_modules/async/LICENSE
deleted file mode 100644
index 8f29698..0000000
--- a/topics/00. Course-introduction/slides/node_modules/async/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010-2014 Caolan McMahon
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/async/README.md b/topics/00. Course-introduction/slides/node_modules/async/README.md
deleted file mode 100644
index 0bea531..0000000
--- a/topics/00. Course-introduction/slides/node_modules/async/README.md
+++ /dev/null
@@ -1,1646 +0,0 @@
-# Async.js
-
-[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
-
-
-Async is a utility module which provides straight-forward, powerful functions
-for working with asynchronous JavaScript. Although originally designed for
-use with [Node.js](http://nodejs.org), it can also be used directly in the
-browser. Also supports [component](https://github.com/component/component).
-
-Async provides around 20 functions that include the usual 'functional'
-suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns
-for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these
-functions assume you follow the Node.js convention of providing a single
-callback as the last argument of your `async` function.
-
-
-## Quick Examples
-
-```javascript
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-
-async.parallel([
- function(){ ... },
- function(){ ... }
-], callback);
-
-async.series([
- function(){ ... },
- function(){ ... }
-]);
-```
-
-There are many more functions available so take a look at the docs below for a
-full list. This module aims to be comprehensive, so if you feel anything is
-missing please create a GitHub issue for it.
-
-## Common Pitfalls
-
-### Binding a context to an iterator
-
-This section is really about `bind`, not about `async`. If you are wondering how to
-make `async` execute your iterators in a given context, or are confused as to why
-a method of another library isn't working as an iterator, study this example:
-
-```js
-// Here is a simple object with an (unnecessarily roundabout) squaring method
-var AsyncSquaringLibrary = {
- squareExponent: 2,
- square: function(number, callback){
- var result = Math.pow(number, this.squareExponent);
- setTimeout(function(){
- callback(null, result);
- }, 200);
- }
-};
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
- // result is [NaN, NaN, NaN]
- // This fails because the `this.squareExponent` expression in the square
- // function is not evaluated in the context of AsyncSquaringLibrary, and is
- // therefore undefined.
-});
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
- // result is [1, 4, 9]
- // With the help of bind we can attach a context to the iterator before
- // passing it to async. Now the square function will be executed in its
- // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
- // will be as expected.
-});
-```
-
-## Download
-
-The source is available for download from
-[GitHub](http://github.com/caolan/async).
-Alternatively, you can install using Node Package Manager (`npm`):
-
- npm install async
-
-__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
-
-## In the Browser
-
-So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.
-
-Usage:
-
-```html
-
-
-```
-
-## Documentation
-
-### Collections
-
-* [`each`](#each)
-* [`eachSeries`](#eachSeries)
-* [`eachLimit`](#eachLimit)
-* [`map`](#map)
-* [`mapSeries`](#mapSeries)
-* [`mapLimit`](#mapLimit)
-* [`filter`](#filter)
-* [`filterSeries`](#filterSeries)
-* [`reject`](#reject)
-* [`rejectSeries`](#rejectSeries)
-* [`reduce`](#reduce)
-* [`reduceRight`](#reduceRight)
-* [`detect`](#detect)
-* [`detectSeries`](#detectSeries)
-* [`sortBy`](#sortBy)
-* [`some`](#some)
-* [`every`](#every)
-* [`concat`](#concat)
-* [`concatSeries`](#concatSeries)
-
-### Control Flow
-
-* [`series`](#seriestasks-callback)
-* [`parallel`](#parallel)
-* [`parallelLimit`](#parallellimittasks-limit-callback)
-* [`whilst`](#whilst)
-* [`doWhilst`](#doWhilst)
-* [`until`](#until)
-* [`doUntil`](#doUntil)
-* [`forever`](#forever)
-* [`waterfall`](#waterfall)
-* [`compose`](#compose)
-* [`seq`](#seq)
-* [`applyEach`](#applyEach)
-* [`applyEachSeries`](#applyEachSeries)
-* [`queue`](#queue)
-* [`priorityQueue`](#priorityQueue)
-* [`cargo`](#cargo)
-* [`auto`](#auto)
-* [`retry`](#retry)
-* [`iterator`](#iterator)
-* [`apply`](#apply)
-* [`nextTick`](#nextTick)
-* [`times`](#times)
-* [`timesSeries`](#timesSeries)
-
-### Utils
-
-* [`memoize`](#memoize)
-* [`unmemoize`](#unmemoize)
-* [`log`](#log)
-* [`dir`](#dir)
-* [`noConflict`](#noConflict)
-
-
-## Collections
-
-
-
-### each(arr, iterator, callback)
-
-Applies the function `iterator` to each item in `arr`, in parallel.
-The `iterator` is called with an item from the list, and a callback for when it
-has finished. If the `iterator` passes an error to its `callback`, the main
-`callback` (for the `each` function) is immediately called with the error.
-
-Note, that since this function applies `iterator` to each item in parallel,
-there is no guarantee that the iterator functions will complete in order.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occured, the `callback` should be run without
- arguments or with an explicit `null` argument.
-* `callback(err)` - A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Examples__
-
-
-```js
-// assuming openFiles is an array of file names and saveFile is a function
-// to save the modified contents of that file:
-
-async.each(openFiles, saveFile, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
-```js
-// assuming openFiles is an array of file names
-
-async.each(openFiles, function( file, callback) {
-
- // Perform operation on file here.
- console.log('Processing file ' + file);
-
- if( file.length > 32 ) {
- console.log('This file name is too long');
- callback('File name too long');
- } else {
- // Do work to process file here
- console.log('File processed');
- callback();
- }
-}, function(err){
- // if any of the file processing produced an error, err would equal that error
- if( err ) {
- // One of the iterations produced an error.
- // All processing will now stop.
- console.log('A file failed to process');
- } else {
- console.log('All files have been processed successfully');
- }
-});
-```
-
----------------------------------------
-
-
-
-### eachSeries(arr, iterator, callback)
-
-The same as [`each`](#each), only `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-This means the `iterator` functions will complete in order.
-
-
----------------------------------------
-
-
-
-### eachLimit(arr, limit, iterator, callback)
-
-The same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously
-running at any time.
-
-Note that the items in `arr` are not processed in batches, so there is no guarantee that
-the first `limit` `iterator` functions will complete before any others are started.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `limit` - The maximum number of `iterator`s to run at any time.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occured, the callback should be run without
- arguments or with an explicit `null` argument.
-* `callback(err)` - A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Example__
-
-```js
-// Assume documents is an array of JSON objects and requestApi is a
-// function that interacts with a rate-limited REST api.
-
-async.eachLimit(documents, 20, requestApi, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
----------------------------------------
-
-
-### map(arr, iterator, callback)
-
-Produces a new array of values by mapping each value in `arr` through
-the `iterator` function. The `iterator` is called with an item from `arr` and a
-callback for when it has finished processing. Each of these callback takes 2 arguments:
-an `error`, and the transformed item from `arr`. If `iterator` passes an error to this
-callback, the main `callback` (for the `map` function) is immediately called with the error.
-
-Note, that since this function applies the `iterator` to each item in parallel,
-there is no guarantee that the `iterator` functions will complete in order.
-However, the results array will be in the same order as the original `arr`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - A callback which is called when all `iterator`
- functions have finished, or an error occurs. Results is an array of the
- transformed items from the `arr`.
-
-__Example__
-
-```js
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
----------------------------------------
-
-
-### mapSeries(arr, iterator, callback)
-
-The same as [`map`](#map), only the `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
-
----------------------------------------
-
-
-### mapLimit(arr, limit, iterator, callback)
-
-The same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously
-running at any time.
-
-Note that the items are not processed in batches, so there is no guarantee that
-the first `limit` `iterator` functions will complete before any others are started.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `limit` - The maximum number of `iterator`s to run at any time.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - A callback which is called when all `iterator`
- calls have finished, or an error occurs. The result is an array of the
- transformed items from the original `arr`.
-
-__Example__
-
-```js
-async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
----------------------------------------
-
-
-
-### filter(arr, iterator, callback)
-
-__Alias:__ `select`
-
-Returns a new array of all the values in `arr` which pass an async truth test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. This operation is
-performed in parallel, but the results array will be in the same order as the
-original.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The `iterator` is passed a `callback(truthValue)`, which must be called with a
- boolean argument once it has completed.
-* `callback(results)` - A callback which is called after all the `iterator`
- functions have finished.
-
-__Example__
-
-```js
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-```
-
----------------------------------------
-
-
-
-### filterSeries(arr, iterator, callback)
-
-__Alias:__ `selectSeries`
-
-The same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
----------------------------------------
-
-
-### reject(arr, iterator, callback)
-
-The opposite of [`filter`](#filter). Removes values that pass an `async` truth test.
-
----------------------------------------
-
-
-### rejectSeries(arr, iterator, callback)
-
-The same as [`reject`](#reject), only the `iterator` is applied to each item in `arr`
-in series.
-
-
----------------------------------------
-
-
-### reduce(arr, memo, iterator, callback)
-
-__Aliases:__ `inject`, `foldl`
-
-Reduces `arr` into a single value using an async `iterator` to return
-each successive step. `memo` is the initial state of the reduction.
-This function only operates in series.
-
-For performance reasons, it may make sense to split a call to this function into
-a parallel map, and then use the normal `Array.prototype.reduce` on the results.
-This function is for situations where each step in the reduction needs to be async;
-if you can get the data before reducing it, then it's probably a good idea to do so.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `memo` - The initial state of the reduction.
-* `iterator(memo, item, callback)` - A function applied to each item in the
- array to produce the next step in the reduction. The `iterator` is passed a
- `callback(err, reduction)` which accepts an optional error as its first
- argument, and the state of the reduction as the second. If an error is
- passed to the callback, the reduction is stopped and the main `callback` is
- immediately called with the error.
-* `callback(err, result)` - A callback which is called after all the `iterator`
- functions have finished. Result is the reduced value.
-
-__Example__
-
-```js
-async.reduce([1,2,3], 0, function(memo, item, callback){
- // pointless async:
- process.nextTick(function(){
- callback(null, memo + item)
- });
-}, function(err, result){
- // result is now equal to the last value of memo, which is 6
-});
-```
-
----------------------------------------
-
-
-### reduceRight(arr, memo, iterator, callback)
-
-__Alias:__ `foldr`
-
-Same as [`reduce`](#reduce), only operates on `arr` in reverse order.
-
-
----------------------------------------
-
-
-### detect(arr, iterator, callback)
-
-Returns the first value in `arr` that passes an async truth test. The
-`iterator` is applied in parallel, meaning the first iterator to return `true` will
-fire the detect `callback` with that result. That means the result might not be
-the first item in the original `arr` (in terms of order) that passes the test.
-
-If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The iterator is passed a `callback(truthValue)` which must be called with a
- boolean argument once it has completed.
-* `callback(result)` - A callback which is called as soon as any iterator returns
- `true`, or after all the `iterator` functions have finished. Result will be
- the first item in the array that passes the truth test (iterator) or the
- value `undefined` if none passed.
-
-__Example__
-
-```js
-async.detect(['file1','file2','file3'], fs.exists, function(result){
- // result now equals the first file in the list that exists
-});
-```
-
----------------------------------------
-
-
-### detectSeries(arr, iterator, callback)
-
-The same as [`detect`](#detect), only the `iterator` is applied to each item in `arr`
-in series. This means the result is always the first in the original `arr` (in
-terms of array order) that passes the truth test.
-
-
----------------------------------------
-
-
-### sortBy(arr, iterator, callback)
-
-Sorts a list by the results of running each `arr` value through an async `iterator`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, sortValue)` which must be called once it
- has completed with an error (which can be `null`) and a value to use as the sort
- criteria.
-* `callback(err, results)` - A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is the items from
- the original `arr` sorted by the values returned by the `iterator` calls.
-
-__Example__
-
-```js
-async.sortBy(['file1','file2','file3'], function(file, callback){
- fs.stat(file, function(err, stats){
- callback(err, stats.mtime);
- });
-}, function(err, results){
- // results is now the original array of files sorted by
- // modified date
-});
-```
-
-__Sort Order__
-
-By modifying the callback parameter the sorting order can be influenced:
-
-```js
-//ascending order
-async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x);
-}, function(err,result){
- //result callback
-} );
-
-//descending order
-async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x*-1); //<- x*-1 instead of x, turns the order around
-}, function(err,result){
- //result callback
-} );
-```
-
----------------------------------------
-
-
-### some(arr, iterator, callback)
-
-__Alias:__ `any`
-
-Returns `true` if at least one element in the `arr` satisfies an async test.
-_The callback for each iterator call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. Once any iterator
-call returns `true`, the main `callback` is immediately called.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a callback(truthValue) which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - A callback which is called as soon as any iterator returns
- `true`, or after all the iterator functions have finished. Result will be
- either `true` or `false` depending on the values of the async tests.
-
-__Example__
-
-```js
-async.some(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then at least one of the files exists
-});
-```
-
----------------------------------------
-
-
-### every(arr, iterator, callback)
-
-__Alias:__ `all`
-
-Returns `true` if every element in `arr` satisfies an async test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a callback(truthValue) which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - A callback which is called after all the `iterator`
- functions have finished. Result will be either `true` or `false` depending on
- the values of the async tests.
-
-__Example__
-
-```js
-async.every(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then every file exists
-});
-```
-
----------------------------------------
-
-
-### concat(arr, iterator, callback)
-
-Applies `iterator` to each item in `arr`, concatenating the results. Returns the
-concatenated list. The `iterator`s are called in parallel, and the results are
-concatenated as they return. There is no guarantee that the results array will
-be returned in the original order of `arr` passed to the `iterator` function.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, results)` which must be called once it
- has completed with an error (which can be `null`) and an array of results.
-* `callback(err, results)` - A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is an array containing
- the concatenated results of the `iterator` function.
-
-__Example__
-
-```js
-async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
- // files is now a list of filenames that exist in the 3 directories
-});
-```
-
----------------------------------------
-
-
-### concatSeries(arr, iterator, callback)
-
-Same as [`concat`](#concat), but executes in series instead of parallel.
-
-
-## Control Flow
-
-
-### series(tasks, [callback])
-
-Run the functions in the `tasks` array in series, each one running once the previous
-function has completed. If any functions in the series pass an error to its
-callback, no more functions are run, and `callback` is immediately called with the value of the error.
-Otherwise, `callback` receives an array of results when `tasks` have completed.
-
-It is also possible to use an object instead of an array. Each property will be
-run as a function, and the results will be passed to the final `callback` as an object
-instead of an array. This can be a more readable way of handling results from
-[`series`](#series).
-
-**Note** that while many implementations preserve the order of object properties, the
-[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
-explicitly states that
-
-> The mechanics and order of enumerating the properties is not specified.
-
-So if you rely on the order in which your series of functions are executed, and want
-this to work on all platforms, consider using an array.
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run, each function is passed
- a `callback(err, result)` it must call on completion with an error `err` (which can
- be `null`) and an optional `result` value.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the `task` callbacks.
-
-__Example__
-
-```js
-async.series([
- function(callback){
- // do some stuff ...
- callback(null, 'one');
- },
- function(callback){
- // do some more stuff ...
- callback(null, 'two');
- }
-],
-// optional callback
-function(err, results){
- // results is now equal to ['one', 'two']
-});
-
-
-// an example using an object instead of an array
-async.series({
- one: function(callback){
- setTimeout(function(){
- callback(null, 1);
- }, 200);
- },
- two: function(callback){
- setTimeout(function(){
- callback(null, 2);
- }, 100);
- }
-},
-function(err, results) {
- // results is now equal to: {one: 1, two: 2}
-});
-```
-
----------------------------------------
-
-
-### parallel(tasks, [callback])
-
-Run the `tasks` array of functions in parallel, without waiting until the previous
-function has completed. If any of the functions pass an error to its
-callback, the main `callback` is immediately called with the value of the error.
-Once the `tasks` have completed, the results are passed to the final `callback` as an
-array.
-
-It is also possible to use an object instead of an array. Each property will be
-run as a function and the results will be passed to the final `callback` as an object
-instead of an array. This can be a more readable way of handling results from
-[`parallel`](#parallel).
-
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run. Each function is passed
- a `callback(err, result)` which it must call on completion with an error `err`
- (which can be `null`) and an optional `result` value.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the task callbacks.
-
-__Example__
-
-```js
-async.parallel([
- function(callback){
- setTimeout(function(){
- callback(null, 'one');
- }, 200);
- },
- function(callback){
- setTimeout(function(){
- callback(null, 'two');
- }, 100);
- }
-],
-// optional callback
-function(err, results){
- // the results array will equal ['one','two'] even though
- // the second function had a shorter timeout.
-});
-
-
-// an example using an object instead of an array
-async.parallel({
- one: function(callback){
- setTimeout(function(){
- callback(null, 1);
- }, 200);
- },
- two: function(callback){
- setTimeout(function(){
- callback(null, 2);
- }, 100);
- }
-},
-function(err, results) {
- // results is now equals to: {one: 1, two: 2}
-});
-```
-
----------------------------------------
-
-
-### parallelLimit(tasks, limit, [callback])
-
-The same as [`parallel`](#parallel), only `tasks` are executed in parallel
-with a maximum of `limit` tasks executing at any time.
-
-Note that the `tasks` are not executed in batches, so there is no guarantee that
-the first `limit` tasks will complete before any others are started.
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run, each function is passed
- a `callback(err, result)` it must call on completion with an error `err` (which can
- be `null`) and an optional `result` value.
-* `limit` - The maximum number of `tasks` to run at any time.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the `task` callbacks.
-
----------------------------------------
-
-
-### whilst(test, fn, callback)
-
-Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-__Arguments__
-
-* `test()` - synchronous truth test to perform before each execution of `fn`.
-* `fn(callback)` - A function which is called each time `test` passes. The function is
- passed a `callback(err)`, which must be called once it has completed with an
- optional `err` argument.
-* `callback(err)` - A callback which is called after the test fails and repeated
- execution of `fn` has stopped.
-
-__Example__
-
-```js
-var count = 0;
-
-async.whilst(
- function () { return count < 5; },
- function (callback) {
- count++;
- setTimeout(callback, 1000);
- },
- function (err) {
- // 5 seconds have passed
- }
-);
-```
-
----------------------------------------
-
-
-### doWhilst(fn, test, callback)
-
-The post-check version of [`whilst`](#whilst). To reflect the difference in
-the order of operations, the arguments `test` and `fn` are switched.
-
-`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
-
----------------------------------------
-
-
-### until(test, fn, callback)
-
-Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-The inverse of [`whilst`](#whilst).
-
----------------------------------------
-
-
-### doUntil(fn, test, callback)
-
-Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.
-
----------------------------------------
-
-
-### forever(fn, errback)
-
-Calls the asynchronous function `fn` with a callback parameter that allows it to
-call itself again, in series, indefinitely.
-
-If an error is passed to the callback then `errback` is called with the
-error, and execution stops, otherwise it will never be called.
-
-```js
-async.forever(
- function(next) {
- // next is suitable for passing to things that need a callback(err [, whatever]);
- // it will result in this function being called again.
- },
- function(err) {
- // if next is called with a value in its first parameter, it will appear
- // in here as 'err', and execution will stop.
- }
-);
-```
-
----------------------------------------
-
-
-### waterfall(tasks, [callback])
-
-Runs the `tasks` array of functions in series, each passing their results to the next in
-the array. However, if any of the `tasks` pass an error to their own callback, the
-next function is not executed, and the main `callback` is immediately called with
-the error.
-
-__Arguments__
-
-* `tasks` - An array of functions to run, each function is passed a
- `callback(err, result1, result2, ...)` it must call on completion. The first
- argument is an error (which can be `null`) and any further arguments will be
- passed as arguments in order to the next task.
-* `callback(err, [results])` - An optional callback to run once all the functions
- have completed. This will be passed the results of the last task's callback.
-
-
-
-__Example__
-
-```js
-async.waterfall([
- function(callback){
- callback(null, 'one', 'two');
- },
- function(arg1, arg2, callback){
- // arg1 now equals 'one' and arg2 now equals 'two'
- callback(null, 'three');
- },
- function(arg1, callback){
- // arg1 now equals 'three'
- callback(null, 'done');
- }
-], function (err, result) {
- // result now equals 'done'
-});
-```
-
----------------------------------------
-
-### compose(fn1, fn2...)
-
-Creates a function which is a composition of the passed asynchronous
-functions. Each function consumes the return value of the function that
-follows. Composing functions `f()`, `g()`, and `h()` would produce the result of
-`f(g(h()))`, only this version uses callbacks to obtain the return values.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* `functions...` - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-function add1(n, callback) {
- setTimeout(function () {
- callback(null, n + 1);
- }, 10);
-}
-
-function mul3(n, callback) {
- setTimeout(function () {
- callback(null, n * 3);
- }, 10);
-}
-
-var add1mul3 = async.compose(mul3, add1);
-
-add1mul3(4, function (err, result) {
- // result now equals 15
-});
-```
-
----------------------------------------
-
-### seq(fn1, fn2...)
-
-Version of the compose function that is more natural to read.
-Each following function consumes the return value of the latter function.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* functions... - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-// Requires lodash (or underscore), express3 and dresende's orm2.
-// Part of an app, that fetches cats of the logged user.
-// This example uses `seq` function to avoid overnesting and error
-// handling clutter.
-app.get('/cats', function(request, response) {
- function handleError(err, data, callback) {
- if (err) {
- console.error(err);
- response.json({ status: 'error', message: err.message });
- }
- else {
- callback(data);
- }
- }
- var User = request.models.User;
- async.seq(
- _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
- handleError,
- function(user, fn) {
- user.getCats(fn); // 'getCats' has signature (callback(err, data))
- },
- handleError,
- function(cats) {
- response.json({ status: 'ok', message: 'Cats found', data: cats });
- }
- )(req.session.user_id);
- }
-});
-```
-
----------------------------------------
-
-### applyEach(fns, args..., callback)
-
-Applies the provided arguments to each function in the array, calling
-`callback` after all functions have completed. If you only provide the first
-argument, then it will return a function which lets you pass in the
-arguments as if it were a single function call.
-
-__Arguments__
-
-* `fns` - the asynchronous functions to all call with the same arguments
-* `args...` - any number of separate arguments to pass to the function
-* `callback` - the final argument should be the callback, called when all
- functions have completed processing
-
-
-__Example__
-
-```js
-async.applyEach([enableSearch, updateSchema], 'bucket', callback);
-
-// partial application example:
-async.each(
- buckets,
- async.applyEach([enableSearch, updateSchema]),
- callback
-);
-```
-
----------------------------------------
-
-
-### applyEachSeries(arr, iterator, callback)
-
-The same as [`applyEach`](#applyEach) only the functions are applied in series.
-
----------------------------------------
-
-
-### queue(worker, concurrency)
-
-Creates a `queue` object with the specified `concurrency`. Tasks added to the
-`queue` are processed in parallel (up to the `concurrency` limit). If all
-`worker`s are in progress, the task is queued until one becomes available.
-Once a `worker` completes a `task`, that `task`'s callback is called.
-
-__Arguments__
-
-* `worker(task, callback)` - An asynchronous function for processing a queued
- task, which must call its `callback(err)` argument when finished, with an
- optional `error` as an argument.
-* `concurrency` - An `integer` for determining how many `worker` functions should be
- run in parallel.
-
-__Queue objects__
-
-The `queue` object returned by this function has the following properties and
-methods:
-
-* `length()` - a function returning the number of items waiting to be processed.
-* `started` - a function returning whether or not any items have been pushed and processed by the queue
-* `running()` - a function returning the number of items currently being processed.
-* `idle()` - a function returning false if there are items waiting or being processed, or true if not.
-* `concurrency` - an integer for determining how many `worker` functions should be
- run in parallel. This property can be changed after a `queue` is created to
- alter the concurrency on-the-fly.
-* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once
- the `worker` has finished processing the task. Instead of a single task, a `tasks` array
- can be submitted. The respective callback is used for every task in the list.
-* `unshift(task, [callback])` - add a new task to the front of the `queue`.
-* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,
- and further tasks will be queued.
-* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.
-* `paused` - a boolean for determining whether the queue is in a paused state
-* `pause()` - a function that pauses the processing of tasks until `resume()` is called.
-* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.
-* `kill()` - a function that empties remaining tasks from the queue forcing it to go idle.
-
-__Example__
-
-```js
-// create a queue object with concurrency 2
-
-var q = async.queue(function (task, callback) {
- console.log('hello ' + task.name);
- callback();
-}, 2);
-
-
-// assign a callback
-q.drain = function() {
- console.log('all items have been processed');
-}
-
-// add some items to the queue
-
-q.push({name: 'foo'}, function (err) {
- console.log('finished processing foo');
-});
-q.push({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-
-// add some items to the queue (batch-wise)
-
-q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
- console.log('finished processing bar');
-});
-
-// add some items to the front of the queue
-
-q.unshift({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-```
-
-
----------------------------------------
-
-
-### priorityQueue(worker, concurrency)
-
-The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:
-
-* `push(task, priority, [callback])` - `priority` should be a number. If an array of
- `tasks` is given, all tasks will be assigned the same priority.
-* The `unshift` method was removed.
-
----------------------------------------
-
-
-### cargo(worker, [payload])
-
-Creates a `cargo` object with the specified payload. Tasks added to the
-cargo will be processed altogether (up to the `payload` limit). If the
-`worker` is in progress, the task is queued until it becomes available. Once
-the `worker` has completed some tasks, each callback of those tasks is called.
-Check out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work.
-
-While [queue](#queue) passes only one task to one of a group of workers
-at a time, cargo passes an array of tasks to a single worker, repeating
-when the worker is finished.
-
-__Arguments__
-
-* `worker(tasks, callback)` - An asynchronous function for processing an array of
- queued tasks, which must call its `callback(err)` argument when finished, with
- an optional `err` argument.
-* `payload` - An optional `integer` for determining how many tasks should be
- processed per round; if omitted, the default is unlimited.
-
-__Cargo objects__
-
-The `cargo` object returned by this function has the following properties and
-methods:
-
-* `length()` - A function returning the number of items waiting to be processed.
-* `payload` - An `integer` for determining how many tasks should be
- process per round. This property can be changed after a `cargo` is created to
- alter the payload on-the-fly.
-* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called
- once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`
- can be submitted. The respective callback is used for every task in the list.
-* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.
-* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.
-
-__Example__
-
-```js
-// create a cargo object with payload 2
-
-var cargo = async.cargo(function (tasks, callback) {
- for(var i=0; i
-### auto(tasks, [callback])
-
-Determines the best order for running the functions in `tasks`, based on their
-requirements. Each function can optionally depend on other functions being completed
-first, and each function is run as soon as its requirements are satisfied.
-
-If any of the functions pass an error to their callback, it will not
-complete (so any other functions depending on it will not run), and the main
-`callback` is immediately called with the error. Functions also receive an
-object containing the results of functions which have completed so far.
-
-Note, all functions are called with a `results` object as a second argument,
-so it is unsafe to pass functions in the `tasks` object which cannot handle the
-extra argument.
-
-For example, this snippet of code:
-
-```js
-async.auto({
- readData: async.apply(fs.readFile, 'data.txt', 'utf-8')
-}, callback);
-```
-
-will have the effect of calling `readFile` with the results object as the last
-argument, which will fail:
-
-```js
-fs.readFile('data.txt', 'utf-8', cb, {});
-```
-
-Instead, wrap the call to `readFile` in a function which does not forward the
-`results` object:
-
-```js
-async.auto({
- readData: function(cb, results){
- fs.readFile('data.txt', 'utf-8', cb);
- }
-}, callback);
-```
-
-__Arguments__
-
-* `tasks` - An object. Each of its properties is either a function or an array of
- requirements, with the function itself the last item in the array. The object's key
- of a property serves as the name of the task defined by that property,
- i.e. can be used when specifying requirements for other tasks.
- The function receives two arguments: (1) a `callback(err, result)` which must be
- called when finished, passing an `error` (which can be `null`) and the result of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions.
-* `callback(err, results)` - An optional callback which is called when all the
- tasks have been completed. It receives the `err` argument if any `tasks`
- pass an error to their callback. Results are always returned; however, if
- an error occurs, no further `tasks` will be performed, and the results
- object will only contain partial results.
-
-
-__Example__
-
-```js
-async.auto({
- get_data: function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- make_folder: function(callback){
- console.log('in make_folder');
- // async code to create a directory to store a file in
- // this is run at the same time as getting the data
- callback(null, 'folder');
- },
- write_file: ['get_data', 'make_folder', function(callback, results){
- console.log('in write_file', JSON.stringify(results));
- // once there is some data and the directory exists,
- // write the data to a file in the directory
- callback(null, 'filename');
- }],
- email_link: ['write_file', function(callback, results){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- // results.write_file contains the filename returned by write_file.
- callback(null, {'file':results.write_file, 'email':'user@example.com'});
- }]
-}, function(err, results) {
- console.log('err = ', err);
- console.log('results = ', results);
-});
-```
-
-This is a fairly trivial example, but to do this using the basic parallel and
-series functions would look like this:
-
-```js
-async.parallel([
- function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- function(callback){
- console.log('in make_folder');
- // async code to create a directory to store a file in
- // this is run at the same time as getting the data
- callback(null, 'folder');
- }
-],
-function(err, results){
- async.series([
- function(callback){
- console.log('in write_file', JSON.stringify(results));
- // once there is some data and the directory exists,
- // write the data to a file in the directory
- results.push('filename');
- callback(null);
- },
- function(callback){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- callback(null, {'file':results.pop(), 'email':'user@example.com'});
- }
- ]);
-});
-```
-
-For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding
-new tasks much easier (and the code more readable).
-
-
----------------------------------------
-
-
-### retry([times = 5], task, [callback])
-
-Attempts to get a successful response from `task` no more than `times` times before
-returning an error. If the task is successful, the `callback` will be passed the result
-of the successfull task. If all attemps fail, the callback will be passed the error and
-result (if any) of the final attempt.
-
-__Arguments__
-
-* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5.
-* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
- which must be called when finished, passing `err` (which can be `null`) and the `result` of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions (if nested inside another control flow).
-* `callback(err, results)` - An optional callback which is called when the
- task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.
-
-The [`retry`](#retry) function can be used as a stand-alone control flow by passing a
-callback, as shown below:
-
-```js
-async.retry(3, apiMethod, function(err, result) {
- // do something with the result
-});
-```
-
-It can also be embeded within other control flow functions to retry individual methods
-that are not as reliable, like this:
-
-```js
-async.auto({
- users: api.getUsers.bind(api),
- payments: async.retry(3, api.getPayments.bind(api))
-}, function(err, results) {
- // do something with the results
-});
-```
-
-
----------------------------------------
-
-
-### iterator(tasks)
-
-Creates an iterator function which calls the next function in the `tasks` array,
-returning a continuation to call the next one after that. It's also possible to
-“peek” at the next iterator with `iterator.next()`.
-
-This function is used internally by the `async` module, but can be useful when
-you want to manually control the flow of functions in series.
-
-__Arguments__
-
-* `tasks` - An array of functions to run.
-
-__Example__
-
-```js
-var iterator = async.iterator([
- function(){ sys.p('one'); },
- function(){ sys.p('two'); },
- function(){ sys.p('three'); }
-]);
-
-node> var iterator2 = iterator();
-'one'
-node> var iterator3 = iterator2();
-'two'
-node> iterator3();
-'three'
-node> var nextfn = iterator2.next();
-node> nextfn();
-'three'
-```
-
----------------------------------------
-
-
-### apply(function, arguments..)
-
-Creates a continuation function with some arguments already applied.
-
-Useful as a shorthand when combined with other control flow functions. Any arguments
-passed to the returned function are added to the arguments originally passed
-to apply.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to automatically apply when the
- continuation is called.
-
-__Example__
-
-```js
-// using apply
-
-async.parallel([
- async.apply(fs.writeFile, 'testfile1', 'test1'),
- async.apply(fs.writeFile, 'testfile2', 'test2'),
-]);
-
-
-// the same process without using apply
-
-async.parallel([
- function(callback){
- fs.writeFile('testfile1', 'test1', callback);
- },
- function(callback){
- fs.writeFile('testfile2', 'test2', callback);
- }
-]);
-```
-
-It's possible to pass any number of additional arguments when calling the
-continuation:
-
-```js
-node> var fn = async.apply(sys.puts, 'one');
-node> fn('two', 'three');
-one
-two
-three
-```
-
----------------------------------------
-
-
-### nextTick(callback)
-
-Calls `callback` on a later loop around the event loop. In Node.js this just
-calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
-if available, otherwise `setTimeout(callback, 0)`, which means other higher priority
-events may precede the execution of `callback`.
-
-This is used internally for browser-compatibility purposes.
-
-__Arguments__
-
-* `callback` - The function to call on a later loop around the event loop.
-
-__Example__
-
-```js
-var call_order = [];
-async.nextTick(function(){
- call_order.push('two');
- // call_order now equals ['one','two']
-});
-call_order.push('one')
-```
-
-
-### times(n, callback)
-
-Calls the `callback` function `n` times, and accumulates results in the same manner
-you would use with [`map`](#map).
-
-__Arguments__
-
-* `n` - The number of times to run the function.
-* `callback` - The function to call `n` times.
-
-__Example__
-
-```js
-// Pretend this is some complicated async factory
-var createUser = function(id, callback) {
- callback(null, {
- id: 'user' + id
- })
-}
-// generate 5 users
-async.times(5, function(n, next){
- createUser(n, function(err, user) {
- next(err, user)
- })
-}, function(err, users) {
- // we should now have 5 users
-});
-```
-
-
-### timesSeries(n, callback)
-
-The same as [`times`](#times), only the iterator is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
-
-## Utils
-
-
-### memoize(fn, [hasher])
-
-Caches the results of an `async` function. When creating a hash to store function
-results against, the callback is omitted from the hash and an optional hash
-function can be used.
-
-The cache of results is exposed as the `memo` property of the function returned
-by `memoize`.
-
-__Arguments__
-
-* `fn` - The function to proxy and cache results from.
-* `hasher` - Tn optional function for generating a custom hash for storing
- results. It has all the arguments applied to it apart from the callback, and
- must be synchronous.
-
-__Example__
-
-```js
-var slow_fn = function (name, callback) {
- // do something
- callback(null, result);
-};
-var fn = async.memoize(slow_fn);
-
-// fn can now be used as if it were slow_fn
-fn('some name', function () {
- // callback
-});
-```
-
-
-### unmemoize(fn)
-
-Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized
-form. Handy for testing.
-
-__Arguments__
-
-* `fn` - the memoized function
-
-
-### log(function, arguments)
-
-Logs the result of an `async` function to the `console`. Only works in Node.js or
-in browsers that support `console.log` and `console.error` (such as FF and Chrome).
-If multiple arguments are returned from the async function, `console.log` is
-called on each argument in order.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, 'hello ' + name);
- }, 1000);
-};
-```
-```js
-node> async.log(hello, 'world');
-'hello world'
-```
-
----------------------------------------
-
-
-### dir(function, arguments)
-
-Logs the result of an `async` function to the `console` using `console.dir` to
-display the properties of the resulting object. Only works in Node.js or
-in browsers that support `console.dir` and `console.error` (such as FF and Chrome).
-If multiple arguments are returned from the async function, `console.dir` is
-called on each argument in order.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, {hello: name});
- }, 1000);
-};
-```
-```js
-node> async.dir(hello, 'world');
-{hello: 'world'}
-```
-
----------------------------------------
-
-
-### noConflict()
-
-Changes the value of `async` back to its original value, returning a reference to the
-`async` object.
diff --git a/topics/00. Course-introduction/slides/node_modules/async/component.json b/topics/00. Course-introduction/slides/node_modules/async/component.json
deleted file mode 100644
index bbb0115..0000000
--- a/topics/00. Course-introduction/slides/node_modules/async/component.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "async",
- "repo": "caolan/async",
- "description": "Higher-order functions and common patterns for asynchronous code",
- "version": "0.1.23",
- "keywords": [],
- "dependencies": {},
- "development": {},
- "main": "lib/async.js",
- "scripts": [ "lib/async.js" ]
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/async/lib/async.js b/topics/00. Course-introduction/slides/node_modules/async/lib/async.js
deleted file mode 100755
index 01e8afc..0000000
--- a/topics/00. Course-introduction/slides/node_modules/async/lib/async.js
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*!
- * async
- * https://github.com/caolan/async
- *
- * Copyright 2010-2014 Caolan McMahon
- * Released under the MIT license
- */
-/*jshint onevar: false, indent:4 */
-/*global setImmediate: false, setTimeout: false, console: false */
-(function () {
-
- var async = {};
-
- // global on the server, window in the browser
- var root, previous_async;
-
- root = this;
- if (root != null) {
- previous_async = root.async;
- }
-
- async.noConflict = function () {
- root.async = previous_async;
- return async;
- };
-
- function only_once(fn) {
- var called = false;
- return function() {
- if (called) throw new Error("Callback was already called.");
- called = true;
- fn.apply(root, arguments);
- }
- }
-
- //// cross-browser compatiblity functions ////
-
- var _toString = Object.prototype.toString;
-
- var _isArray = Array.isArray || function (obj) {
- return _toString.call(obj) === '[object Array]';
- };
-
- var _each = function (arr, iterator) {
- if (arr.forEach) {
- return arr.forEach(iterator);
- }
- for (var i = 0; i < arr.length; i += 1) {
- iterator(arr[i], i, arr);
- }
- };
-
- var _map = function (arr, iterator) {
- if (arr.map) {
- return arr.map(iterator);
- }
- var results = [];
- _each(arr, function (x, i, a) {
- results.push(iterator(x, i, a));
- });
- return results;
- };
-
- var _reduce = function (arr, iterator, memo) {
- if (arr.reduce) {
- return arr.reduce(iterator, memo);
- }
- _each(arr, function (x, i, a) {
- memo = iterator(memo, x, i, a);
- });
- return memo;
- };
-
- var _keys = function (obj) {
- if (Object.keys) {
- return Object.keys(obj);
- }
- var keys = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- return keys;
- };
-
- //// exported async module functions ////
-
- //// nextTick implementation with browser-compatible fallback ////
- if (typeof process === 'undefined' || !(process.nextTick)) {
- if (typeof setImmediate === 'function') {
- async.nextTick = function (fn) {
- // not a direct alias for IE10 compatibility
- setImmediate(fn);
- };
- async.setImmediate = async.nextTick;
- }
- else {
- async.nextTick = function (fn) {
- setTimeout(fn, 0);
- };
- async.setImmediate = async.nextTick;
- }
- }
- else {
- async.nextTick = process.nextTick;
- if (typeof setImmediate !== 'undefined') {
- async.setImmediate = function (fn) {
- // not a direct alias for IE10 compatibility
- setImmediate(fn);
- };
- }
- else {
- async.setImmediate = async.nextTick;
- }
- }
-
- async.each = function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length) {
- return callback();
- }
- var completed = 0;
- _each(arr, function (x) {
- iterator(x, only_once(done) );
- });
- function done(err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- if (completed >= arr.length) {
- callback();
- }
- }
- }
- };
- async.forEach = async.each;
-
- async.eachSeries = function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length) {
- return callback();
- }
- var completed = 0;
- var iterate = function () {
- iterator(arr[completed], function (err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- if (completed >= arr.length) {
- callback();
- }
- else {
- iterate();
- }
- }
- });
- };
- iterate();
- };
- async.forEachSeries = async.eachSeries;
-
- async.eachLimit = function (arr, limit, iterator, callback) {
- var fn = _eachLimit(limit);
- fn.apply(null, [arr, iterator, callback]);
- };
- async.forEachLimit = async.eachLimit;
-
- var _eachLimit = function (limit) {
-
- return function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length || limit <= 0) {
- return callback();
- }
- var completed = 0;
- var started = 0;
- var running = 0;
-
- (function replenish () {
- if (completed >= arr.length) {
- return callback();
- }
-
- while (running < limit && started < arr.length) {
- started += 1;
- running += 1;
- iterator(arr[started - 1], function (err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- running -= 1;
- if (completed >= arr.length) {
- callback();
- }
- else {
- replenish();
- }
- }
- });
- }
- })();
- };
- };
-
-
- var doParallel = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [async.each].concat(args));
- };
- };
- var doParallelLimit = function(limit, fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [_eachLimit(limit)].concat(args));
- };
- };
- var doSeries = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [async.eachSeries].concat(args));
- };
- };
-
-
- var _asyncMap = function (eachfn, arr, iterator, callback) {
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- if (!callback) {
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (err) {
- callback(err);
- });
- });
- } else {
- var results = [];
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (err, v) {
- results[x.index] = v;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
- async.map = doParallel(_asyncMap);
- async.mapSeries = doSeries(_asyncMap);
- async.mapLimit = function (arr, limit, iterator, callback) {
- return _mapLimit(limit)(arr, iterator, callback);
- };
-
- var _mapLimit = function(limit) {
- return doParallelLimit(limit, _asyncMap);
- };
-
- // reduce only has a series version, as doing reduce in parallel won't
- // work in many situations.
- async.reduce = function (arr, memo, iterator, callback) {
- async.eachSeries(arr, function (x, callback) {
- iterator(memo, x, function (err, v) {
- memo = v;
- callback(err);
- });
- }, function (err) {
- callback(err, memo);
- });
- };
- // inject alias
- async.inject = async.reduce;
- // foldl alias
- async.foldl = async.reduce;
-
- async.reduceRight = function (arr, memo, iterator, callback) {
- var reversed = _map(arr, function (x) {
- return x;
- }).reverse();
- async.reduce(reversed, memo, iterator, callback);
- };
- // foldr alias
- async.foldr = async.reduceRight;
-
- var _filter = function (eachfn, arr, iterator, callback) {
- var results = [];
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (v) {
- if (v) {
- results.push(x);
- }
- callback();
- });
- }, function (err) {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- };
- async.filter = doParallel(_filter);
- async.filterSeries = doSeries(_filter);
- // select alias
- async.select = async.filter;
- async.selectSeries = async.filterSeries;
-
- var _reject = function (eachfn, arr, iterator, callback) {
- var results = [];
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (v) {
- if (!v) {
- results.push(x);
- }
- callback();
- });
- }, function (err) {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- };
- async.reject = doParallel(_reject);
- async.rejectSeries = doSeries(_reject);
-
- var _detect = function (eachfn, arr, iterator, main_callback) {
- eachfn(arr, function (x, callback) {
- iterator(x, function (result) {
- if (result) {
- main_callback(x);
- main_callback = function () {};
- }
- else {
- callback();
- }
- });
- }, function (err) {
- main_callback();
- });
- };
- async.detect = doParallel(_detect);
- async.detectSeries = doSeries(_detect);
-
- async.some = function (arr, iterator, main_callback) {
- async.each(arr, function (x, callback) {
- iterator(x, function (v) {
- if (v) {
- main_callback(true);
- main_callback = function () {};
- }
- callback();
- });
- }, function (err) {
- main_callback(false);
- });
- };
- // any alias
- async.any = async.some;
-
- async.every = function (arr, iterator, main_callback) {
- async.each(arr, function (x, callback) {
- iterator(x, function (v) {
- if (!v) {
- main_callback(false);
- main_callback = function () {};
- }
- callback();
- });
- }, function (err) {
- main_callback(true);
- });
- };
- // all alias
- async.all = async.every;
-
- async.sortBy = function (arr, iterator, callback) {
- async.map(arr, function (x, callback) {
- iterator(x, function (err, criteria) {
- if (err) {
- callback(err);
- }
- else {
- callback(null, {value: x, criteria: criteria});
- }
- });
- }, function (err, results) {
- if (err) {
- return callback(err);
- }
- else {
- var fn = function (left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- };
- callback(null, _map(results.sort(fn), function (x) {
- return x.value;
- }));
- }
- });
- };
-
- async.auto = function (tasks, callback) {
- callback = callback || function () {};
- var keys = _keys(tasks);
- var remainingTasks = keys.length
- if (!remainingTasks) {
- return callback();
- }
-
- var results = {};
-
- var listeners = [];
- var addListener = function (fn) {
- listeners.unshift(fn);
- };
- var removeListener = function (fn) {
- for (var i = 0; i < listeners.length; i += 1) {
- if (listeners[i] === fn) {
- listeners.splice(i, 1);
- return;
- }
- }
- };
- var taskComplete = function () {
- remainingTasks--
- _each(listeners.slice(0), function (fn) {
- fn();
- });
- };
-
- addListener(function () {
- if (!remainingTasks) {
- var theCallback = callback;
- // prevent final callback from calling itself if it errors
- callback = function () {};
-
- theCallback(null, results);
- }
- });
-
- _each(keys, function (k) {
- var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
- var taskCallback = function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- if (err) {
- var safeResults = {};
- _each(_keys(results), function(rkey) {
- safeResults[rkey] = results[rkey];
- });
- safeResults[k] = args;
- callback(err, safeResults);
- // stop subsequent errors hitting callback multiple times
- callback = function () {};
- }
- else {
- results[k] = args;
- async.setImmediate(taskComplete);
- }
- };
- var requires = task.slice(0, Math.abs(task.length - 1)) || [];
- var ready = function () {
- return _reduce(requires, function (a, x) {
- return (a && results.hasOwnProperty(x));
- }, true) && !results.hasOwnProperty(k);
- };
- if (ready()) {
- task[task.length - 1](taskCallback, results);
- }
- else {
- var listener = function () {
- if (ready()) {
- removeListener(listener);
- task[task.length - 1](taskCallback, results);
- }
- };
- addListener(listener);
- }
- });
- };
-
- async.retry = function(times, task, callback) {
- var DEFAULT_TIMES = 5;
- var attempts = [];
- // Use defaults if times not passed
- if (typeof times === 'function') {
- callback = task;
- task = times;
- times = DEFAULT_TIMES;
- }
- // Make sure times is a number
- times = parseInt(times, 10) || DEFAULT_TIMES;
- var wrappedTask = function(wrappedCallback, wrappedResults) {
- var retryAttempt = function(task, finalAttempt) {
- return function(seriesCallback) {
- task(function(err, result){
- seriesCallback(!err || finalAttempt, {err: err, result: result});
- }, wrappedResults);
- };
- };
- while (times) {
- attempts.push(retryAttempt(task, !(times-=1)));
- }
- async.series(attempts, function(done, data){
- data = data[data.length - 1];
- (wrappedCallback || callback)(data.err, data.result);
- });
- }
- // If a callback is passed, run this as a controll flow
- return callback ? wrappedTask() : wrappedTask
- };
-
- async.waterfall = function (tasks, callback) {
- callback = callback || function () {};
- if (!_isArray(tasks)) {
- var err = new Error('First argument to waterfall must be an array of functions');
- return callback(err);
- }
- if (!tasks.length) {
- return callback();
- }
- var wrapIterator = function (iterator) {
- return function (err) {
- if (err) {
- callback.apply(null, arguments);
- callback = function () {};
- }
- else {
- var args = Array.prototype.slice.call(arguments, 1);
- var next = iterator.next();
- if (next) {
- args.push(wrapIterator(next));
- }
- else {
- args.push(callback);
- }
- async.setImmediate(function () {
- iterator.apply(null, args);
- });
- }
- };
- };
- wrapIterator(async.iterator(tasks))();
- };
-
- var _parallel = function(eachfn, tasks, callback) {
- callback = callback || function () {};
- if (_isArray(tasks)) {
- eachfn.map(tasks, function (fn, callback) {
- if (fn) {
- fn(function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- callback.call(null, err, args);
- });
- }
- }, callback);
- }
- else {
- var results = {};
- eachfn.each(_keys(tasks), function (k, callback) {
- tasks[k](function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- results[k] = args;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
-
- async.parallel = function (tasks, callback) {
- _parallel({ map: async.map, each: async.each }, tasks, callback);
- };
-
- async.parallelLimit = function(tasks, limit, callback) {
- _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
- };
-
- async.series = function (tasks, callback) {
- callback = callback || function () {};
- if (_isArray(tasks)) {
- async.mapSeries(tasks, function (fn, callback) {
- if (fn) {
- fn(function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- callback.call(null, err, args);
- });
- }
- }, callback);
- }
- else {
- var results = {};
- async.eachSeries(_keys(tasks), function (k, callback) {
- tasks[k](function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- results[k] = args;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
-
- async.iterator = function (tasks) {
- var makeCallback = function (index) {
- var fn = function () {
- if (tasks.length) {
- tasks[index].apply(null, arguments);
- }
- return fn.next();
- };
- fn.next = function () {
- return (index < tasks.length - 1) ? makeCallback(index + 1): null;
- };
- return fn;
- };
- return makeCallback(0);
- };
-
- async.apply = function (fn) {
- var args = Array.prototype.slice.call(arguments, 1);
- return function () {
- return fn.apply(
- null, args.concat(Array.prototype.slice.call(arguments))
- );
- };
- };
-
- var _concat = function (eachfn, arr, fn, callback) {
- var r = [];
- eachfn(arr, function (x, cb) {
- fn(x, function (err, y) {
- r = r.concat(y || []);
- cb(err);
- });
- }, function (err) {
- callback(err, r);
- });
- };
- async.concat = doParallel(_concat);
- async.concatSeries = doSeries(_concat);
-
- async.whilst = function (test, iterator, callback) {
- if (test()) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- async.whilst(test, iterator, callback);
- });
- }
- else {
- callback();
- }
- };
-
- async.doWhilst = function (iterator, test, callback) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- var args = Array.prototype.slice.call(arguments, 1);
- if (test.apply(null, args)) {
- async.doWhilst(iterator, test, callback);
- }
- else {
- callback();
- }
- });
- };
-
- async.until = function (test, iterator, callback) {
- if (!test()) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- async.until(test, iterator, callback);
- });
- }
- else {
- callback();
- }
- };
-
- async.doUntil = function (iterator, test, callback) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- var args = Array.prototype.slice.call(arguments, 1);
- if (!test.apply(null, args)) {
- async.doUntil(iterator, test, callback);
- }
- else {
- callback();
- }
- });
- };
-
- async.queue = function (worker, concurrency) {
- if (concurrency === undefined) {
- concurrency = 1;
- }
- function _insert(q, data, pos, callback) {
- if (!q.started){
- q.started = true;
- }
- if (!_isArray(data)) {
- data = [data];
- }
- if(data.length == 0) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- if (q.drain) {
- q.drain();
- }
- });
- }
- _each(data, function(task) {
- var item = {
- data: task,
- callback: typeof callback === 'function' ? callback : null
- };
-
- if (pos) {
- q.tasks.unshift(item);
- } else {
- q.tasks.push(item);
- }
-
- if (q.saturated && q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- var workers = 0;
- var q = {
- tasks: [],
- concurrency: concurrency,
- saturated: null,
- empty: null,
- drain: null,
- started: false,
- paused: false,
- push: function (data, callback) {
- _insert(q, data, false, callback);
- },
- kill: function () {
- q.drain = null;
- q.tasks = [];
- },
- unshift: function (data, callback) {
- _insert(q, data, true, callback);
- },
- process: function () {
- if (!q.paused && workers < q.concurrency && q.tasks.length) {
- var task = q.tasks.shift();
- if (q.empty && q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- var next = function () {
- workers -= 1;
- if (task.callback) {
- task.callback.apply(task, arguments);
- }
- if (q.drain && q.tasks.length + workers === 0) {
- q.drain();
- }
- q.process();
- };
- var cb = only_once(next);
- worker(task.data, cb);
- }
- },
- length: function () {
- return q.tasks.length;
- },
- running: function () {
- return workers;
- },
- idle: function() {
- return q.tasks.length + workers === 0;
- },
- pause: function () {
- if (q.paused === true) { return; }
- q.paused = true;
- q.process();
- },
- resume: function () {
- if (q.paused === false) { return; }
- q.paused = false;
- q.process();
- }
- };
- return q;
- };
-
- async.priorityQueue = function (worker, concurrency) {
-
- function _compareTasks(a, b){
- return a.priority - b.priority;
- };
-
- function _binarySearch(sequence, item, compare) {
- var beg = -1,
- end = sequence.length - 1;
- while (beg < end) {
- var mid = beg + ((end - beg + 1) >>> 1);
- if (compare(item, sequence[mid]) >= 0) {
- beg = mid;
- } else {
- end = mid - 1;
- }
- }
- return beg;
- }
-
- function _insert(q, data, priority, callback) {
- if (!q.started){
- q.started = true;
- }
- if (!_isArray(data)) {
- data = [data];
- }
- if(data.length == 0) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- if (q.drain) {
- q.drain();
- }
- });
- }
- _each(data, function(task) {
- var item = {
- data: task,
- priority: priority,
- callback: typeof callback === 'function' ? callback : null
- };
-
- q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
-
- if (q.saturated && q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- // Start with a normal queue
- var q = async.queue(worker, concurrency);
-
- // Override push to accept second parameter representing priority
- q.push = function (data, priority, callback) {
- _insert(q, data, priority, callback);
- };
-
- // Remove unshift function
- delete q.unshift;
-
- return q;
- };
-
- async.cargo = function (worker, payload) {
- var working = false,
- tasks = [];
-
- var cargo = {
- tasks: tasks,
- payload: payload,
- saturated: null,
- empty: null,
- drain: null,
- drained: true,
- push: function (data, callback) {
- if (!_isArray(data)) {
- data = [data];
- }
- _each(data, function(task) {
- tasks.push({
- data: task,
- callback: typeof callback === 'function' ? callback : null
- });
- cargo.drained = false;
- if (cargo.saturated && tasks.length === payload) {
- cargo.saturated();
- }
- });
- async.setImmediate(cargo.process);
- },
- process: function process() {
- if (working) return;
- if (tasks.length === 0) {
- if(cargo.drain && !cargo.drained) cargo.drain();
- cargo.drained = true;
- return;
- }
-
- var ts = typeof payload === 'number'
- ? tasks.splice(0, payload)
- : tasks.splice(0, tasks.length);
-
- var ds = _map(ts, function (task) {
- return task.data;
- });
-
- if(cargo.empty) cargo.empty();
- working = true;
- worker(ds, function () {
- working = false;
-
- var args = arguments;
- _each(ts, function (data) {
- if (data.callback) {
- data.callback.apply(null, args);
- }
- });
-
- process();
- });
- },
- length: function () {
- return tasks.length;
- },
- running: function () {
- return working;
- }
- };
- return cargo;
- };
-
- var _console_fn = function (name) {
- return function (fn) {
- var args = Array.prototype.slice.call(arguments, 1);
- fn.apply(null, args.concat([function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (typeof console !== 'undefined') {
- if (err) {
- if (console.error) {
- console.error(err);
- }
- }
- else if (console[name]) {
- _each(args, function (x) {
- console[name](x);
- });
- }
- }
- }]));
- };
- };
- async.log = _console_fn('log');
- async.dir = _console_fn('dir');
- /*async.info = _console_fn('info');
- async.warn = _console_fn('warn');
- async.error = _console_fn('error');*/
-
- async.memoize = function (fn, hasher) {
- var memo = {};
- var queues = {};
- hasher = hasher || function (x) {
- return x;
- };
- var memoized = function () {
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- var key = hasher.apply(null, args);
- if (key in memo) {
- async.nextTick(function () {
- callback.apply(null, memo[key]);
- });
- }
- else if (key in queues) {
- queues[key].push(callback);
- }
- else {
- queues[key] = [callback];
- fn.apply(null, args.concat([function () {
- memo[key] = arguments;
- var q = queues[key];
- delete queues[key];
- for (var i = 0, l = q.length; i < l; i++) {
- q[i].apply(null, arguments);
- }
- }]));
- }
- };
- memoized.memo = memo;
- memoized.unmemoized = fn;
- return memoized;
- };
-
- async.unmemoize = function (fn) {
- return function () {
- return (fn.unmemoized || fn).apply(null, arguments);
- };
- };
-
- async.times = function (count, iterator, callback) {
- var counter = [];
- for (var i = 0; i < count; i++) {
- counter.push(i);
- }
- return async.map(counter, iterator, callback);
- };
-
- async.timesSeries = function (count, iterator, callback) {
- var counter = [];
- for (var i = 0; i < count; i++) {
- counter.push(i);
- }
- return async.mapSeries(counter, iterator, callback);
- };
-
- async.seq = function (/* functions... */) {
- var fns = arguments;
- return function () {
- var that = this;
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- async.reduce(fns, args, function (newargs, fn, cb) {
- fn.apply(that, newargs.concat([function () {
- var err = arguments[0];
- var nextargs = Array.prototype.slice.call(arguments, 1);
- cb(err, nextargs);
- }]))
- },
- function (err, results) {
- callback.apply(that, [err].concat(results));
- });
- };
- };
-
- async.compose = function (/* functions... */) {
- return async.seq.apply(null, Array.prototype.reverse.call(arguments));
- };
-
- var _applyEach = function (eachfn, fns /*args...*/) {
- var go = function () {
- var that = this;
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- return eachfn(fns, function (fn, cb) {
- fn.apply(that, args.concat([cb]));
- },
- callback);
- };
- if (arguments.length > 2) {
- var args = Array.prototype.slice.call(arguments, 2);
- return go.apply(this, args);
- }
- else {
- return go;
- }
- };
- async.applyEach = doParallel(_applyEach);
- async.applyEachSeries = doSeries(_applyEach);
-
- async.forever = function (fn, callback) {
- function next(err) {
- if (err) {
- if (callback) {
- return callback(err);
- }
- throw err;
- }
- fn(next);
- }
- next();
- };
-
- // Node.js
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = async;
- }
- // AMD / RequireJS
- else if (typeof define !== 'undefined' && define.amd) {
- define([], function () {
- return async;
- });
- }
- // included directly via
-```
-
-In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):
-
-```js
-var he = require('he');
-```
-
-In [Rhino](http://www.mozilla.org/rhino/):
-
-```js
-load('he.js');
-```
-
-Using an AMD loader like [RequireJS](http://requirejs.org/):
-
-```js
-require(
- {
- 'paths': {
- 'he': 'path/to/he'
- }
- },
- ['he'],
- function(he) {
- console.log(he);
- }
-);
-```
-
-## API
-
-### `he.version`
-
-A string representing the semantic version number.
-
-### `he.encode(text, options)`
-
-This function takes a string of text and encodes (by default) any symbols that aren’t printable ASCII symbols and `&`, `<`, `>`, `"`, `'`, and `` ` ``, replacing them with character references.
-
-```js
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-As long as the input string contains [allowed code points](http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream) only, the return value of this function is always valid HTML. Any [(invalid) code points that cannot be represented using a character reference](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#table-charref-overrides) in the input are not encoded.
-
-```js
-he.encode('foo \0 bar');
-// → 'foo \0 bar'
-```
-
-The `options` object is optional. It recognizes the following properties:
-
-#### `useNamedReferences`
-
-The default value for the `useNamedReferences` option is `false`. This means that `encode()` will not use any named character references (e.g. `©`) in the output — hexadecimal escapes (e.g. `©`) will be used instead. Set it to `true` to enable the use of named references.
-
-**Note that if compatibility with older browsers is a concern, this option should remain disabled.**
-
-```js
-// Using the global default setting (defaults to `false`):
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// Passing an `options` object to `encode`, to explicitly disallow named references:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'useNamedReferences': false
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// Passing an `options` object to `encode`, to explicitly allow named references:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'useNamedReferences': true
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-#### `encodeEverything`
-
-The default value for the `encodeEverything` option is `false`. This means that `encode()` will not use any character references for printable ASCII symbols that don’t need escaping. Set it to `true` to encode every symbol in the input string. When set to `true`, this option takes precedence over `allowUnsafeSymbols` (i.e. setting the latter to `true` in such a case has no effect).
-
-```js
-// Using the global default setting (defaults to `false`):
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// Passing an `options` object to `encode`, to explicitly encode all symbols:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'encodeEverything': true
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// This setting can be combined with the `useNamedReferences` option:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'encodeEverything': true,
- 'useNamedReferences': true
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-#### `strict`
-
-The default value for the `strict` option is `false`. This means that `encode()` will encode any HTML text content you feed it, even if it contains any symbols that cause [parse errors](http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators.
-
-```js
-// Using the global default setting (defaults to `false`, i.e. error-tolerant mode):
-he.encode('\x01');
-// → ''
-
-// Passing an `options` object to `encode`, to explicitly enable error-tolerant mode:
-he.encode('\x01', {
- 'strict': false
-});
-// → ''
-
-// Passing an `options` object to `encode`, to explicitly enable strict mode:
-he.encode('\x01', {
- 'strict': true
-});
-// → Parse error
-```
-
-#### `allowUnsafeSymbols`
-
-The default value for the `allowUnsafeSymbols` option is `false`. This means that characters that are unsafe for use in HTML content (`&`, `<`, `>`, `"`, `'`, and `` ` ``) will be encoded. When set to `true`, only non-ASCII characters will be encoded. If the `encodeEverything` option is set to `true`, this option will be ignored.
-
-```js
-he.encode('foo © and & ampersand', {
- 'allowUnsafeSymbols': true
-});
-// → 'foo © and & ampersand'
-```
-
-#### Overriding default `encode` options globally
-
-The global default setting can be overridden by modifying the `he.encode.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting.
-
-```js
-// Read the global default setting:
-he.encode.options.useNamedReferences;
-// → `false` by default
-
-// Override the global default setting:
-he.encode.options.useNamedReferences = true;
-
-// Using the global default setting, which is now `true`:
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-### `he.decode(html, options)`
-
-This function takes a string of HTML and decodes any named and numerical character references in it using [the algorithm described in section 12.2.4.69 of the HTML spec](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references).
-
-```js
-he.decode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-The `options` object is optional. It recognizes the following properties:
-
-#### `isAttributeValue`
-
-The default value for the `isAttributeValue` option is `false`. This means that `decode()` will decode the string as if it were used in [a text context in an HTML document](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#data-state). HTML has different rules for [parsing character references in attribute values](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#character-reference-in-attribute-value-state) — set this option to `true` to treat the input string as if it were used as an attribute value.
-
-```js
-// Using the global default setting (defaults to `false`, i.e. HTML text context):
-he.decode('foo&bar');
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly assume an HTML text context:
-he.decode('foo&bar', {
- 'isAttributeValue': false
-});
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly assume an HTML attribute value context:
-he.decode('foo&bar', {
- 'isAttributeValue': true
-});
-// → 'foo&bar'
-```
-
-#### `strict`
-
-The default value for the `strict` option is `false`. This means that `decode()` will decode any HTML text content you feed it, even if it contains any entities that cause [parse errors](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators.
-
-```js
-// Using the global default setting (defaults to `false`, i.e. error-tolerant mode):
-he.decode('foo&bar');
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly enable error-tolerant mode:
-he.decode('foo&bar', {
- 'strict': false
-});
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly enable strict mode:
-he.decode('foo&bar', {
- 'strict': true
-});
-// → Parse error
-```
-
-#### Overriding default `decode` options globally
-
-The global default settings for the `decode` function can be overridden by modifying the `he.decode.options` object. This saves you from passing in an `options` object for every call to `decode` if you want to use a non-default setting.
-
-```js
-// Read the global default setting:
-he.decode.options.isAttributeValue;
-// → `false` by default
-
-// Override the global default setting:
-he.decode.options.isAttributeValue = true;
-
-// Using the global default setting, which is now `true`:
-he.decode('foo&bar');
-// → 'foo&bar'
-```
-
-### `he.escape(text)`
-
-This function takes a string of text and escapes it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, `'`, and `` ` ``.
-
-```js
-he.escape(' ');
-// → '<img src='x' onerror="prompt(1)">'
-```
-
-### `he.unescape(html, options)`
-
-`he.unescape` is an alias for `he.decode`. It takes a string of HTML and decodes any named and numerical character references in it.
-
-### Using the `he` binary
-
-To use the `he` binary in your shell, simply install _he_ globally using npm:
-
-```bash
-npm install -g he
-```
-
-After that you will be able to encode/decode HTML entities from the command line:
-
-```bash
-$ he --encode 'föo ♥ bår 𝌆 baz'
-föo ♥ bår 𝌆 baz
-
-$ he --encode --use-named-refs 'föo ♥ bår 𝌆 baz'
-föo ♥ bår 𝌆 baz
-
-$ he --decode 'föo ♥ bår 𝌆 baz'
-föo ♥ bår 𝌆 baz
-```
-
-Read a local text file, encode it for use in an HTML text context, and save the result to a new file:
-
-```bash
-$ he --encode < foo.txt > foo-escaped.html
-```
-
-Or do the same with an online text file:
-
-```bash
-$ curl -sL "http://git.io/HnfEaw" | he --encode > escaped.html
-```
-
-Or, the opposite — read a local file containing a snippet of HTML in a text context, decode it back to plain text, and save the result to a new file:
-
-```bash
-$ he --decode < foo-escaped.html > foo.txt
-```
-
-Or do the same with an online HTML snippet:
-
-```bash
-$ curl -sL "http://git.io/HnfEaw" | he --decode > decoded.txt
-```
-
-See `he --help` for the full list of options.
-
-## Support
-
-he has been tested in at least Chrome 27-29, Firefox 3-22, Safari 4-6, Opera 10-12, IE 6-10, Node.js v0.10.0, Narwhal 0.3.2, RingoJS 0.8-0.9, PhantomJS 1.9.0, and Rhino 1.7RC4.
-
-## Unit tests & code coverage
-
-After cloning this repository, run `npm install` to install the dependencies needed for he development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
-
-Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`.
-
-To generate the code coverage report, use `grunt cover`.
-
-## Acknowledgements
-
-Thanks to [Simon Pieters](http://simon.html5.org/) ([@zcorpan](https://twitter.com/zcorpan)) for the many suggestions.
-
-## Author
-
-| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|
-| [Mathias Bynens](https://mathiasbynens.be/) |
-
-## License
-
-_he_ is available under the [MIT](http://mths.be/mit) license.
diff --git a/topics/00. Course-introduction/slides/node_modules/he/bin/he b/topics/00. Course-introduction/slides/node_modules/he/bin/he
deleted file mode 100755
index 234710c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/he/bin/he
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env node
-(function() {
-
- var fs = require('fs');
- var he = require('../he.js');
- var strings = process.argv.splice(2);
- var stdin = process.stdin;
- var data;
- var timeout;
- var action;
- var options = {};
- var log = console.log;
-
- var main = function() {
- var option = strings[0];
- var count = 0;
-
- if (/^(?:-h|--help|undefined)$/.test(option)) {
- log(
- 'he v%s - http://mths.be/he',
- he.version
- );
- log([
- '\nUsage:\n',
- '\the [--escape] string',
- '\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] string',
- '\the [--decode] [--attribute] [--strict] string',
- '\the [-v | --version]',
- '\the [-h | --help]',
- '\nExamples:\n',
- '\the --escape \\ ',
- '\techo \'© 𝌆\' | he --decode'
- ].join('\n'));
- return process.exit(1);
- }
-
- if (/^(?:-v|--version)$/.test(option)) {
- log('v%s', he.version);
- return process.exit(1);
- }
-
- strings.forEach(function(string) {
- // Process options
- if (string == '--escape') {
- action = 'escape';
- return;
- }
- if (string == '--encode') {
- action = 'encode';
- return;
- }
- if (string == '--use-named-refs') {
- action = 'encode';
- options.useNamedReferences = true;
- return;
- }
- if (string == '--everything') {
- action = 'encode';
- options.encodeEverything = true;
- return;
- }
- if (string == '--allow-unsafe') {
- action = 'encode';
- options.allowUnsafeSymbols = true;
- return;
- }
- if (string == '--decode') {
- action = 'decode';
- return;
- }
- if (string == '--attribute') {
- action = 'decode';
- options.isAttributeValue = true;
- return;
- }
- if (string == '--strict') {
- action = 'decode';
- options.strict = true;
- return;
- }
- // Process string(s)
- var result;
- if (!action) {
- log('Error: he requires at least one option and a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- try {
- result = he[action](string, options);
- log(result);
- count++;
- } catch(error) {
- log(error.message + '\n');
- log('Error: failed to %s.', action);
- log('If you think this is a bug in he, please report it:');
- log('https://github.com/mathiasbynens/he/issues/new');
- log(
- '\nStack trace using he@%s:\n',
- he.version
- );
- log(error.stack);
- return process.exit(1);
- }
- });
- if (!count) {
- log('Error: he requires a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- // Return with exit status 0 outside of the `forEach` loop, in case
- // multiple strings were passed in.
- return process.exit(0);
- };
-
- if (stdin.isTTY) {
- // handle shell arguments
- main();
- } else {
- // Either the script is called from within a non-TTY context, or `stdin`
- // content is being piped in.
- if (!process.stdout.isTTY) {
- // The script was called from a non-TTY context. This is a rather uncommon
- // use case we don’t actively support. However, we don’t want the script
- // to wait forever in such cases, so…
- timeout = setTimeout(function() {
- // …if no piped data arrived after a whole minute, handle shell
- // arguments instead.
- main();
- }, 60000);
- }
- data = '';
- stdin.on('data', function(chunk) {
- clearTimeout(timeout);
- data += chunk;
- });
- stdin.on('end', function() {
- strings.push(data.trim());
- main();
- });
- stdin.resume();
- }
-
-}());
diff --git a/topics/00. Course-introduction/slides/node_modules/he/he.js b/topics/00. Course-introduction/slides/node_modules/he/he.js
deleted file mode 100644
index 74b9fe1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/he/he.js
+++ /dev/null
@@ -1,329 +0,0 @@
-/*! http://mths.be/he v0.5.0 by @mathias | MIT license */
-;(function(root) {
-
- // Detect free variables `exports`.
- var freeExports = typeof exports == 'object' && exports;
-
- // Detect free variable `module`.
- var freeModule = typeof module == 'object' && module &&
- module.exports == freeExports && module;
-
- // Detect free variable `global`, from Node.js or Browserified code,
- // and use it as `root`.
- var freeGlobal = typeof global == 'object' && global;
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
- root = freeGlobal;
- }
-
- /*--------------------------------------------------------------------------*/
-
- // All astral symbols.
- var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
- // All ASCII symbols (not just printable ASCII) except those listed in the
- // first column of the overrides table.
- // http://whatwg.org/html/tokenization.html#table-charref-overrides
- var regexAsciiWhitelist = /[\x01-\x7F]/g;
- // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
- // code points listed in the first column of the overrides table on
- // http://whatwg.org/html/tokenization.html#table-charref-overrides.
- var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
-
- var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
- var encodeMap = {'\xC1':'Aacute','\xE1':'aacute','\u0102':'Abreve','\u0103':'abreve','\u223E':'ac','\u223F':'acd','\u223E\u0333':'acE','\xC2':'Acirc','\xE2':'acirc','\xB4':'acute','\u0410':'Acy','\u0430':'acy','\xC6':'AElig','\xE6':'aelig','\u2061':'af','\uD835\uDD04':'Afr','\uD835\uDD1E':'afr','\xC0':'Agrave','\xE0':'agrave','\u2135':'aleph','\u0391':'Alpha','\u03B1':'alpha','\u0100':'Amacr','\u0101':'amacr','\u2A3F':'amalg','&':'amp','\u2A55':'andand','\u2A53':'And','\u2227':'and','\u2A5C':'andd','\u2A58':'andslope','\u2A5A':'andv','\u2220':'ang','\u29A4':'ange','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u2221':'angmsd','\u221F':'angrt','\u22BE':'angrtvb','\u299D':'angrtvbd','\u2222':'angsph','\xC5':'angst','\u237C':'angzarr','\u0104':'Aogon','\u0105':'aogon','\uD835\uDD38':'Aopf','\uD835\uDD52':'aopf','\u2A6F':'apacir','\u2248':'ap','\u2A70':'apE','\u224A':'ape','\u224B':'apid','\'':'apos','\xE5':'aring','\uD835\uDC9C':'Ascr','\uD835\uDCB6':'ascr','\u2254':'colone','*':'ast','\u224D':'CupCap','\xC3':'Atilde','\xE3':'atilde','\xC4':'Auml','\xE4':'auml','\u2233':'awconint','\u2A11':'awint','\u224C':'bcong','\u03F6':'bepsi','\u2035':'bprime','\u223D':'bsim','\u22CD':'bsime','\u2216':'setmn','\u2AE7':'Barv','\u22BD':'barvee','\u2305':'barwed','\u2306':'Barwed','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u0411':'Bcy','\u0431':'bcy','\u201E':'bdquo','\u2235':'becaus','\u29B0':'bemptyv','\u212C':'Bscr','\u0392':'Beta','\u03B2':'beta','\u2136':'beth','\u226C':'twixt','\uD835\uDD05':'Bfr','\uD835\uDD1F':'bfr','\u22C2':'xcap','\u25EF':'xcirc','\u22C3':'xcup','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A06':'xsqcup','\u2605':'starf','\u25BD':'xdtri','\u25B3':'xutri','\u2A04':'xuplus','\u22C1':'Vee','\u22C0':'Wedge','\u290D':'rbarr','\u29EB':'lozf','\u25AA':'squf','\u25B4':'utrif','\u25BE':'dtrif','\u25C2':'ltrif','\u25B8':'rtrif','\u2423':'blank','\u2592':'blk12','\u2591':'blk14','\u2593':'blk34','\u2588':'block','=\u20E5':'bne','\u2261\u20E5':'bnequiv','\u2AED':'bNot','\u2310':'bnot','\uD835\uDD39':'Bopf','\uD835\uDD53':'bopf','\u22A5':'bot','\u22C8':'bowtie','\u29C9':'boxbox','\u2510':'boxdl','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u250C':'boxdr','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2500':'boxh','\u2550':'boxH','\u252C':'boxhd','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2534':'boxhu','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u229F':'minusb','\u229E':'plusb','\u22A0':'timesb','\u2518':'boxul','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u2514':'boxur','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u2502':'boxv','\u2551':'boxV','\u253C':'boxvh','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2524':'boxvl','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u251C':'boxvr','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u02D8':'breve','\xA6':'brvbar','\uD835\uDCB7':'bscr','\u204F':'bsemi','\u29C5':'bsolb','\\':'bsol','\u27C8':'bsolhsub','\u2022':'bull','\u224E':'bump','\u2AAE':'bumpE','\u224F':'bumpe','\u0106':'Cacute','\u0107':'cacute','\u2A44':'capand','\u2A49':'capbrcup','\u2A4B':'capcap','\u2229':'cap','\u22D2':'Cap','\u2A47':'capcup','\u2A40':'capdot','\u2145':'DD','\u2229\uFE00':'caps','\u2041':'caret','\u02C7':'caron','\u212D':'Cfr','\u2A4D':'ccaps','\u010C':'Ccaron','\u010D':'ccaron','\xC7':'Ccedil','\xE7':'ccedil','\u0108':'Ccirc','\u0109':'ccirc','\u2230':'Cconint','\u2A4C':'ccups','\u2A50':'ccupssm','\u010A':'Cdot','\u010B':'cdot','\xB8':'cedil','\u29B2':'cemptyv','\xA2':'cent','\xB7':'middot','\uD835\uDD20':'cfr','\u0427':'CHcy','\u0447':'chcy','\u2713':'check','\u03A7':'Chi','\u03C7':'chi','\u02C6':'circ','\u2257':'cire','\u21BA':'olarr','\u21BB':'orarr','\u229B':'oast','\u229A':'ocir','\u229D':'odash','\u2299':'odot','\xAE':'reg','\u24C8':'oS','\u2296':'ominus','\u2295':'oplus','\u2297':'otimes','\u25CB':'cir','\u29C3':'cirE','\u2A10':'cirfnint','\u2AEF':'cirmid','\u29C2':'cirscir','\u2232':'cwconint','\u201D':'rdquo','\u2019':'rsquo','\u2663':'clubs',':':'colon','\u2237':'Colon','\u2A74':'Colone',',':'comma','@':'commat','\u2201':'comp','\u2218':'compfn','\u2102':'Copf','\u2245':'cong','\u2A6D':'congdot','\u2261':'equiv','\u222E':'oint','\u222F':'Conint','\uD835\uDD54':'copf','\u2210':'coprod','\xA9':'copy','\u2117':'copysr','\u21B5':'crarr','\u2717':'cross','\u2A2F':'Cross','\uD835\uDC9E':'Cscr','\uD835\uDCB8':'cscr','\u2ACF':'csub','\u2AD1':'csube','\u2AD0':'csup','\u2AD2':'csupe','\u22EF':'ctdot','\u2938':'cudarrl','\u2935':'cudarrr','\u22DE':'cuepr','\u22DF':'cuesc','\u21B6':'cularr','\u293D':'cularrp','\u2A48':'cupbrcap','\u2A46':'cupcap','\u222A':'cup','\u22D3':'Cup','\u2A4A':'cupcup','\u228D':'cupdot','\u2A45':'cupor','\u222A\uFE00':'cups','\u21B7':'curarr','\u293C':'curarrm','\u22CE':'cuvee','\u22CF':'cuwed','\xA4':'curren','\u2231':'cwint','\u232D':'cylcty','\u2020':'dagger','\u2021':'Dagger','\u2138':'daleth','\u2193':'darr','\u21A1':'Darr','\u21D3':'dArr','\u2010':'dash','\u2AE4':'Dashv','\u22A3':'dashv','\u290F':'rBarr','\u02DD':'dblac','\u010E':'Dcaron','\u010F':'dcaron','\u0414':'Dcy','\u0434':'dcy','\u21CA':'ddarr','\u2146':'dd','\u2911':'DDotrahd','\u2A77':'eDDot','\xB0':'deg','\u2207':'Del','\u0394':'Delta','\u03B4':'delta','\u29B1':'demptyv','\u297F':'dfisht','\uD835\uDD07':'Dfr','\uD835\uDD21':'dfr','\u2965':'dHar','\u21C3':'dharl','\u21C2':'dharr','\u02D9':'dot','`':'grave','\u02DC':'tilde','\u22C4':'diam','\u2666':'diams','\xA8':'die','\u03DD':'gammad','\u22F2':'disin','\xF7':'div','\u22C7':'divonx','\u0402':'DJcy','\u0452':'djcy','\u231E':'dlcorn','\u230D':'dlcrop','$':'dollar','\uD835\uDD3B':'Dopf','\uD835\uDD55':'dopf','\u20DC':'DotDot','\u2250':'doteq','\u2251':'eDot','\u2238':'minusd','\u2214':'plusdo','\u22A1':'sdotb','\u21D0':'lArr','\u21D4':'iff','\u27F8':'xlArr','\u27FA':'xhArr','\u27F9':'xrArr','\u21D2':'rArr','\u22A8':'vDash','\u21D1':'uArr','\u21D5':'vArr','\u2225':'par','\u2913':'DownArrowBar','\u21F5':'duarr','\u0311':'DownBreve','\u2950':'DownLeftRightVector','\u295E':'DownLeftTeeVector','\u2956':'DownLeftVectorBar','\u21BD':'lhard','\u295F':'DownRightTeeVector','\u2957':'DownRightVectorBar','\u21C1':'rhard','\u21A7':'mapstodown','\u22A4':'top','\u2910':'RBarr','\u231F':'drcorn','\u230C':'drcrop','\uD835\uDC9F':'Dscr','\uD835\uDCB9':'dscr','\u0405':'DScy','\u0455':'dscy','\u29F6':'dsol','\u0110':'Dstrok','\u0111':'dstrok','\u22F1':'dtdot','\u25BF':'dtri','\u296F':'duhar','\u29A6':'dwangle','\u040F':'DZcy','\u045F':'dzcy','\u27FF':'dzigrarr','\xC9':'Eacute','\xE9':'eacute','\u2A6E':'easter','\u011A':'Ecaron','\u011B':'ecaron','\xCA':'Ecirc','\xEA':'ecirc','\u2256':'ecir','\u2255':'ecolon','\u042D':'Ecy','\u044D':'ecy','\u0116':'Edot','\u0117':'edot','\u2147':'ee','\u2252':'efDot','\uD835\uDD08':'Efr','\uD835\uDD22':'efr','\u2A9A':'eg','\xC8':'Egrave','\xE8':'egrave','\u2A96':'egs','\u2A98':'egsdot','\u2A99':'el','\u2208':'in','\u23E7':'elinters','\u2113':'ell','\u2A95':'els','\u2A97':'elsdot','\u0112':'Emacr','\u0113':'emacr','\u2205':'empty','\u25FB':'EmptySmallSquare','\u25AB':'EmptyVerySmallSquare','\u2004':'emsp13','\u2005':'emsp14','\u2003':'emsp','\u014A':'ENG','\u014B':'eng','\u2002':'ensp','\u0118':'Eogon','\u0119':'eogon','\uD835\uDD3C':'Eopf','\uD835\uDD56':'eopf','\u22D5':'epar','\u29E3':'eparsl','\u2A71':'eplus','\u03B5':'epsi','\u0395':'Epsilon','\u03F5':'epsiv','\u2242':'esim','\u2A75':'Equal','=':'equals','\u225F':'equest','\u21CC':'rlhar','\u2A78':'equivDD','\u29E5':'eqvparsl','\u2971':'erarr','\u2253':'erDot','\u212F':'escr','\u2130':'Escr','\u2A73':'Esim','\u0397':'Eta','\u03B7':'eta','\xD0':'ETH','\xF0':'eth','\xCB':'Euml','\xEB':'euml','\u20AC':'euro','!':'excl','\u2203':'exist','\u0424':'Fcy','\u0444':'fcy','\u2640':'female','\uFB03':'ffilig','\uFB00':'fflig','\uFB04':'ffllig','\uD835\uDD09':'Ffr','\uD835\uDD23':'ffr','\uFB01':'filig','\u25FC':'FilledSmallSquare','fj':'fjlig','\u266D':'flat','\uFB02':'fllig','\u25B1':'fltns','\u0192':'fnof','\uD835\uDD3D':'Fopf','\uD835\uDD57':'fopf','\u2200':'forall','\u22D4':'fork','\u2AD9':'forkv','\u2131':'Fscr','\u2A0D':'fpartint','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\u2154':'frac23','\u2156':'frac25','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\u2044':'frasl','\u2322':'frown','\uD835\uDCBB':'fscr','\u01F5':'gacute','\u0393':'Gamma','\u03B3':'gamma','\u03DC':'Gammad','\u2A86':'gap','\u011E':'Gbreve','\u011F':'gbreve','\u0122':'Gcedil','\u011C':'Gcirc','\u011D':'gcirc','\u0413':'Gcy','\u0433':'gcy','\u0120':'Gdot','\u0121':'gdot','\u2265':'ge','\u2267':'gE','\u2A8C':'gEl','\u22DB':'gel','\u2A7E':'ges','\u2AA9':'gescc','\u2A80':'gesdot','\u2A82':'gesdoto','\u2A84':'gesdotol','\u22DB\uFE00':'gesl','\u2A94':'gesles','\uD835\uDD0A':'Gfr','\uD835\uDD24':'gfr','\u226B':'gg','\u22D9':'Gg','\u2137':'gimel','\u0403':'GJcy','\u0453':'gjcy','\u2AA5':'gla','\u2277':'gl','\u2A92':'glE','\u2AA4':'glj','\u2A8A':'gnap','\u2A88':'gne','\u2269':'gnE','\u22E7':'gnsim','\uD835\uDD3E':'Gopf','\uD835\uDD58':'gopf','\u2AA2':'GreaterGreater','\u2273':'gsim','\uD835\uDCA2':'Gscr','\u210A':'gscr','\u2A8E':'gsime','\u2A90':'gsiml','\u2AA7':'gtcc','\u2A7A':'gtcir','>':'gt','\u22D7':'gtdot','\u2995':'gtlPar','\u2A7C':'gtquest','\u2978':'gtrarr','\u2269\uFE00':'gvnE','\u200A':'hairsp','\u210B':'Hscr','\u042A':'HARDcy','\u044A':'hardcy','\u2948':'harrcir','\u2194':'harr','\u21AD':'harrw','^':'Hat','\u210F':'hbar','\u0124':'Hcirc','\u0125':'hcirc','\u2665':'hearts','\u2026':'mldr','\u22B9':'hercon','\uD835\uDD25':'hfr','\u210C':'Hfr','\u2925':'searhk','\u2926':'swarhk','\u21FF':'hoarr','\u223B':'homtht','\u21A9':'larrhk','\u21AA':'rarrhk','\uD835\uDD59':'hopf','\u210D':'Hopf','\u2015':'horbar','\uD835\uDCBD':'hscr','\u0126':'Hstrok','\u0127':'hstrok','\u2043':'hybull','\xCD':'Iacute','\xED':'iacute','\u2063':'ic','\xCE':'Icirc','\xEE':'icirc','\u0418':'Icy','\u0438':'icy','\u0130':'Idot','\u0415':'IEcy','\u0435':'iecy','\xA1':'iexcl','\uD835\uDD26':'ifr','\u2111':'Im','\xCC':'Igrave','\xEC':'igrave','\u2148':'ii','\u2A0C':'qint','\u222D':'tint','\u29DC':'iinfin','\u2129':'iiota','\u0132':'IJlig','\u0133':'ijlig','\u012A':'Imacr','\u012B':'imacr','\u2110':'Iscr','\u0131':'imath','\u22B7':'imof','\u01B5':'imped','\u2105':'incare','\u221E':'infin','\u29DD':'infintie','\u22BA':'intcal','\u222B':'int','\u222C':'Int','\u2124':'Zopf','\u2A17':'intlarhk','\u2A3C':'iprod','\u2062':'it','\u0401':'IOcy','\u0451':'iocy','\u012E':'Iogon','\u012F':'iogon','\uD835\uDD40':'Iopf','\uD835\uDD5A':'iopf','\u0399':'Iota','\u03B9':'iota','\xBF':'iquest','\uD835\uDCBE':'iscr','\u22F5':'isindot','\u22F9':'isinE','\u22F4':'isins','\u22F3':'isinsv','\u0128':'Itilde','\u0129':'itilde','\u0406':'Iukcy','\u0456':'iukcy','\xCF':'Iuml','\xEF':'iuml','\u0134':'Jcirc','\u0135':'jcirc','\u0419':'Jcy','\u0439':'jcy','\uD835\uDD0D':'Jfr','\uD835\uDD27':'jfr','\u0237':'jmath','\uD835\uDD41':'Jopf','\uD835\uDD5B':'jopf','\uD835\uDCA5':'Jscr','\uD835\uDCBF':'jscr','\u0408':'Jsercy','\u0458':'jsercy','\u0404':'Jukcy','\u0454':'jukcy','\u039A':'Kappa','\u03BA':'kappa','\u03F0':'kappav','\u0136':'Kcedil','\u0137':'kcedil','\u041A':'Kcy','\u043A':'kcy','\uD835\uDD0E':'Kfr','\uD835\uDD28':'kfr','\u0138':'kgreen','\u0425':'KHcy','\u0445':'khcy','\u040C':'KJcy','\u045C':'kjcy','\uD835\uDD42':'Kopf','\uD835\uDD5C':'kopf','\uD835\uDCA6':'Kscr','\uD835\uDCC0':'kscr','\u21DA':'lAarr','\u0139':'Lacute','\u013A':'lacute','\u29B4':'laemptyv','\u2112':'Lscr','\u039B':'Lambda','\u03BB':'lambda','\u27E8':'lang','\u27EA':'Lang','\u2991':'langd','\u2A85':'lap','\xAB':'laquo','\u21E4':'larrb','\u291F':'larrbfs','\u2190':'larr','\u219E':'Larr','\u291D':'larrfs','\u21AB':'larrlp','\u2939':'larrpl','\u2973':'larrsim','\u21A2':'larrtl','\u2919':'latail','\u291B':'lAtail','\u2AAB':'lat','\u2AAD':'late','\u2AAD\uFE00':'lates','\u290C':'lbarr','\u290E':'lBarr','\u2772':'lbbrk','{':'lcub','[':'lsqb','\u298B':'lbrke','\u298F':'lbrksld','\u298D':'lbrkslu','\u013D':'Lcaron','\u013E':'lcaron','\u013B':'Lcedil','\u013C':'lcedil','\u2308':'lceil','\u041B':'Lcy','\u043B':'lcy','\u2936':'ldca','\u201C':'ldquo','\u2967':'ldrdhar','\u294B':'ldrushar','\u21B2':'ldsh','\u2264':'le','\u2266':'lE','\u21C6':'lrarr','\u27E6':'lobrk','\u2961':'LeftDownTeeVector','\u2959':'LeftDownVectorBar','\u230A':'lfloor','\u21BC':'lharu','\u21C7':'llarr','\u21CB':'lrhar','\u294E':'LeftRightVector','\u21A4':'mapstoleft','\u295A':'LeftTeeVector','\u22CB':'lthree','\u29CF':'LeftTriangleBar','\u22B2':'vltri','\u22B4':'ltrie','\u2951':'LeftUpDownVector','\u2960':'LeftUpTeeVector','\u2958':'LeftUpVectorBar','\u21BF':'uharl','\u2952':'LeftVectorBar','\u2A8B':'lEg','\u22DA':'leg','\u2A7D':'les','\u2AA8':'lescc','\u2A7F':'lesdot','\u2A81':'lesdoto','\u2A83':'lesdotor','\u22DA\uFE00':'lesg','\u2A93':'lesges','\u22D6':'ltdot','\u2276':'lg','\u2AA1':'LessLess','\u2272':'lsim','\u297C':'lfisht','\uD835\uDD0F':'Lfr','\uD835\uDD29':'lfr','\u2A91':'lgE','\u2962':'lHar','\u296A':'lharul','\u2584':'lhblk','\u0409':'LJcy','\u0459':'ljcy','\u226A':'ll','\u22D8':'Ll','\u296B':'llhard','\u25FA':'lltri','\u013F':'Lmidot','\u0140':'lmidot','\u23B0':'lmoust','\u2A89':'lnap','\u2A87':'lne','\u2268':'lnE','\u22E6':'lnsim','\u27EC':'loang','\u21FD':'loarr','\u27F5':'xlarr','\u27F7':'xharr','\u27FC':'xmap','\u27F6':'xrarr','\u21AC':'rarrlp','\u2985':'lopar','\uD835\uDD43':'Lopf','\uD835\uDD5D':'lopf','\u2A2D':'loplus','\u2A34':'lotimes','\u2217':'lowast','_':'lowbar','\u2199':'swarr','\u2198':'searr','\u25CA':'loz','(':'lpar','\u2993':'lparlt','\u296D':'lrhard','\u200E':'lrm','\u22BF':'lrtri','\u2039':'lsaquo','\uD835\uDCC1':'lscr','\u21B0':'lsh','\u2A8D':'lsime','\u2A8F':'lsimg','\u2018':'lsquo','\u201A':'sbquo','\u0141':'Lstrok','\u0142':'lstrok','\u2AA6':'ltcc','\u2A79':'ltcir','<':'lt','\u22C9':'ltimes','\u2976':'ltlarr','\u2A7B':'ltquest','\u25C3':'ltri','\u2996':'ltrPar','\u294A':'lurdshar','\u2966':'luruhar','\u2268\uFE00':'lvnE','\xAF':'macr','\u2642':'male','\u2720':'malt','\u2905':'Map','\u21A6':'map','\u21A5':'mapstoup','\u25AE':'marker','\u2A29':'mcomma','\u041C':'Mcy','\u043C':'mcy','\u2014':'mdash','\u223A':'mDDot','\u205F':'MediumSpace','\u2133':'Mscr','\uD835\uDD10':'Mfr','\uD835\uDD2A':'mfr','\u2127':'mho','\xB5':'micro','\u2AF0':'midcir','\u2223':'mid','\u2212':'minus','\u2A2A':'minusdu','\u2213':'mp','\u2ADB':'mlcp','\u22A7':'models','\uD835\uDD44':'Mopf','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\u039C':'Mu','\u03BC':'mu','\u22B8':'mumap','\u0143':'Nacute','\u0144':'nacute','\u2220\u20D2':'nang','\u2249':'nap','\u2A70\u0338':'napE','\u224B\u0338':'napid','\u0149':'napos','\u266E':'natur','\u2115':'Nopf','\xA0':'nbsp','\u224E\u0338':'nbump','\u224F\u0338':'nbumpe','\u2A43':'ncap','\u0147':'Ncaron','\u0148':'ncaron','\u0145':'Ncedil','\u0146':'ncedil','\u2247':'ncong','\u2A6D\u0338':'ncongdot','\u2A42':'ncup','\u041D':'Ncy','\u043D':'ncy','\u2013':'ndash','\u2924':'nearhk','\u2197':'nearr','\u21D7':'neArr','\u2260':'ne','\u2250\u0338':'nedot','\u200B':'ZeroWidthSpace','\u2262':'nequiv','\u2928':'toea','\u2242\u0338':'nesim','\n':'NewLine','\u2204':'nexist','\uD835\uDD11':'Nfr','\uD835\uDD2B':'nfr','\u2267\u0338':'ngE','\u2271':'nge','\u2A7E\u0338':'nges','\u22D9\u0338':'nGg','\u2275':'ngsim','\u226B\u20D2':'nGt','\u226F':'ngt','\u226B\u0338':'nGtv','\u21AE':'nharr','\u21CE':'nhArr','\u2AF2':'nhpar','\u220B':'ni','\u22FC':'nis','\u22FA':'nisd','\u040A':'NJcy','\u045A':'njcy','\u219A':'nlarr','\u21CD':'nlArr','\u2025':'nldr','\u2266\u0338':'nlE','\u2270':'nle','\u2A7D\u0338':'nles','\u226E':'nlt','\u22D8\u0338':'nLl','\u2274':'nlsim','\u226A\u20D2':'nLt','\u22EA':'nltri','\u22EC':'nltrie','\u226A\u0338':'nLtv','\u2224':'nmid','\u2060':'NoBreak','\uD835\uDD5F':'nopf','\u2AEC':'Not','\xAC':'not','\u226D':'NotCupCap','\u2226':'npar','\u2209':'notin','\u2279':'ntgl','\u22F5\u0338':'notindot','\u22F9\u0338':'notinE','\u22F7':'notinvb','\u22F6':'notinvc','\u29CF\u0338':'NotLeftTriangleBar','\u2278':'ntlg','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA1\u0338':'NotNestedLessLess','\u220C':'notni','\u22FE':'notnivb','\u22FD':'notnivc','\u2280':'npr','\u2AAF\u0338':'npre','\u22E0':'nprcue','\u29D0\u0338':'NotRightTriangleBar','\u22EB':'nrtri','\u22ED':'nrtrie','\u228F\u0338':'NotSquareSubset','\u22E2':'nsqsube','\u2290\u0338':'NotSquareSuperset','\u22E3':'nsqsupe','\u2282\u20D2':'vnsub','\u2288':'nsube','\u2281':'nsc','\u2AB0\u0338':'nsce','\u22E1':'nsccue','\u227F\u0338':'NotSucceedsTilde','\u2283\u20D2':'vnsup','\u2289':'nsupe','\u2241':'nsim','\u2244':'nsime','\u2AFD\u20E5':'nparsl','\u2202\u0338':'npart','\u2A14':'npolint','\u2933\u0338':'nrarrc','\u219B':'nrarr','\u21CF':'nrArr','\u219D\u0338':'nrarrw','\uD835\uDCA9':'Nscr','\uD835\uDCC3':'nscr','\u2284':'nsub','\u2AC5\u0338':'nsubE','\u2285':'nsup','\u2AC6\u0338':'nsupE','\xD1':'Ntilde','\xF1':'ntilde','\u039D':'Nu','\u03BD':'nu','#':'num','\u2116':'numero','\u2007':'numsp','\u224D\u20D2':'nvap','\u22AC':'nvdash','\u22AD':'nvDash','\u22AE':'nVdash','\u22AF':'nVDash','\u2265\u20D2':'nvge','>\u20D2':'nvgt','\u2904':'nvHarr','\u29DE':'nvinfin','\u2902':'nvlArr','\u2264\u20D2':'nvle','<\u20D2':'nvlt','\u22B4\u20D2':'nvltrie','\u2903':'nvrArr','\u22B5\u20D2':'nvrtrie','\u223C\u20D2':'nvsim','\u2923':'nwarhk','\u2196':'nwarr','\u21D6':'nwArr','\u2927':'nwnear','\xD3':'Oacute','\xF3':'oacute','\xD4':'Ocirc','\xF4':'ocirc','\u041E':'Ocy','\u043E':'ocy','\u0150':'Odblac','\u0151':'odblac','\u2A38':'odiv','\u29BC':'odsold','\u0152':'OElig','\u0153':'oelig','\u29BF':'ofcir','\uD835\uDD12':'Ofr','\uD835\uDD2C':'ofr','\u02DB':'ogon','\xD2':'Ograve','\xF2':'ograve','\u29C1':'ogt','\u29B5':'ohbar','\u03A9':'ohm','\u29BE':'olcir','\u29BB':'olcross','\u203E':'oline','\u29C0':'olt','\u014C':'Omacr','\u014D':'omacr','\u03C9':'omega','\u039F':'Omicron','\u03BF':'omicron','\u29B6':'omid','\uD835\uDD46':'Oopf','\uD835\uDD60':'oopf','\u29B7':'opar','\u29B9':'operp','\u2A54':'Or','\u2228':'or','\u2A5D':'ord','\u2134':'oscr','\xAA':'ordf','\xBA':'ordm','\u22B6':'origof','\u2A56':'oror','\u2A57':'orslope','\u2A5B':'orv','\uD835\uDCAA':'Oscr','\xD8':'Oslash','\xF8':'oslash','\u2298':'osol','\xD5':'Otilde','\xF5':'otilde','\u2A36':'otimesas','\u2A37':'Otimes','\xD6':'Ouml','\xF6':'ouml','\u233D':'ovbar','\u23DE':'OverBrace','\u23B4':'tbrk','\u23DC':'OverParenthesis','\xB6':'para','\u2AF3':'parsim','\u2AFD':'parsl','\u2202':'part','\u041F':'Pcy','\u043F':'pcy','%':'percnt','.':'period','\u2030':'permil','\u2031':'pertenk','\uD835\uDD13':'Pfr','\uD835\uDD2D':'pfr','\u03A6':'Phi','\u03C6':'phi','\u03D5':'phiv','\u260E':'phone','\u03A0':'Pi','\u03C0':'pi','\u03D6':'piv','\u210E':'planckh','\u2A23':'plusacir','\u2A22':'pluscir','+':'plus','\u2A25':'plusdu','\u2A72':'pluse','\xB1':'pm','\u2A26':'plussim','\u2A27':'plustwo','\u2A15':'pointint','\uD835\uDD61':'popf','\u2119':'Popf','\xA3':'pound','\u2AB7':'prap','\u2ABB':'Pr','\u227A':'pr','\u227C':'prcue','\u2AAF':'pre','\u227E':'prsim','\u2AB9':'prnap','\u2AB5':'prnE','\u22E8':'prnsim','\u2AB3':'prE','\u2032':'prime','\u2033':'Prime','\u220F':'prod','\u232E':'profalar','\u2312':'profline','\u2313':'profsurf','\u221D':'prop','\u22B0':'prurel','\uD835\uDCAB':'Pscr','\uD835\uDCC5':'pscr','\u03A8':'Psi','\u03C8':'psi','\u2008':'puncsp','\uD835\uDD14':'Qfr','\uD835\uDD2E':'qfr','\uD835\uDD62':'qopf','\u211A':'Qopf','\u2057':'qprime','\uD835\uDCAC':'Qscr','\uD835\uDCC6':'qscr','\u2A16':'quatint','?':'quest','"':'quot','\u21DB':'rAarr','\u223D\u0331':'race','\u0154':'Racute','\u0155':'racute','\u221A':'Sqrt','\u29B3':'raemptyv','\u27E9':'rang','\u27EB':'Rang','\u2992':'rangd','\u29A5':'range','\xBB':'raquo','\u2975':'rarrap','\u21E5':'rarrb','\u2920':'rarrbfs','\u2933':'rarrc','\u2192':'rarr','\u21A0':'Rarr','\u291E':'rarrfs','\u2945':'rarrpl','\u2974':'rarrsim','\u2916':'Rarrtl','\u21A3':'rarrtl','\u219D':'rarrw','\u291A':'ratail','\u291C':'rAtail','\u2236':'ratio','\u2773':'rbbrk','}':'rcub',']':'rsqb','\u298C':'rbrke','\u298E':'rbrksld','\u2990':'rbrkslu','\u0158':'Rcaron','\u0159':'rcaron','\u0156':'Rcedil','\u0157':'rcedil','\u2309':'rceil','\u0420':'Rcy','\u0440':'rcy','\u2937':'rdca','\u2969':'rdldhar','\u21B3':'rdsh','\u211C':'Re','\u211B':'Rscr','\u211D':'Ropf','\u25AD':'rect','\u297D':'rfisht','\u230B':'rfloor','\uD835\uDD2F':'rfr','\u2964':'rHar','\u21C0':'rharu','\u296C':'rharul','\u03A1':'Rho','\u03C1':'rho','\u03F1':'rhov','\u21C4':'rlarr','\u27E7':'robrk','\u295D':'RightDownTeeVector','\u2955':'RightDownVectorBar','\u21C9':'rrarr','\u22A2':'vdash','\u295B':'RightTeeVector','\u22CC':'rthree','\u29D0':'RightTriangleBar','\u22B3':'vrtri','\u22B5':'rtrie','\u294F':'RightUpDownVector','\u295C':'RightUpTeeVector','\u2954':'RightUpVectorBar','\u21BE':'uharr','\u2953':'RightVectorBar','\u02DA':'ring','\u200F':'rlm','\u23B1':'rmoust','\u2AEE':'rnmid','\u27ED':'roang','\u21FE':'roarr','\u2986':'ropar','\uD835\uDD63':'ropf','\u2A2E':'roplus','\u2A35':'rotimes','\u2970':'RoundImplies',')':'rpar','\u2994':'rpargt','\u2A12':'rppolint','\u203A':'rsaquo','\uD835\uDCC7':'rscr','\u21B1':'rsh','\u22CA':'rtimes','\u25B9':'rtri','\u29CE':'rtriltri','\u29F4':'RuleDelayed','\u2968':'ruluhar','\u211E':'rx','\u015A':'Sacute','\u015B':'sacute','\u2AB8':'scap','\u0160':'Scaron','\u0161':'scaron','\u2ABC':'Sc','\u227B':'sc','\u227D':'sccue','\u2AB0':'sce','\u2AB4':'scE','\u015E':'Scedil','\u015F':'scedil','\u015C':'Scirc','\u015D':'scirc','\u2ABA':'scnap','\u2AB6':'scnE','\u22E9':'scnsim','\u2A13':'scpolint','\u227F':'scsim','\u0421':'Scy','\u0441':'scy','\u22C5':'sdot','\u2A66':'sdote','\u21D8':'seArr','\xA7':'sect',';':'semi','\u2929':'tosa','\u2736':'sext','\uD835\uDD16':'Sfr','\uD835\uDD30':'sfr','\u266F':'sharp','\u0429':'SHCHcy','\u0449':'shchcy','\u0428':'SHcy','\u0448':'shcy','\u2191':'uarr','\xAD':'shy','\u03A3':'Sigma','\u03C3':'sigma','\u03C2':'sigmaf','\u223C':'sim','\u2A6A':'simdot','\u2243':'sime','\u2A9E':'simg','\u2AA0':'simgE','\u2A9D':'siml','\u2A9F':'simlE','\u2246':'simne','\u2A24':'simplus','\u2972':'simrarr','\u2A33':'smashp','\u29E4':'smeparsl','\u2323':'smile','\u2AAA':'smt','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u042C':'SOFTcy','\u044C':'softcy','\u233F':'solbar','\u29C4':'solb','/':'sol','\uD835\uDD4A':'Sopf','\uD835\uDD64':'sopf','\u2660':'spades','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u228F':'sqsub','\u2291':'sqsube','\u2290':'sqsup','\u2292':'sqsupe','\u25A1':'squ','\uD835\uDCAE':'Sscr','\uD835\uDCC8':'sscr','\u22C6':'Star','\u2606':'star','\u2282':'sub','\u22D0':'Sub','\u2ABD':'subdot','\u2AC5':'subE','\u2286':'sube','\u2AC3':'subedot','\u2AC1':'submult','\u2ACB':'subnE','\u228A':'subne','\u2ABF':'subplus','\u2979':'subrarr','\u2AC7':'subsim','\u2AD5':'subsub','\u2AD3':'subsup','\u2211':'sum','\u266A':'sung','\xB9':'sup1','\xB2':'sup2','\xB3':'sup3','\u2283':'sup','\u22D1':'Sup','\u2ABE':'supdot','\u2AD8':'supdsub','\u2AC6':'supE','\u2287':'supe','\u2AC4':'supedot','\u27C9':'suphsol','\u2AD7':'suphsub','\u297B':'suplarr','\u2AC2':'supmult','\u2ACC':'supnE','\u228B':'supne','\u2AC0':'supplus','\u2AC8':'supsim','\u2AD4':'supsub','\u2AD6':'supsup','\u21D9':'swArr','\u292A':'swnwar','\xDF':'szlig','\t':'Tab','\u2316':'target','\u03A4':'Tau','\u03C4':'tau','\u0164':'Tcaron','\u0165':'tcaron','\u0162':'Tcedil','\u0163':'tcedil','\u0422':'Tcy','\u0442':'tcy','\u20DB':'tdot','\u2315':'telrec','\uD835\uDD17':'Tfr','\uD835\uDD31':'tfr','\u2234':'there4','\u0398':'Theta','\u03B8':'theta','\u03D1':'thetav','\u205F\u200A':'ThickSpace','\u2009':'thinsp','\xDE':'THORN','\xFE':'thorn','\u2A31':'timesbar','\xD7':'times','\u2A30':'timesd','\u2336':'topbot','\u2AF1':'topcir','\uD835\uDD4B':'Topf','\uD835\uDD65':'topf','\u2ADA':'topfork','\u2034':'tprime','\u2122':'trade','\u25B5':'utri','\u225C':'trie','\u25EC':'tridot','\u2A3A':'triminus','\u2A39':'triplus','\u29CD':'trisb','\u2A3B':'tritime','\u23E2':'trpezium','\uD835\uDCAF':'Tscr','\uD835\uDCC9':'tscr','\u0426':'TScy','\u0446':'tscy','\u040B':'TSHcy','\u045B':'tshcy','\u0166':'Tstrok','\u0167':'tstrok','\xDA':'Uacute','\xFA':'uacute','\u219F':'Uarr','\u2949':'Uarrocir','\u040E':'Ubrcy','\u045E':'ubrcy','\u016C':'Ubreve','\u016D':'ubreve','\xDB':'Ucirc','\xFB':'ucirc','\u0423':'Ucy','\u0443':'ucy','\u21C5':'udarr','\u0170':'Udblac','\u0171':'udblac','\u296E':'udhar','\u297E':'ufisht','\uD835\uDD18':'Ufr','\uD835\uDD32':'ufr','\xD9':'Ugrave','\xF9':'ugrave','\u2963':'uHar','\u2580':'uhblk','\u231C':'ulcorn','\u230F':'ulcrop','\u25F8':'ultri','\u016A':'Umacr','\u016B':'umacr','\u23DF':'UnderBrace','\u23DD':'UnderParenthesis','\u228E':'uplus','\u0172':'Uogon','\u0173':'uogon','\uD835\uDD4C':'Uopf','\uD835\uDD66':'uopf','\u2912':'UpArrowBar','\u2195':'varr','\u03C5':'upsi','\u03D2':'Upsi','\u03A5':'Upsilon','\u21C8':'uuarr','\u231D':'urcorn','\u230E':'urcrop','\u016E':'Uring','\u016F':'uring','\u25F9':'urtri','\uD835\uDCB0':'Uscr','\uD835\uDCCA':'uscr','\u22F0':'utdot','\u0168':'Utilde','\u0169':'utilde','\xDC':'Uuml','\xFC':'uuml','\u29A7':'uwangle','\u299C':'vangrt','\u228A\uFE00':'vsubne','\u2ACB\uFE00':'vsubnE','\u228B\uFE00':'vsupne','\u2ACC\uFE00':'vsupnE','\u2AE8':'vBar','\u2AEB':'Vbar','\u2AE9':'vBarv','\u0412':'Vcy','\u0432':'vcy','\u22A9':'Vdash','\u22AB':'VDash','\u2AE6':'Vdashl','\u22BB':'veebar','\u225A':'veeeq','\u22EE':'vellip','|':'vert','\u2016':'Vert','\u2758':'VerticalSeparator','\u2240':'wr','\uD835\uDD19':'Vfr','\uD835\uDD33':'vfr','\uD835\uDD4D':'Vopf','\uD835\uDD67':'vopf','\uD835\uDCB1':'Vscr','\uD835\uDCCB':'vscr','\u22AA':'Vvdash','\u299A':'vzigzag','\u0174':'Wcirc','\u0175':'wcirc','\u2A5F':'wedbar','\u2259':'wedgeq','\u2118':'wp','\uD835\uDD1A':'Wfr','\uD835\uDD34':'wfr','\uD835\uDD4E':'Wopf','\uD835\uDD68':'wopf','\uD835\uDCB2':'Wscr','\uD835\uDCCC':'wscr','\uD835\uDD1B':'Xfr','\uD835\uDD35':'xfr','\u039E':'Xi','\u03BE':'xi','\u22FB':'xnis','\uD835\uDD4F':'Xopf','\uD835\uDD69':'xopf','\uD835\uDCB3':'Xscr','\uD835\uDCCD':'xscr','\xDD':'Yacute','\xFD':'yacute','\u042F':'YAcy','\u044F':'yacy','\u0176':'Ycirc','\u0177':'ycirc','\u042B':'Ycy','\u044B':'ycy','\xA5':'yen','\uD835\uDD1C':'Yfr','\uD835\uDD36':'yfr','\u0407':'YIcy','\u0457':'yicy','\uD835\uDD50':'Yopf','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDCCE':'yscr','\u042E':'YUcy','\u044E':'yucy','\xFF':'yuml','\u0178':'Yuml','\u0179':'Zacute','\u017A':'zacute','\u017D':'Zcaron','\u017E':'zcaron','\u0417':'Zcy','\u0437':'zcy','\u017B':'Zdot','\u017C':'zdot','\u2128':'Zfr','\u0396':'Zeta','\u03B6':'zeta','\uD835\uDD37':'zfr','\u0416':'ZHcy','\u0436':'zhcy','\u21DD':'zigrarr','\uD835\uDD6B':'zopf','\uD835\uDCB5':'Zscr','\uD835\uDCCF':'zscr','\u200D':'zwj','\u200C':'zwnj'};
-
- var regexEscape = /["&'<>`]/g;
- var escapeMap = {
- '"': '"',
- '&': '&',
- '\'': ''',
- '<': '<',
- // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
- // following is not strictly necessary unless it’s part of a tag or an
- // unquoted attribute value. We’re only escaping it to support those
- // situations, and for XML support.
- '>': '>',
- // In Internet Explorer ≤ 8, the backtick character can be used
- // to break out of (un)quoted attribute values or HTML comments.
- // See http://html5sec.org/#102, http://html5sec.org/#108, and
- // http://html5sec.org/#133.
- '`': '`'
- };
-
- var regexInvalidEntity = /(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
- var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
- var regexDecode = /([0-9]+)(;?)|[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|lt)([=a-zA-Z0-9])?/g;
- var decodeMap = {'Aacute':'\xC1','aacute':'\xE1','Abreve':'\u0102','abreve':'\u0103','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','Acirc':'\xC2','acirc':'\xE2','acute':'\xB4','Acy':'\u0410','acy':'\u0430','AElig':'\xC6','aelig':'\xE6','af':'\u2061','Afr':'\uD835\uDD04','afr':'\uD835\uDD1E','Agrave':'\xC0','agrave':'\xE0','alefsym':'\u2135','aleph':'\u2135','Alpha':'\u0391','alpha':'\u03B1','Amacr':'\u0100','amacr':'\u0101','amalg':'\u2A3F','amp':'&','AMP':'&','andand':'\u2A55','And':'\u2A53','and':'\u2227','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angmsd':'\u2221','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','Aogon':'\u0104','aogon':'\u0105','Aopf':'\uD835\uDD38','aopf':'\uD835\uDD52','apacir':'\u2A6F','ap':'\u2248','apE':'\u2A70','ape':'\u224A','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','Aring':'\xC5','aring':'\xE5','Ascr':'\uD835\uDC9C','ascr':'\uD835\uDCB6','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','Atilde':'\xC3','atilde':'\xE3','Auml':'\xC4','auml':'\xE4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','Bcy':'\u0411','bcy':'\u0431','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','Beta':'\u0392','beta':'\u03B2','beth':'\u2136','between':'\u226C','Bfr':'\uD835\uDD05','bfr':'\uD835\uDD1F','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bNot':'\u2AED','bnot':'\u2310','Bopf':'\uD835\uDD39','bopf':'\uD835\uDD53','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxHd':'\u2564','boxhD':'\u2565','boxHD':'\u2566','boxhu':'\u2534','boxHu':'\u2567','boxhU':'\u2568','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsolb':'\u29C5','bsol':'\\','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpE':'\u2AAE','bumpe':'\u224F','Bumpeq':'\u224E','bumpeq':'\u224F','Cacute':'\u0106','cacute':'\u0107','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','cap':'\u2229','Cap':'\u22D2','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','Ccaron':'\u010C','ccaron':'\u010D','Ccedil':'\xC7','ccedil':'\xE7','Ccirc':'\u0108','ccirc':'\u0109','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','Cdot':'\u010A','cdot':'\u010B','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','CHcy':'\u0427','chcy':'\u0447','check':'\u2713','checkmark':'\u2713','Chi':'\u03A7','chi':'\u03C7','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cir':'\u25CB','cirE':'\u29C3','cire':'\u2257','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','Colone':'\u2A74','colone':'\u2254','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','Cscr':'\uD835\uDC9E','cscr':'\uD835\uDCB8','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cup':'\u222A','Cup':'\u22D3','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','Darr':'\u21A1','dArr':'\u21D3','dash':'\u2010','Dashv':'\u2AE4','dashv':'\u22A3','dbkarow':'\u290F','dblac':'\u02DD','Dcaron':'\u010E','dcaron':'\u010F','Dcy':'\u0414','dcy':'\u0434','ddagger':'\u2021','ddarr':'\u21CA','DD':'\u2145','dd':'\u2146','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','Delta':'\u0394','delta':'\u03B4','demptyv':'\u29B1','dfisht':'\u297F','Dfr':'\uD835\uDD07','dfr':'\uD835\uDD21','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','DJcy':'\u0402','djcy':'\u0452','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','Dopf':'\uD835\uDD3B','dopf':'\uD835\uDD55','Dot':'\xA8','dot':'\u02D9','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','DownArrowBar':'\u2913','downarrow':'\u2193','DownArrow':'\u2193','Downarrow':'\u21D3','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVectorBar':'\u2956','DownLeftVector':'\u21BD','DownRightTeeVector':'\u295F','DownRightVectorBar':'\u2957','DownRightVector':'\u21C1','DownTeeArrow':'\u21A7','DownTee':'\u22A4','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','Dscr':'\uD835\uDC9F','dscr':'\uD835\uDCB9','DScy':'\u0405','dscy':'\u0455','dsol':'\u29F6','Dstrok':'\u0110','dstrok':'\u0111','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','DZcy':'\u040F','dzcy':'\u045F','dzigrarr':'\u27FF','Eacute':'\xC9','eacute':'\xE9','easter':'\u2A6E','Ecaron':'\u011A','ecaron':'\u011B','Ecirc':'\xCA','ecirc':'\xEA','ecir':'\u2256','ecolon':'\u2255','Ecy':'\u042D','ecy':'\u044D','eDDot':'\u2A77','Edot':'\u0116','edot':'\u0117','eDot':'\u2251','ee':'\u2147','efDot':'\u2252','Efr':'\uD835\uDD08','efr':'\uD835\uDD22','eg':'\u2A9A','Egrave':'\xC8','egrave':'\xE8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','Emacr':'\u0112','emacr':'\u0113','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp13':'\u2004','emsp14':'\u2005','emsp':'\u2003','ENG':'\u014A','eng':'\u014B','ensp':'\u2002','Eogon':'\u0118','eogon':'\u0119','Eopf':'\uD835\uDD3C','eopf':'\uD835\uDD56','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','Epsilon':'\u0395','epsilon':'\u03B5','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','Esim':'\u2A73','esim':'\u2242','Eta':'\u0397','eta':'\u03B7','ETH':'\xD0','eth':'\xF0','Euml':'\xCB','euml':'\xEB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','Fcy':'\u0424','fcy':'\u0444','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','Ffr':'\uD835\uDD09','ffr':'\uD835\uDD23','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','Fopf':'\uD835\uDD3D','fopf':'\uD835\uDD57','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','Gamma':'\u0393','gamma':'\u03B3','Gammad':'\u03DC','gammad':'\u03DD','gap':'\u2A86','Gbreve':'\u011E','gbreve':'\u011F','Gcedil':'\u0122','Gcirc':'\u011C','gcirc':'\u011D','Gcy':'\u0413','gcy':'\u0433','Gdot':'\u0120','gdot':'\u0121','ge':'\u2265','gE':'\u2267','gEl':'\u2A8C','gel':'\u22DB','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','gescc':'\u2AA9','ges':'\u2A7E','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','Gfr':'\uD835\uDD0A','gfr':'\uD835\uDD24','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','GJcy':'\u0403','gjcy':'\u0453','gla':'\u2AA5','gl':'\u2277','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','Gopf':'\uD835\uDD3E','gopf':'\uD835\uDD58','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','Gscr':'\uD835\uDCA2','gscr':'\u210A','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gtcc':'\u2AA7','gtcir':'\u2A7A','gt':'>','GT':'>','Gt':'\u226B','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','HARDcy':'\u042A','hardcy':'\u044A','harrcir':'\u2948','harr':'\u2194','hArr':'\u21D4','harrw':'\u21AD','Hat':'^','hbar':'\u210F','Hcirc':'\u0124','hcirc':'\u0125','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','Hstrok':'\u0126','hstrok':'\u0127','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','Iacute':'\xCD','iacute':'\xED','ic':'\u2063','Icirc':'\xCE','icirc':'\xEE','Icy':'\u0418','icy':'\u0438','Idot':'\u0130','IEcy':'\u0415','iecy':'\u0435','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','Igrave':'\xCC','igrave':'\xEC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','IJlig':'\u0132','ijlig':'\u0133','Imacr':'\u012A','imacr':'\u012B','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','Im':'\u2111','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','incare':'\u2105','in':'\u2208','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','intcal':'\u22BA','int':'\u222B','Int':'\u222C','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','IOcy':'\u0401','iocy':'\u0451','Iogon':'\u012E','iogon':'\u012F','Iopf':'\uD835\uDD40','iopf':'\uD835\uDD5A','Iota':'\u0399','iota':'\u03B9','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','Itilde':'\u0128','itilde':'\u0129','Iukcy':'\u0406','iukcy':'\u0456','Iuml':'\xCF','iuml':'\xEF','Jcirc':'\u0134','jcirc':'\u0135','Jcy':'\u0419','jcy':'\u0439','Jfr':'\uD835\uDD0D','jfr':'\uD835\uDD27','jmath':'\u0237','Jopf':'\uD835\uDD41','jopf':'\uD835\uDD5B','Jscr':'\uD835\uDCA5','jscr':'\uD835\uDCBF','Jsercy':'\u0408','jsercy':'\u0458','Jukcy':'\u0404','jukcy':'\u0454','Kappa':'\u039A','kappa':'\u03BA','kappav':'\u03F0','Kcedil':'\u0136','kcedil':'\u0137','Kcy':'\u041A','kcy':'\u043A','Kfr':'\uD835\uDD0E','kfr':'\uD835\uDD28','kgreen':'\u0138','KHcy':'\u0425','khcy':'\u0445','KJcy':'\u040C','kjcy':'\u045C','Kopf':'\uD835\uDD42','kopf':'\uD835\uDD5C','Kscr':'\uD835\uDCA6','kscr':'\uD835\uDCC0','lAarr':'\u21DA','Lacute':'\u0139','lacute':'\u013A','laemptyv':'\u29B4','lagran':'\u2112','Lambda':'\u039B','lambda':'\u03BB','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larrb':'\u21E4','larrbfs':'\u291F','larr':'\u2190','Larr':'\u219E','lArr':'\u21D0','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','latail':'\u2919','lAtail':'\u291B','lat':'\u2AAB','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','Lcaron':'\u013D','lcaron':'\u013E','Lcedil':'\u013B','lcedil':'\u013C','lceil':'\u2308','lcub':'{','Lcy':'\u041B','lcy':'\u043B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','LeftArrowBar':'\u21E4','leftarrow':'\u2190','LeftArrow':'\u2190','Leftarrow':'\u21D0','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVectorBar':'\u2959','LeftDownVector':'\u21C3','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','LeftRightArrow':'\u2194','Leftrightarrow':'\u21D4','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTeeArrow':'\u21A4','LeftTee':'\u22A3','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangleBar':'\u29CF','LeftTriangle':'\u22B2','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVectorBar':'\u2958','LeftUpVector':'\u21BF','LeftVectorBar':'\u2952','LeftVector':'\u21BC','lEg':'\u2A8B','leg':'\u22DA','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','lescc':'\u2AA8','les':'\u2A7D','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','Lfr':'\uD835\uDD0F','lfr':'\uD835\uDD29','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','LJcy':'\u0409','ljcy':'\u0459','llarr':'\u21C7','ll':'\u226A','Ll':'\u22D8','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','Lmidot':'\u013F','lmidot':'\u0140','lmoustache':'\u23B0','lmoust':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','LongLeftArrow':'\u27F5','Longleftarrow':'\u27F8','longleftrightarrow':'\u27F7','LongLeftRightArrow':'\u27F7','Longleftrightarrow':'\u27FA','longmapsto':'\u27FC','longrightarrow':'\u27F6','LongRightArrow':'\u27F6','Longrightarrow':'\u27F9','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','Lopf':'\uD835\uDD43','lopf':'\uD835\uDD5D','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','Lstrok':'\u0141','lstrok':'\u0142','ltcc':'\u2AA6','ltcir':'\u2A79','lt':'<','LT':'<','Lt':'\u226A','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','Map':'\u2905','map':'\u21A6','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','Mcy':'\u041C','mcy':'\u043C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','Mfr':'\uD835\uDD10','mfr':'\uD835\uDD2A','mho':'\u2127','micro':'\xB5','midast':'*','midcir':'\u2AF0','mid':'\u2223','middot':'\xB7','minusb':'\u229F','minus':'\u2212','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','Mopf':'\uD835\uDD44','mopf':'\uD835\uDD5E','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','Mu':'\u039C','mu':'\u03BC','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','Nacute':'\u0143','nacute':'\u0144','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natural':'\u266E','naturals':'\u2115','natur':'\u266E','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','Ncaron':'\u0147','ncaron':'\u0148','Ncedil':'\u0145','ncedil':'\u0146','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','Ncy':'\u041D','ncy':'\u043D','ndash':'\u2013','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','ne':'\u2260','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','Nfr':'\uD835\uDD11','nfr':'\uD835\uDD2B','ngE':'\u2267\u0338','nge':'\u2271','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','nGt':'\u226B\u20D2','ngt':'\u226F','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','NJcy':'\u040A','njcy':'\u045A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nlE':'\u2266\u0338','nle':'\u2270','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nLt':'\u226A\u20D2','nlt':'\u226E','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','Not':'\u2AEC','not':'\xAC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangle':'\u22EA','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangle':'\u22EB','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','nparallel':'\u2226','npar':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','nprec':'\u2280','npreceq':'\u2AAF\u0338','npre':'\u2AAF\u0338','nrarrc':'\u2933\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','Nscr':'\uD835\uDCA9','nscr':'\uD835\uDCC3','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsubE':'\u2AC5\u0338','nsube':'\u2288','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupE':'\u2AC6\u0338','nsupe':'\u2289','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','Ntilde':'\xD1','ntilde':'\xF1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','Nu':'\u039D','nu':'\u03BD','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','Oacute':'\xD3','oacute':'\xF3','oast':'\u229B','Ocirc':'\xD4','ocirc':'\xF4','ocir':'\u229A','Ocy':'\u041E','ocy':'\u043E','odash':'\u229D','Odblac':'\u0150','odblac':'\u0151','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','OElig':'\u0152','oelig':'\u0153','ofcir':'\u29BF','Ofr':'\uD835\uDD12','ofr':'\uD835\uDD2C','ogon':'\u02DB','Ograve':'\xD2','ograve':'\xF2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','Omacr':'\u014C','omacr':'\u014D','Omega':'\u03A9','omega':'\u03C9','Omicron':'\u039F','omicron':'\u03BF','omid':'\u29B6','ominus':'\u2296','Oopf':'\uD835\uDD46','oopf':'\uD835\uDD60','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','orarr':'\u21BB','Or':'\u2A54','or':'\u2228','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','Oscr':'\uD835\uDCAA','oscr':'\u2134','Oslash':'\xD8','oslash':'\xF8','osol':'\u2298','Otilde':'\xD5','otilde':'\xF5','otimesas':'\u2A36','Otimes':'\u2A37','otimes':'\u2297','Ouml':'\xD6','ouml':'\xF6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','para':'\xB6','parallel':'\u2225','par':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','Pcy':'\u041F','pcy':'\u043F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','Pfr':'\uD835\uDD13','pfr':'\uD835\uDD2D','Phi':'\u03A6','phi':'\u03C6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','Pi':'\u03A0','pi':'\u03C0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plus':'+','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','prap':'\u2AB7','Pr':'\u2ABB','pr':'\u227A','prcue':'\u227C','precapprox':'\u2AB7','prec':'\u227A','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','pre':'\u2AAF','prE':'\u2AB3','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportional':'\u221D','Proportion':'\u2237','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','Pscr':'\uD835\uDCAB','pscr':'\uD835\uDCC5','Psi':'\u03A8','psi':'\u03C8','puncsp':'\u2008','Qfr':'\uD835\uDD14','qfr':'\uD835\uDD2E','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','Qscr':'\uD835\uDCAC','qscr':'\uD835\uDCC6','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','Racute':'\u0154','racute':'\u0155','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarr':'\u2192','Rarr':'\u21A0','rArr':'\u21D2','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','Rarrtl':'\u2916','rarrtl':'\u21A3','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','Rcaron':'\u0158','rcaron':'\u0159','Rcedil':'\u0156','rcedil':'\u0157','rceil':'\u2309','rcub':'}','Rcy':'\u0420','rcy':'\u0440','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','Re':'\u211C','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','Rho':'\u03A1','rho':'\u03C1','rhov':'\u03F1','RightAngleBracket':'\u27E9','RightArrowBar':'\u21E5','rightarrow':'\u2192','RightArrow':'\u2192','Rightarrow':'\u21D2','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVectorBar':'\u2955','RightDownVector':'\u21C2','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTeeArrow':'\u21A6','RightTee':'\u22A2','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangleBar':'\u29D0','RightTriangle':'\u22B3','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVectorBar':'\u2954','RightUpVector':'\u21BE','RightVectorBar':'\u2953','RightVector':'\u21C0','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoustache':'\u23B1','rmoust':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','Sacute':'\u015A','sacute':'\u015B','sbquo':'\u201A','scap':'\u2AB8','Scaron':'\u0160','scaron':'\u0161','Sc':'\u2ABC','sc':'\u227B','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','Scedil':'\u015E','scedil':'\u015F','Scirc':'\u015C','scirc':'\u015D','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','Scy':'\u0421','scy':'\u0441','sdotb':'\u22A1','sdot':'\u22C5','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','Sfr':'\uD835\uDD16','sfr':'\uD835\uDD30','sfrown':'\u2322','sharp':'\u266F','SHCHcy':'\u0429','shchcy':'\u0449','SHcy':'\u0428','shcy':'\u0448','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','Sigma':'\u03A3','sigma':'\u03C3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','SOFTcy':'\u042C','softcy':'\u044C','solbar':'\u233F','solb':'\u29C4','sol':'/','Sopf':'\uD835\uDD4A','sopf':'\uD835\uDD64','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squ':'\u25A1','squf':'\u25AA','srarr':'\u2192','Sscr':'\uD835\uDCAE','sscr':'\uD835\uDCC8','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','Star':'\u22C6','star':'\u2606','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','subE':'\u2AC5','sube':'\u2286','subedot':'\u2AC3','submult':'\u2AC1','subnE':'\u2ACB','subne':'\u228A','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succapprox':'\u2AB8','succ':'\u227B','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','sup':'\u2283','Sup':'\u22D1','supdot':'\u2ABE','supdsub':'\u2AD8','supE':'\u2AC6','supe':'\u2287','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supnE':'\u2ACC','supne':'\u228B','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','Tau':'\u03A4','tau':'\u03C4','tbrk':'\u23B4','Tcaron':'\u0164','tcaron':'\u0165','Tcedil':'\u0162','tcedil':'\u0163','Tcy':'\u0422','tcy':'\u0442','tdot':'\u20DB','telrec':'\u2315','Tfr':'\uD835\uDD17','tfr':'\uD835\uDD31','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','Theta':'\u0398','theta':'\u03B8','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','ThinSpace':'\u2009','thinsp':'\u2009','thkap':'\u2248','thksim':'\u223C','THORN':'\xDE','thorn':'\xFE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','timesbar':'\u2A31','timesb':'\u22A0','times':'\xD7','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','topbot':'\u2336','topcir':'\u2AF1','top':'\u22A4','Topf':'\uD835\uDD4B','topf':'\uD835\uDD65','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','Tscr':'\uD835\uDCAF','tscr':'\uD835\uDCC9','TScy':'\u0426','tscy':'\u0446','TSHcy':'\u040B','tshcy':'\u045B','Tstrok':'\u0166','tstrok':'\u0167','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','Uacute':'\xDA','uacute':'\xFA','uarr':'\u2191','Uarr':'\u219F','uArr':'\u21D1','Uarrocir':'\u2949','Ubrcy':'\u040E','ubrcy':'\u045E','Ubreve':'\u016C','ubreve':'\u016D','Ucirc':'\xDB','ucirc':'\xFB','Ucy':'\u0423','ucy':'\u0443','udarr':'\u21C5','Udblac':'\u0170','udblac':'\u0171','udhar':'\u296E','ufisht':'\u297E','Ufr':'\uD835\uDD18','ufr':'\uD835\uDD32','Ugrave':'\xD9','ugrave':'\xF9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','Umacr':'\u016A','umacr':'\u016B','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','Uogon':'\u0172','uogon':'\u0173','Uopf':'\uD835\uDD4C','uopf':'\uD835\uDD66','UpArrowBar':'\u2912','uparrow':'\u2191','UpArrow':'\u2191','Uparrow':'\u21D1','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','UpDownArrow':'\u2195','Updownarrow':'\u21D5','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','Upsilon':'\u03A5','upsilon':'\u03C5','UpTeeArrow':'\u21A5','UpTee':'\u22A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','Uring':'\u016E','uring':'\u016F','urtri':'\u25F9','Uscr':'\uD835\uDCB0','uscr':'\uD835\uDCCA','utdot':'\u22F0','Utilde':'\u0168','utilde':'\u0169','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','Uuml':'\xDC','uuml':'\xFC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','Vcy':'\u0412','vcy':'\u0432','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','veebar':'\u22BB','vee':'\u2228','Vee':'\u22C1','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','Vfr':'\uD835\uDD19','vfr':'\uD835\uDD33','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','Vopf':'\uD835\uDD4D','vopf':'\uD835\uDD67','vprop':'\u221D','vrtri':'\u22B3','Vscr':'\uD835\uDCB1','vscr':'\uD835\uDCCB','vsubnE':'\u2ACB\uFE00','vsubne':'\u228A\uFE00','vsupnE':'\u2ACC\uFE00','vsupne':'\u228B\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','Wcirc':'\u0174','wcirc':'\u0175','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','Wfr':'\uD835\uDD1A','wfr':'\uD835\uDD34','Wopf':'\uD835\uDD4E','wopf':'\uD835\uDD68','wp':'\u2118','wr':'\u2240','wreath':'\u2240','Wscr':'\uD835\uDCB2','wscr':'\uD835\uDCCC','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','Xfr':'\uD835\uDD1B','xfr':'\uD835\uDD35','xharr':'\u27F7','xhArr':'\u27FA','Xi':'\u039E','xi':'\u03BE','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','Xopf':'\uD835\uDD4F','xopf':'\uD835\uDD69','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','Xscr':'\uD835\uDCB3','xscr':'\uD835\uDCCD','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','Yacute':'\xDD','yacute':'\xFD','YAcy':'\u042F','yacy':'\u044F','Ycirc':'\u0176','ycirc':'\u0177','Ycy':'\u042B','ycy':'\u044B','yen':'\xA5','Yfr':'\uD835\uDD1C','yfr':'\uD835\uDD36','YIcy':'\u0407','yicy':'\u0457','Yopf':'\uD835\uDD50','yopf':'\uD835\uDD6A','Yscr':'\uD835\uDCB4','yscr':'\uD835\uDCCE','YUcy':'\u042E','yucy':'\u044E','yuml':'\xFF','Yuml':'\u0178','Zacute':'\u0179','zacute':'\u017A','Zcaron':'\u017D','zcaron':'\u017E','Zcy':'\u0417','zcy':'\u0437','Zdot':'\u017B','zdot':'\u017C','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','Zeta':'\u0396','zeta':'\u03B6','zfr':'\uD835\uDD37','Zfr':'\u2128','ZHcy':'\u0416','zhcy':'\u0436','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','Zscr':'\uD835\uDCB5','zscr':'\uD835\uDCCF','zwj':'\u200D','zwnj':'\u200C'};
- var decodeMapLegacy = {'Aacute':'\xC1','aacute':'\xE1','Acirc':'\xC2','acirc':'\xE2','acute':'\xB4','AElig':'\xC6','aelig':'\xE6','Agrave':'\xC0','agrave':'\xE0','amp':'&','AMP':'&','Aring':'\xC5','aring':'\xE5','Atilde':'\xC3','atilde':'\xE3','Auml':'\xC4','auml':'\xE4','brvbar':'\xA6','Ccedil':'\xC7','ccedil':'\xE7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','Eacute':'\xC9','eacute':'\xE9','Ecirc':'\xCA','ecirc':'\xEA','Egrave':'\xC8','egrave':'\xE8','ETH':'\xD0','eth':'\xF0','Euml':'\xCB','euml':'\xEB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','Iacute':'\xCD','iacute':'\xED','Icirc':'\xCE','icirc':'\xEE','iexcl':'\xA1','Igrave':'\xCC','igrave':'\xEC','iquest':'\xBF','Iuml':'\xCF','iuml':'\xEF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','Ntilde':'\xD1','ntilde':'\xF1','Oacute':'\xD3','oacute':'\xF3','Ocirc':'\xD4','ocirc':'\xF4','Ograve':'\xD2','ograve':'\xF2','ordf':'\xAA','ordm':'\xBA','Oslash':'\xD8','oslash':'\xF8','Otilde':'\xD5','otilde':'\xF5','Ouml':'\xD6','ouml':'\xF6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','THORN':'\xDE','thorn':'\xFE','times':'\xD7','Uacute':'\xDA','uacute':'\xFA','Ucirc':'\xDB','ucirc':'\xFB','Ugrave':'\xD9','ugrave':'\xF9','uml':'\xA8','Uuml':'\xDC','uuml':'\xFC','Yacute':'\xDD','yacute':'\xFD','yen':'\xA5','yuml':'\xFF'};
- var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'};
- var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];
-
- /*--------------------------------------------------------------------------*/
-
- var stringFromCharCode = String.fromCharCode;
-
- var object = {};
- var hasOwnProperty = object.hasOwnProperty;
- var has = function(object, propertyName) {
- return hasOwnProperty.call(object, propertyName);
- };
-
- var contains = function(array, value) {
- var index = -1;
- var length = array.length;
- while (++index < length) {
- if (array[index] == value) {
- return true;
- }
- }
- return false;
- };
-
- var merge = function(options, defaults) {
- if (!options) {
- return defaults;
- }
- var result = {};
- var key;
- for (key in defaults) {
- // A `hasOwnProperty` check is not needed here, since only recognized
- // option names are used anyway. Any others are ignored.
- result[key] = has(options, key) ? options[key] : defaults[key];
- }
- return result;
- };
-
- // Modified version of `ucs2encode`; see http://mths.be/punycode.
- var codePointToSymbol = function(codePoint, strict) {
- var output = '';
- if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
- // See issue #4:
- // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
- // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
- // REPLACEMENT CHARACTER.”
- if (strict) {
- parseError('character reference outside the permissible Unicode range');
- }
- return '\uFFFD';
- }
- if (has(decodeMapNumeric, codePoint)) {
- if (strict) {
- parseError('disallowed character reference');
- }
- return decodeMapNumeric[codePoint];
- }
- if (strict && contains(invalidReferenceCodePoints, codePoint)) {
- parseError('disallowed character reference');
- }
- if (codePoint > 0xFFFF) {
- codePoint -= 0x10000;
- output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
- codePoint = 0xDC00 | codePoint & 0x3FF;
- }
- output += stringFromCharCode(codePoint);
- return output;
- };
-
- var hexEscape = function(symbol) {
- return '' + symbol.charCodeAt(0).toString(16).toUpperCase() + ';';
- };
-
- var parseError = function(message) {
- throw Error('Parse error: ' + message);
- };
-
- /*--------------------------------------------------------------------------*/
-
- var encode = function(string, options) {
- options = merge(options, encode.options);
- var strict = options.strict;
- if (strict && regexInvalidRawCodePoint.test(string)) {
- parseError('forbidden code point');
- }
- var encodeEverything = options.encodeEverything;
- var useNamedReferences = options.useNamedReferences;
- var allowUnsafeSymbols = options.allowUnsafeSymbols;
- if (encodeEverything) {
- // Encode ASCII symbols.
- string = string.replace(regexAsciiWhitelist, function(symbol) {
- // Use named references if requested & possible.
- if (useNamedReferences && has(encodeMap, symbol)) {
- return '&' + encodeMap[symbol] + ';';
- }
- return hexEscape(symbol);
- });
- // Shorten a few escapes that represent two symbols, of which at least one
- // is within the ASCII range.
- if (useNamedReferences) {
- string = string
- .replace(/>\u20D2/g, '>⃒')
- .replace(/<\u20D2/g, '<⃒')
- .replace(/fj/g, 'fj');
- }
- // Encode non-ASCII symbols.
- if (useNamedReferences) {
- // Encode non-ASCII symbols that can be replaced with a named reference.
- string = string.replace(regexEncodeNonAscii, function(string) {
- // Note: there is no need to check `has(encodeMap, string)` here.
- return '&' + encodeMap[string] + ';';
- });
- }
- // Note: any remaining non-ASCII symbols are handled outside of the `if`.
- } else if (useNamedReferences) {
- // Apply named character references.
- // Encode `<>"'&` using named character references.
- if (!allowUnsafeSymbols) {
- string = string.replace(regexEscape, function(string) {
- return '&' + encodeMap[string] + ';'; // no need to check `has()` here
- });
- }
- // Shorten escapes that represent two symbols, of which at least one is
- // `<>"'&`.
- string = string
- .replace(/>\u20D2/g, '>⃒')
- .replace(/<\u20D2/g, '<⃒');
- // Encode non-ASCII symbols that can be replaced with a named reference.
- string = string.replace(regexEncodeNonAscii, function(string) {
- // Note: there is no need to check `has(encodeMap, string)` here.
- return '&' + encodeMap[string] + ';';
- });
- } else if (!allowUnsafeSymbols) {
- // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
- // using named character references.
- string = string.replace(regexEscape, hexEscape);
- }
- return string
- // Encode astral symbols.
- .replace(regexAstralSymbols, function($0) {
- // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
- var high = $0.charCodeAt(0);
- var low = $0.charCodeAt(1);
- var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
- return '' + codePoint.toString(16).toUpperCase() + ';';
- })
- // Encode any remaining BMP symbols that are not printable ASCII symbols
- // using a hexadecimal escape.
- .replace(regexBmpWhitelist, hexEscape);
- };
- // Expose default options (so they can be overridden globally).
- encode.options = {
- 'allowUnsafeSymbols': false,
- 'encodeEverything': false,
- 'strict': false,
- 'useNamedReferences': false
- };
-
- var decode = function(html, options) {
- options = merge(options, decode.options);
- var strict = options.strict;
- if (strict && regexInvalidEntity.test(html)) {
- parseError('malformed character reference');
- }
- return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7) {
- var codePoint;
- var semicolon;
- var hexDigits;
- var reference;
- var next;
- if ($1) {
- // Decode decimal escapes, e.g. `𝌆`.
- codePoint = $1;
- semicolon = $2;
- if (strict && !semicolon) {
- parseError('character reference was not terminated by a semicolon');
- }
- return codePointToSymbol(codePoint, strict);
- }
- if ($3) {
- // Decode hexadecimal escapes, e.g. `𝌆`.
- hexDigits = $3;
- semicolon = $4;
- if (strict && !semicolon) {
- parseError('character reference was not terminated by a semicolon');
- }
- codePoint = parseInt(hexDigits, 16);
- return codePointToSymbol(codePoint, strict);
- }
- if ($5) {
- // Decode named character references with trailing `;`, e.g. `©`.
- reference = $5;
- if (has(decodeMap, reference)) {
- return decodeMap[reference];
- } else {
- // Ambiguous ampersand; see http://mths.be/notes/ambiguous-ampersands.
- if (strict) {
- parseError(
- 'named character reference was not terminated by a semicolon'
- );
- }
- return $0;
- }
- }
- // If we’re still here, it’s a legacy reference for sure. No need for an
- // extra `if` check.
- // Decode named character references without trailing `;`, e.g. `&`
- // This is only a parse error if it gets converted to `&`, or if it is
- // followed by `=` in an attribute context.
- reference = $6;
- next = $7;
- if (next && options.isAttributeValue) {
- if (strict && next == '=') {
- parseError('`&` did not start a character reference');
- }
- return $0;
- } else {
- if (strict) {
- parseError(
- 'named character reference was not terminated by a semicolon'
- );
- }
- // Note: there is no need to check `has(decodeMapLegacy, reference)`.
- return decodeMapLegacy[reference] + (next || '');
- }
- });
- };
- // Expose default options (so they can be overridden globally).
- decode.options = {
- 'isAttributeValue': false,
- 'strict': false
- };
-
- var escape = function(string) {
- return string.replace(regexEscape, function($0) {
- // Note: there is no need to check `has(escapeMap, $0)` here.
- return escapeMap[$0];
- });
- };
-
- /*--------------------------------------------------------------------------*/
-
- var he = {
- 'version': '0.5.0',
- 'encode': encode,
- 'decode': decode,
- 'escape': escape,
- 'unescape': decode
- };
-
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define(function() {
- return he;
- });
- } else if (freeExports && !freeExports.nodeType) {
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
- freeModule.exports = he;
- } else { // in Narwhal or RingoJS v0.7.0-
- for (var key in he) {
- has(he, key) && (freeExports[key] = he[key]);
- }
- }
- } else { // in Rhino or a web browser
- root.he = he;
- }
-
-}(this));
diff --git a/topics/00. Course-introduction/slides/node_modules/he/man/he.1 b/topics/00. Course-introduction/slides/node_modules/he/man/he.1
deleted file mode 100644
index 3a7e504..0000000
--- a/topics/00. Course-introduction/slides/node_modules/he/man/he.1
+++ /dev/null
@@ -1,78 +0,0 @@
-.Dd July 27, 2013
-.Dt he 1
-.Sh NAME
-.Nm he
-.Nd encode/decode HTML entities just like a browser would
-.Sh SYNOPSIS
-.Nm
-.Op Fl -escape Ar string
-.br
-.Op Fl -encode Ar string
-.br
-.Op Fl -encode Fl -use-named-refs Fl -everything Fl -allow-unsafe Ar string
-.br
-.Op Fl -decode Ar string
-.br
-.Op Fl -decode Fl -attribute Ar string
-.br
-.Op Fl -decode Fl -strict Ar string
-.br
-.Op Fl v | -version
-.br
-.Op Fl h | -help
-.Sh DESCRIPTION
-.Nm
-encodes/decodes HTML entities in strings just like a browser would.
-.Sh OPTIONS
-.Bl -ohang -offset
-.It Sy "--escape"
-Take a string of text and escape it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, and `'`.
-.It Sy "--encode"
-Take a string of text and encode any symbols that aren't printable ASCII symbols and that can be replaced with character references. For example, it would turn `©` into `©`, but it wouldn't turn `+` into `+` since there is no point in doing so. Additionally, it replaces any remaining non-ASCII symbols with a hexadecimal escape sequence (e.g. `𝌆`). The return value of this function is always valid HTML.
-.It Sy "--encode --use-named-refs"
-Enable the use of named character references (like `©`) in the output. If compatibility with older browsers is a concern, don't use this option.
-.It Sy "--encode --everything"
-Encode every symbol in the input string, even safe printable ASCII symbols.
-.It Sy "--encode --allow-unsafe"
-Encode non-ASCII characters only. This leaves unsafe HTML/XML symbols like `&`, `<`, `>`, `"`, and `'` intact.
-.It Sy "--decode"
-Takes a string of HTML and decode any named and numerical character references in it using the algorithm described in the HTML spec.
-.It Sy "--decode --attribute"
-Parse the input as if it was an HTML attribute value rather than a string in an HTML text content.
-.It Sy "--decode --strict"
-Throw an error if an invalid character reference is encountered.
-.It Sy "-v, --version"
-Print he's version.
-.It Sy "-h, --help"
-Show the help screen.
-.El
-.Sh EXIT STATUS
-The
-.Nm he
-utility exits with one of the following values:
-.Pp
-.Bl -tag -width flag -compact
-.It Li 0
-.Nm
-successfully encoded/decoded the input and printed the result.
-.It Li 1
-.Nm
-wasn't instructed to encode/decode anything (for example, the
-.Ar --help
-flag was set); or, an error occurred.
-.El
-.Sh EXAMPLES
-.Bl -ohang -offset
-.It Sy "he --escape ''"
-Print an escaped version of the given string that is safe for use in HTML text contexts, escaping only `&`, `<`, `>`, `"`, and `'`.
-.It Sy "he --decode '©𝌆'"
-Print the decoded version of the given HTML string.
-.It Sy "echo\ '©𝌆'\ |\ he --decode"
-Print the decoded version of the HTML string that gets piped in.
-.El
-.Sh BUGS
-he's bug tracker is located at .
-.Sh AUTHOR
-Mathias Bynens
-.Sh WWW
-
diff --git a/topics/00. Course-introduction/slides/node_modules/he/package.json b/topics/00. Course-introduction/slides/node_modules/he/package.json
deleted file mode 100644
index e2bb588..0000000
--- a/topics/00. Course-introduction/slides/node_modules/he/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "_args": [
- [
- "he@^0.5.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "he@>=0.5.0 <0.6.0",
- "_id": "he@0.5.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/he",
- "_npmUser": {
- "email": "mathias@qiwi.be",
- "name": "mathias"
- },
- "_npmVersion": "1.4.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "he",
- "raw": "he@^0.5.0",
- "rawSpec": "^0.5.0",
- "scope": null,
- "spec": ">=0.5.0 <0.6.0",
- "type": "range"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz",
- "_shasum": "2c05ffaef90b68e860f3fd2b54ef580989277ee2",
- "_shrinkwrap": null,
- "_spec": "he@^0.5.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "name": "Mathias Bynens",
- "url": "https://mathiasbynens.be/"
- },
- "bin": {
- "he": "bin/he"
- },
- "bugs": {
- "url": "https://github.com/mathiasbynens/he/issues"
- },
- "dependencies": {},
- "description": "A robust HTML entities encoder/decoder with full Unicode support.",
- "devDependencies": {
- "coveralls": "^2.11.1",
- "grunt": "^0.4.5",
- "grunt-shell": "^1.0.1",
- "grunt-template": "^0.2.3",
- "istanbul": "^0.3.0",
- "jsesc": "^0.5.0",
- "lodash": "^2.4.1",
- "qunit-extras": "^1.1.0",
- "qunitjs": "~1.11.0",
- "regenerate": "^0.6.2",
- "requirejs": "^2.1.14",
- "string.fromcodepoint": "^0.2.1"
- },
- "directories": {
- "bin": "bin",
- "man": "man",
- "test": "tests"
- },
- "dist": {
- "shasum": "2c05ffaef90b68e860f3fd2b54ef580989277ee2",
- "tarball": "http://registry.npmjs.org/he/-/he-0.5.0.tgz"
- },
- "files": [
- "LICENSE-MIT.txt",
- "bin/",
- "he.js",
- "man/"
- ],
- "homepage": "http://mths.be/he",
- "keywords": [
- "decode",
- "encode",
- "entities",
- "entity",
- "html",
- "string",
- "unicode"
- ],
- "license": "MIT",
- "main": "he.js",
- "maintainers": [
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- }
- ],
- "man": [
- "/Users/mathias/.npm/he/0.5.0/package/man/he.1"
- ],
- "name": "he",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mathiasbynens/he.git"
- },
- "scripts": {
- "test": "node tests/tests.js"
- },
- "version": "0.5.0"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/.npmignore b/topics/00. Course-introduction/slides/node_modules/http-proxy/.npmignore
deleted file mode 100644
index 081a48c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-test
-examples
-doc
-benchmark
-.travis.yml
-CHANGELOG.md
-UPGRADING.md
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/LICENSE b/topics/00. Course-introduction/slides/node_modules/http-proxy/LICENSE
deleted file mode 100644
index 2bab4b9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-
- node-http-proxy
-
- Copyright (c) Nodejitsu 2013
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/README.md b/topics/00. Course-introduction/slides/node_modules/http-proxy/README.md
deleted file mode 100644
index 0bc800f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/README.md
+++ /dev/null
@@ -1,419 +0,0 @@
-
-
-
-
-node-http-proxy
-=======
-
-`node-http-proxy` is an HTTP programmable proxying library that supports
-websockets. It is suitable for implementing components such as
-proxies and load balancers.
-
-### Installation
-
-`npm install http-proxy --save`
-
-### Build Status
-
-
-
-
-
-
-
-
-### Looking to Upgrade from 0.8.x ? Click [here](UPGRADING.md)
-
-### Core Concept
-
-A new proxy is created by calling `createProxyServer` and passing
-an `options` object as argument ([valid properties are available here](lib/http-proxy.js#L33-L50))
-
-```javascript
-var httpProxy = require('http-proxy');
-
-var proxy = httpProxy.createProxyServer(options);
-```
-
-An object will be returned with four values:
-
-* web `req, res, [options]` (used for proxying regular HTTP(S) requests)
-* ws `req, socket, head, [options]` (used for proxying WS(S) requests)
-* listen `port` (a function that wraps the object in a webserver, for your convenience)
-* close `[callback]` (a function that closes the inner webserver and stops listening on given port)
-
-It is then possible to proxy requests by calling these functions
-
-```javascript
-http.createServer(function(req, res) {
- proxy.web(req, res, { target: 'http://mytarget.com:8080' });
-});
-```
-
-Errors can be listened on either using the Event Emitter API
-
-```javascript
-proxy.on('error', function(e) {
- ...
-});
-```
-
-or using the callback API
-
-```javascript
-proxy.web(req, res, { target: 'http://mytarget.com:8080' }, function(e) { ... });
-```
-
-When a request is proxied it follows two different pipelines ([available here](lib/http-proxy/passes))
-which apply transformations to both the `req` and `res` object.
-The first pipeline (ingoing) is responsible for the creation and manipulation of the stream that connects your client to the target.
-The second pipeline (outgoing) is responsible for the creation and manipulation of the stream that, from your target, returns data
-to the client.
-
-
-#### Setup a basic stand-alone proxy server
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-//
-// Create your proxy server and set the target in the options.
-//
-httpProxy.createProxyServer({target:'http://localhost:9000'}).listen(8000);
-
-//
-// Create your target server
-//
-http.createServer(function (req, res) {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2));
- res.end();
-}).listen(9000);
-```
-
-#### Setup a stand-alone proxy server with custom server logic
-This example show how you can proxy a request using your own HTTP server
-and also you can put your own logic to handle the request.
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-
-//
-// Create a proxy server with custom application logic
-//
-var proxy = httpProxy.createProxyServer({});
-
-//
-// Create your custom server and just call `proxy.web()` to proxy
-// a web request to the target passed in the options
-// also you can use `proxy.ws()` to proxy a websockets request
-//
-var server = http.createServer(function(req, res) {
- // You can define here your custom logic to handle the request
- // and then proxy the request.
- proxy.web(req, res, { target: 'http://127.0.0.1:5060' });
-});
-
-console.log("listening on port 5050")
-server.listen(5050);
-```
-#### Modify a response from a proxied server
-Sometimes when you have received a HTML/XML document from the server of origin you would like to modify it before forwarding it on.
-
-[Harmon](https://github.com/No9/harmon) allows you to do this in a streaming style so as to keep the pressure on the proxy to a minimum.
-
-
-#### Setup a stand-alone proxy server with proxy request header re-writing
-This example shows how you can proxy a request using your own HTTP server that
-modifies the outgoing proxy request by adding a special header.
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-
-//
-// Create a proxy server with custom application logic
-//
-var proxy = httpProxy.createProxyServer({});
-
-// To modify the proxy connection before data is sent, you can listen
-// for the 'proxyReq' event. When the event is fired, you will receive
-// the following arguments:
-// (http.ClientRequest proxyReq, http.IncomingMessage req,
-// http.ServerResponse res, Object options). This mechanism is useful when
-// you need to modify the proxy request before the proxy connection
-// is made to the target.
-//
-proxy.on('proxyReq', function(proxyReq, req, res, options) {
- proxyReq.setHeader('X-Special-Proxy-Header', 'foobar');
-});
-
-var server = http.createServer(function(req, res) {
- // You can define here your custom logic to handle the request
- // and then proxy the request.
- proxy.web(req, res, {
- target: 'http://127.0.0.1:5060'
- });
-});
-
-console.log("listening on port 5050")
-server.listen(5050);
-```
-
-#### Setup a stand-alone proxy server with latency
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-
-//
-// Create a proxy server with latency
-//
-var proxy = httpProxy.createProxyServer();
-
-//
-// Create your server that makes an operation that waits a while
-// and then proxies the request
-//
-http.createServer(function (req, res) {
- // This simulates an operation that takes 500ms to execute
- setTimeout(function () {
- proxy.web(req, res, {
- target: 'http://localhost:9008'
- });
- }, 500);
-}).listen(8008);
-
-//
-// Create your target server
-//
-http.createServer(function (req, res) {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2));
- res.end();
-}).listen(9008);
-```
-
-#### Listening for proxy events
-
-* `error`: The error event is emitted if the request to the target fail.
-* `proxyReq`: This event is emitted before the data is sent. It gives you a chance to alter the proxyReq request object. Applies to "web" connections
-* `proxyReqWs`: This event is emitted before the data is sent. It gives you a chance to alter the proxyReq request object. Applies to "websocket" connections
-* `proxyRes`: This event is emitted if the request to the target got a response.
-* `open`: This event is emitted once the proxy websocket was created and piped into the target websocket.
-* `close`: This event is emitted once the proxy websocket was closed.
-* (DEPRECATED) `proxySocket`: Deprecated in favor of `open`.
-
-```js
-var httpProxy = require('http-proxy');
-// Error example
-//
-// Http Proxy Server with bad target
-//
-var proxy = httpProxy.createServer({
- target:'http://localhost:9005'
-});
-
-proxy.listen(8005);
-
-//
-// Listen for the `error` event on `proxy`.
-proxy.on('error', function (err, req, res) {
- res.writeHead(500, {
- 'Content-Type': 'text/plain'
- });
-
- res.end('Something went wrong. And we are reporting a custom error message.');
-});
-
-//
-// Listen for the `proxyRes` event on `proxy`.
-//
-proxy.on('proxyRes', function (proxyRes, req, res) {
- console.log('RAW Response from the target', JSON.stringify(proxyRes.headers, true, 2));
-});
-
-//
-// Listen for the `open` event on `proxy`.
-//
-proxy.on('open', function (proxySocket) {
- // listen for messages coming FROM the target here
- proxySocket.on('data', hybiParseAndLogMessage);
-});
-
-//
-// Listen for the `close` event on `proxy`.
-//
-proxy.on('close', function (req, socket, head) {
- // view disconnected websocket connections
- console.log('Client disconnected');
-});
-```
-
-#### Using HTTPS
-You can activate the validation of a secure SSL certificate to the target connection (avoid self signed certs), just set `secure: true` in the options.
-
-##### HTTPS -> HTTP
-
-```js
-//
-// Create the HTTPS proxy server in front of a HTTP server
-//
-httpProxy.createServer({
- target: {
- host: 'localhost',
- port: 9009
- },
- ssl: {
- key: fs.readFileSync('valid-ssl-key.pem', 'utf8'),
- cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8')
- }
-}).listen(8009);
-```
-
-##### HTTPS -> HTTPS
-
-```js
-//
-// Create the proxy server listening on port 443
-//
-httpProxy.createServer({
- ssl: {
- key: fs.readFileSync('valid-ssl-key.pem', 'utf8'),
- cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8')
- },
- target: 'https://localhost:9010',
- secure: true // Depends on your needs, could be false.
-}).listen(443);
-```
-
-#### Proxying WebSockets
-You can activate the websocket support for the proxy using `ws:true` in the options.
-
-```js
-//
-// Create a proxy server for websockets
-//
-httpProxy.createServer({
- target: 'ws://localhost:9014',
- ws: true
-}).listen(8014);
-```
-
-Also you can proxy the websocket requests just calling the `ws(req, socket, head)` method.
-
-```js
-//
-// Setup our server to proxy standard HTTP requests
-//
-var proxy = new httpProxy.createProxyServer({
- target: {
- host: 'localhost',
- port: 9015
- }
-});
-var proxyServer = http.createServer(function (req, res) {
- proxy.web(req, res);
-});
-
-//
-// Listen to the `upgrade` event and proxy the
-// WebSocket requests as well.
-//
-proxyServer.on('upgrade', function (req, socket, head) {
- proxy.ws(req, socket, head);
-});
-
-proxyServer.listen(8015);
-```
-
-### Contributing and Issues
-
-* Search on Google/Github
-* If you can't find anything, open an issue
-* If you feel comfortable about fixing the issue, fork the repo
-* Commit to your local branch (which must be different from `master`)
-* Submit your Pull Request (be sure to include tests and update documentation)
-
-### Options
-
-`httpProxy.createProxyServer` supports the following options:
-
-* **target**: url string to be parsed with the url module
-* **forward**: url string to be parsed with the url module
-* **agent**: object to be passed to http(s).request (see Node's [https agent](http://nodejs.org/api/https.html#https_class_https_agent) and [http agent](http://nodejs.org/api/http.html#http_class_http_agent) objects)
-* **ssl**: object to be passed to https.createServer()
-* **ws**: true/false, if you want to proxy websockets
-* **xfwd**: true/false, adds x-forward headers
-* **secure**: true/false, if you want to verify the SSL Certs
-* **toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
-* **prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path
-* **ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request
-* **localAddress**: Local interface string to bind for outgoing connections
-* **changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL
-* **auth**: Basic authentication i.e. 'user:password' to compute an Authorization header.
-* **hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
-* **autoRewrite**: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
-* **protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
-
-**NOTE:**
-`options.ws` and `options.ssl` are optional.
-`options.target` and `options.forward` cannot both be missing
-
-If you are using the `proxyServer.listen` method, the following options are also applicable:
-
- * **ssl**: object to be passed to https.createServer()
- * **ws**: true/false, if you want to proxy websockets
-
-### Shutdown
-
-* When testing or running server within another program it may be necessary to close the proxy.
-* This will stop the proxy from accepting new connections.
-
-```js
-var proxy = new httpProxy.createProxyServer({
- target: {
- host: 'localhost',
- port: 1337
- }
-});
-
-proxy.close();
-```
-
-### Test
-
-```
-$ npm test
-```
-
-### Logo
-
-Logo created by [Diego Pasquali](http://dribbble.com/diegopq)
-
-### License
-
->The MIT License (MIT)
->
->Copyright (c) 2010 - 2013 Nodejitsu Inc.
->
->Permission is hereby granted, free of charge, to any person obtaining a copy
->of this software and associated documentation files (the "Software"), to deal
->in the Software without restriction, including without limitation the rights
->to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
->copies of the Software, and to permit persons to whom the Software is
->furnished to do so, subject to the following conditions:
->
->The above copyright notice and this permission notice shall be included in
->all copies or substantial portions of the Software.
->
->THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
->IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
->FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
->AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
->LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
->OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
->THE SOFTWARE.
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/index.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/index.js
deleted file mode 100644
index e6fac85..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*!
- * Caron dimonio, con occhi di bragia
- * loro accennando, tutte le raccoglie;
- * batte col remo qualunque s’adagia
- *
- * Charon the demon, with the eyes of glede,
- * Beckoning to them, collects them all together,
- * Beats with his oar whoever lags behind
- *
- * Dante - The Divine Comedy (Canto III)
- */
-
-module.exports = require('./lib/http-proxy');
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy.js
deleted file mode 100644
index 365aced..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var http = require('http'),
- https = require('https'),
- url = require('url'),
- httpProxy = require('./http-proxy/');
-
-/**
- * Export the proxy "Server" as the main export.
- */
-module.exports = httpProxy.Server;
-
-/**
- * Creates the proxy server.
- *
- * Examples:
- *
- * httpProxy.createProxyServer({ .. }, 8000)
- * // => '{ web: [Function], ws: [Function] ... }'
- *
- * @param {Object} Options Config object passed to the proxy
- *
- * @return {Object} Proxy Proxy object with handlers for `ws` and `web` requests
- *
- * @api public
- */
-
-module.exports.createProxyServer =
- module.exports.createServer =
- module.exports.createProxy = function createProxyServer(options) {
- /*
- * `options` is needed and it must have the following layout:
- *
- * {
- * target :
- * forward:
- * agent :
- * ssl :
- * ws :
- * xfwd :
- * secure :
- * toProxy:
- * prependPath:
- * ignorePath:
- * localAddress :
- * changeOrigin:
- * auth : Basic authentication i.e. 'user:password' to compute an Authorization header.
- * hostRewrite: rewrites the location hostname on (301/302/307/308) redirects, Default: null.
- * autoRewrite: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
- * protocolRewrite: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
- * }
- *
- * NOTE: `options.ws` and `options.ssl` are optional.
- * `options.target and `options.forward` cannot be
- * both missing
- * }
- */
-
- return new httpProxy.Server(options);
-};
-
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/common.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/common.js
deleted file mode 100644
index 577f9b4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/common.js
+++ /dev/null
@@ -1,206 +0,0 @@
-var common = exports,
- url = require('url'),
- extend = require('util')._extend,
- required = require('requires-port');
-
-var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i,
- isSSL = /^https|wss/;
-
-/**
- * Simple Regex for testing if protocol is https
- */
-common.isSSL = isSSL;
-/**
- * Copies the right headers from `options` and `req` to
- * `outgoing` which is then used to fire the proxied
- * request.
- *
- * Examples:
- *
- * common.setupOutgoing(outgoing, options, req)
- * // => { host: ..., hostname: ...}
- *
- * @param {Object} Outgoing Base object to be filled with required properties
- * @param {Object} Options Config object passed to the proxy
- * @param {ClientRequest} Req Request Object
- * @param {String} Forward String to select forward or target
- *
- * @return {Object} Outgoing Object with all required properties set
- *
- * @api private
- */
-
-common.setupOutgoing = function(outgoing, options, req, forward) {
- outgoing.port = options[forward || 'target'].port ||
- (isSSL.test(options[forward || 'target'].protocol) ? 443 : 80);
-
- ['host', 'hostname', 'socketPath', 'pfx', 'key',
- 'passphrase', 'cert', 'ca', 'ciphers', 'secureProtocol'].forEach(
- function(e) { outgoing[e] = options[forward || 'target'][e]; }
- );
-
- outgoing.method = req.method;
- outgoing.headers = extend({}, req.headers);
-
- if (options.headers){
- extend(outgoing.headers, options.headers);
- }
-
- if (options.auth) {
- outgoing.auth = options.auth;
- }
-
- if (isSSL.test(options[forward || 'target'].protocol)) {
- outgoing.rejectUnauthorized = (typeof options.secure === "undefined") ? true : options.secure;
- }
-
-
- outgoing.agent = options.agent || false;
- outgoing.localAddress = options.localAddress;
-
- //
- // Remark: If we are false and not upgrading, set the connection: close. This is the right thing to do
- // as node core doesn't handle this COMPLETELY properly yet.
- //
- if (!outgoing.agent) {
- outgoing.headers = outgoing.headers || {};
- if (typeof outgoing.headers.connection !== 'string'
- || !upgradeHeader.test(outgoing.headers.connection)
- ) { outgoing.headers.connection = 'close'; }
- }
-
-
- // the final path is target path + relative path requested by user:
- var target = options[forward || 'target'];
- var targetPath = target && options.prependPath !== false
- ? (target.path || '')
- : '';
-
- //
- // Remark: Can we somehow not use url.parse as a perf optimization?
- //
- var outgoingPath = !options.toProxy
- ? (url.parse(req.url).path || '')
- : req.url;
-
- //
- // Remark: ignorePath will just straight up ignore whatever the request's
- // path is. This can be labeled as FOOT-GUN material if you do not know what
- // you are doing and are using conflicting options.
- //
- outgoingPath = !options.ignorePath ? outgoingPath : '/';
-
- outgoing.path = common.urlJoin(targetPath, outgoingPath);
-
- if (options.changeOrigin) {
- outgoing.headers.host =
- required(outgoing.port, options[forward || 'target'].protocol) && !hasPort(outgoing.host)
- ? outgoing.host + ':' + outgoing.port
- : outgoing.host;
- }
- return outgoing;
-};
-
-/**
- * Set the proper configuration for sockets,
- * set no delay and set keep alive, also set
- * the timeout to 0.
- *
- * Examples:
- *
- * common.setupSocket(socket)
- * // => Socket
- *
- * @param {Socket} Socket instance to setup
- *
- * @return {Socket} Return the configured socket.
- *
- * @api private
- */
-
-common.setupSocket = function(socket) {
- socket.setTimeout(0);
- socket.setNoDelay(true);
-
- socket.setKeepAlive(true, 0);
-
- return socket;
-};
-
-/**
- * Get the port number from the host. Or guess it based on the connection type.
- *
- * @param {Request} req Incoming HTTP request.
- *
- * @return {String} The port number.
- *
- * @api private
- */
-common.getPort = function(req) {
- var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : '';
-
- return res ?
- res[1] :
- common.hasEncryptedConnection(req) ? '443' : '80';
-};
-
-/**
- * Check if the request has an encrypted connection.
- *
- * @param {Request} req Incoming HTTP request.
- *
- * @return {Boolean} Whether the connection is encrypted or not.
- *
- * @api private
- */
-common.hasEncryptedConnection = function(req) {
- return Boolean(req.connection.encrypted || req.connection.pair);
-};
-
-/**
- * OS-agnostic join (doesn't break on URLs like path.join does on Windows)>
- *
- * @return {String} The generated path.
- *
- * @api private
- */
-
-common.urlJoin = function() {
- //
- // We do not want to mess with the query string. All we want to touch is the path.
- //
- var args = Array.prototype.slice.call(arguments),
- lastIndex = args.length - 1,
- last = args[lastIndex],
- lastSegs = last.split('?'),
- retSegs;
-
- args[lastIndex] = lastSegs.shift();
-
- //
- // Join all strings, but remove empty strings so we don't get extra slashes from
- // joining e.g. ['', 'am']
- //
- retSegs = [
- args.filter(Boolean).join('/').replace(/\/+/g, '/').replace(/:\//g, '://')
- ];
-
- // Only join the query string if it exists so we don't have trailing a '?'
- // on every request
-
- // Handle case where there could be multiple ? in the URL.
- retSegs.push.apply(retSegs, lastSegs);
-
- return retSegs.join('?')
-};
-
-/**
- * Check the host and see if it potentially has a port in it (keep it simple)
- *
- * @returns {Boolean} Whether we have one or not
- *
- * @api private
- */
-function hasPort(host) {
- return !!~host.indexOf(':');
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/index.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/index.js
deleted file mode 100644
index 7a5e1d2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/index.js
+++ /dev/null
@@ -1,184 +0,0 @@
-var httpProxy = exports,
- extend = require('util')._extend,
- parse_url = require('url').parse,
- EE3 = require('eventemitter3'),
- http = require('http'),
- https = require('https'),
- web = require('./passes/web-incoming'),
- ws = require('./passes/ws-incoming');
-
-httpProxy.Server = ProxyServer;
-
-/**
- * Returns a function that creates the loader for
- * either `ws` or `web`'s passes.
- *
- * Examples:
- *
- * httpProxy.createRightProxy('ws')
- * // => [Function]
- *
- * @param {String} Type Either 'ws' or 'web'
- *
- * @return {Function} Loader Function that when called returns an iterator for the right passes
- *
- * @api private
- */
-
-function createRightProxy(type) {
-
- return function(options) {
- return function(req, res /*, [head], [opts] */) {
- var passes = (type === 'ws') ? this.wsPasses : this.webPasses,
- args = [].slice.call(arguments),
- cntr = args.length - 1,
- head, cbl;
-
- /* optional args parse begin */
- if(typeof args[cntr] === 'function') {
- cbl = args[cntr];
-
- cntr--;
- }
-
- if(
- !(args[cntr] instanceof Buffer) &&
- args[cntr] !== res
- ) {
- //Copy global options
- options = extend({}, options);
- //Overwrite with request options
- extend(options, args[cntr]);
-
- cntr--;
- }
-
- if(args[cntr] instanceof Buffer) {
- head = args[cntr];
- }
-
- /* optional args parse end */
-
- ['target', 'forward'].forEach(function(e) {
- if (typeof options[e] === 'string')
- options[e] = parse_url(options[e]);
- });
-
- if (!options.target && !options.forward) {
- return this.emit('error', new Error('Must provide a proper URL as target'));
- }
-
- for(var i=0; i < passes.length; i++) {
- /**
- * Call of passes functions
- * pass(req, res, options, head)
- *
- * In WebSockets case the `res` variable
- * refer to the connection socket
- * pass(req, socket, options, head)
- */
- if(passes[i](req, res, options, head, this, cbl)) { // passes can return a truthy value to halt the loop
- break;
- }
- }
- };
- };
-}
-httpProxy.createRightProxy = createRightProxy;
-
-function ProxyServer(options) {
- EE3.call(this);
-
- options = options || {};
- options.prependPath = options.prependPath === false ? false : true;
-
- this.web = this.proxyRequest = createRightProxy('web')(options);
- this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options);
- this.options = options;
-
- this.webPasses = Object.keys(web).map(function(pass) {
- return web[pass];
- });
-
- this.wsPasses = Object.keys(ws).map(function(pass) {
- return ws[pass];
- });
-
- this.on('error', this.onError, this);
-
-}
-
-require('util').inherits(ProxyServer, EE3);
-
-ProxyServer.prototype.onError = function (err) {
- //
- // Remark: Replicate node core behavior using EE3
- // so we force people to handle their own errors
- //
- if(this.listeners('error').length === 1) {
- throw err;
- }
-};
-
-ProxyServer.prototype.listen = function(port, hostname) {
- var self = this,
- closure = function(req, res) { self.web(req, res); };
-
- this._server = this.options.ssl ?
- https.createServer(this.options.ssl, closure) :
- http.createServer(closure);
-
- if(this.options.ws) {
- this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });
- }
-
- this._server.listen(port, hostname);
-
- return this;
-};
-
-ProxyServer.prototype.close = function(callback) {
- var self = this;
- if (this._server) {
- this._server.close(done);
- }
-
- // Wrap callback to nullify server after all open connections are closed.
- function done() {
- self._server = null;
- if (callback) {
- callback.apply(null, arguments);
- }
- };
-};
-
-ProxyServer.prototype.before = function(type, passName, callback) {
- if (type !== 'ws' && type !== 'web') {
- throw new Error('type must be `web` or `ws`');
- }
- var passes = (type === 'ws') ? this.wsPasses : this.webPasses,
- i = false;
-
- passes.forEach(function(v, idx) {
- if(v.name === passName) i = idx;
- })
-
- if(i === false) throw new Error('No such pass');
-
- passes.splice(i, 0, callback);
-};
-ProxyServer.prototype.after = function(type, passName, callback) {
- if (type !== 'ws' && type !== 'web') {
- throw new Error('type must be `web` or `ws`');
- }
- var passes = (type === 'ws') ? this.wsPasses : this.webPasses,
- i = false;
-
- passes.forEach(function(v, idx) {
- if(v.name === passName) i = idx;
- })
-
- if(i === false) throw new Error('No such pass');
-
- passes.splice(i++, 0, callback);
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
deleted file mode 100644
index 4070eb3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
+++ /dev/null
@@ -1,166 +0,0 @@
-var http = require('http'),
- https = require('https'),
- web_o = require('./web-outgoing'),
- common = require('../common'),
- passes = exports;
-
-web_o = Object.keys(web_o).map(function(pass) {
- return web_o[pass];
-});
-
-/*!
- * Array of passes.
- *
- * A `pass` is just a function that is executed on `req, res, options`
- * so that you can easily add new checks while still keeping the base
- * flexible.
- */
-
-[ // <--
-
- /**
- * Sets `content-length` to '0' if request is of DELETE type.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function deleteLength(req, res, options) {
- if((req.method === 'DELETE' || req.method === 'OPTIONS')
- && !req.headers['content-length']) {
- req.headers['content-length'] = '0';
- }
- },
-
- /**
- * Sets timeout in request socket if it was specified in options.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function timeout(req, res, options) {
- if(options.timeout) {
- req.socket.setTimeout(options.timeout);
- }
- },
-
- /**
- * Sets `x-forwarded-*` headers if specified in config.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function XHeaders(req, res, options) {
- if(!options.xfwd) return;
-
- var encrypted = req.isSpdy || common.hasEncryptedConnection(req);
- var values = {
- for : req.connection.remoteAddress || req.socket.remoteAddress,
- port : common.getPort(req),
- proto: encrypted ? 'https' : 'http'
- };
-
- ['for', 'port', 'proto'].forEach(function(header) {
- req.headers['x-forwarded-' + header] =
- (req.headers['x-forwarded-' + header] || '') +
- (req.headers['x-forwarded-' + header] ? ',' : '') +
- values[header];
- });
- },
-
- /**
- * Does the actual proxying. If `forward` is enabled fires up
- * a ForwardStream, same happens for ProxyStream. The request
- * just dies otherwise.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function stream(req, res, options, _, server, clb) {
-
- // And we begin!
- server.emit('start', req, res, options.target)
- if(options.forward) {
- // If forward enable, so just pipe the request
- var forwardReq = (options.forward.protocol === 'https:' ? https : http).request(
- common.setupOutgoing(options.ssl || {}, options, req, 'forward')
- );
- (options.buffer || req).pipe(forwardReq);
- if(!options.target) { return res.end(); }
- }
-
- // Request initalization
- var proxyReq = (options.target.protocol === 'https:' ? https : http).request(
- common.setupOutgoing(options.ssl || {}, options, req)
- );
-
- // Enable developers to modify the proxyReq before headers are sent
- proxyReq.on('socket', function(socket) {
- if(server) { server.emit('proxyReq', proxyReq, req, res, options); }
- });
-
- // allow outgoing socket to timeout so that we could
- // show an error page at the initial request
- if(options.proxyTimeout) {
- proxyReq.setTimeout(options.proxyTimeout, function() {
- proxyReq.abort();
- });
- }
-
- // Ensure we abort proxy if request is aborted
- req.on('aborted', function () {
- proxyReq.abort();
- });
-
- // Handle errors on incoming request as well as it makes sense to
- req.on('error', proxyError);
-
- // Error Handler
- proxyReq.on('error', proxyError);
-
- function proxyError (err){
- if (clb) {
- clb(err, req, res, options.target);
- } else {
- server.emit('error', err, req, res, options.target);
- }
- }
-
- (options.buffer || req).pipe(proxyReq);
-
- proxyReq.on('response', function(proxyRes) {
- if(server) { server.emit('proxyRes', proxyRes, req, res); }
- for(var i=0; i < web_o.length; i++) {
- if(web_o[i](req, res, proxyRes, options)) { break; }
- }
-
- // Allow us to listen when the proxy has completed
- proxyRes.on('end', function () {
- server.emit('end', req, res, proxyRes);
- });
-
- proxyRes.pipe(res);
- });
-
- //proxyReq.end();
- }
-
-] // <--
- .forEach(function(func) {
- passes[func.name] = func;
- });
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
deleted file mode 100644
index 977f1f7..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
+++ /dev/null
@@ -1,105 +0,0 @@
-var url = require('url'),
- passes = exports;
-
-var redirectRegex = /^30(1|2|7|8)$/;
-
-/*!
- * Array of passes.
- *
- * A `pass` is just a function that is executed on `req, res, options`
- * so that you can easily add new checks while still keeping the base
- * flexible.
- */
-
-[ // <--
-
- /**
- * If is a HTTP 1.0 request, remove chunk headers
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function removeChunked(req, res, proxyRes) {
- if (req.httpVersion === '1.0') {
- delete proxyRes.headers['transfer-encoding'];
- }
- },
-
- /**
- * If is a HTTP 1.0 request, set the correct connection header
- * or if connection header not present, then use `keep-alive`
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function setConnection(req, res, proxyRes) {
- if (req.httpVersion === '1.0') {
- proxyRes.headers.connection = req.headers.connection || 'close';
- } else if (!proxyRes.headers.connection) {
- proxyRes.headers.connection = req.headers.connection || 'keep-alive';
- }
- },
-
- function setRedirectHostRewrite(req, res, proxyRes, options) {
- if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite)
- && proxyRes.headers['location']
- && redirectRegex.test(proxyRes.statusCode)) {
- var target = url.parse(options.target);
- var u = url.parse(proxyRes.headers['location']);
-
- // make sure the redirected host matches the target host before rewriting
- if (target.host != u.host) {
- return;
- }
-
- if (options.hostRewrite) {
- u.host = options.hostRewrite;
- } else if (options.autoRewrite) {
- u.host = req.headers['host'];
- }
- if (options.protocolRewrite) {
- u.protocol = options.protocolRewrite;
- }
-
- proxyRes.headers['location'] = u.format();
- }
- },
- /**
- * Copy headers from proxyResponse to response
- * set each header in response object.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function writeHeaders(req, res, proxyRes) {
- Object.keys(proxyRes.headers).forEach(function(key) {
- res.setHeader(key, proxyRes.headers[key]);
- });
- },
-
- /**
- * Set the statusCode from the proxyResponse
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function writeStatusCode(req, res, proxyRes) {
- res.writeHead(proxyRes.statusCode);
- }
-
-] // <--
- .forEach(function(func) {
- passes[func.name] = func;
- });
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js b/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
deleted file mode 100644
index a6ddb31..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
+++ /dev/null
@@ -1,162 +0,0 @@
-var http = require('http'),
- https = require('https'),
- common = require('../common'),
- passes = exports;
-
-/*!
- * Array of passes.
- *
- * A `pass` is just a function that is executed on `req, socket, options`
- * so that you can easily add new checks while still keeping the base
- * flexible.
- */
-
-/*
- * Websockets Passes
- *
- */
-
-var passes = exports;
-
-[
- /**
- * WebSocket requests must have the `GET` method and
- * the `upgrade:websocket` header
- *
- * @param {ClientRequest} Req Request object
- * @param {Socket} Websocket
- *
- * @api private
- */
-
- function checkMethodAndHeader (req, socket) {
- if (req.method !== 'GET' || !req.headers.upgrade) {
- socket.destroy();
- return true;
- }
-
- if (req.headers.upgrade.toLowerCase() !== 'websocket') {
- socket.destroy();
- return true;
- }
- },
-
- /**
- * Sets `x-forwarded-*` headers if specified in config.
- *
- * @param {ClientRequest} Req Request object
- * @param {Socket} Websocket
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function XHeaders(req, socket, options) {
- if(!options.xfwd) return;
-
- var values = {
- for : req.connection.remoteAddress || req.socket.remoteAddress,
- port : common.getPort(req),
- proto: common.hasEncryptedConnection(req) ? 'wss' : 'ws'
- };
-
- ['for', 'port', 'proto'].forEach(function(header) {
- req.headers['x-forwarded-' + header] =
- (req.headers['x-forwarded-' + header] || '') +
- (req.headers['x-forwarded-' + header] ? ',' : '') +
- values[header];
- });
- },
-
- /**
- * Does the actual proxying. Make the request and upgrade it
- * send the Switching Protocols request and pipe the sockets.
- *
- * @param {ClientRequest} Req Request object
- * @param {Socket} Websocket
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
- function stream(req, socket, options, head, server, clb) {
- common.setupSocket(socket);
-
- if (head && head.length) socket.unshift(head);
-
-
- var proxyReq = (common.isSSL.test(options.target.protocol) ? https : http).request(
- common.setupOutgoing(options.ssl || {}, options, req)
- );
-
- // Enable developers to modify the proxyReq before headers are sent
- if (server) { server.emit('proxyReqWs', proxyReq, req, socket, options, head); }
-
- // Error Handler
- proxyReq.on('error', onOutgoingError);
- proxyReq.on('response', function (res) {
- // if upgrade event isn't going to happen, close the socket
- if (!res.upgrade) socket.end();
- });
-
- proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) {
- proxySocket.on('error', onOutgoingError);
-
- // Allow us to listen when the websocket has completed
- proxySocket.on('end', function () {
- server.emit('close', proxyRes, proxySocket, proxyHead);
- });
-
- // The pipe below will end proxySocket if socket closes cleanly, but not
- // if it errors (eg, vanishes from the net and starts returning
- // EHOSTUNREACH). We need to do that explicitly.
- socket.on('error', function () {
- proxySocket.end();
- });
-
- common.setupSocket(proxySocket);
-
- if (proxyHead && proxyHead.length) proxySocket.unshift(proxyHead);
-
- //
- // Remark: Handle writing the headers to the socket when switching protocols
- // Also handles when a header is an array
- //
- socket.write(
- Object.keys(proxyRes.headers).reduce(function (head, key) {
- var value = proxyRes.headers[key];
-
- if (!Array.isArray(value)) {
- head.push(key + ': ' + value);
- return head;
- }
-
- for (var i = 0; i < value.length; i++) {
- head.push(key + ': ' + value[i]);
- }
- return head;
- }, ['HTTP/1.1 101 Switching Protocols'])
- .join('\r\n') + '\r\n\r\n'
- );
-
- proxySocket.pipe(socket).pipe(proxySocket);
-
- server.emit('open', proxySocket);
- server.emit('proxySocket', proxySocket); //DEPRECATED.
- });
-
- return proxyReq.end(); // XXX: CHECK IF THIS IS THIS CORRECT
-
- function onOutgoingError(err) {
- if (clb) {
- clb(err, req, socket);
- } else {
- server.emit('error', err, req, socket);
- }
- socket.end();
- }
- }
-
-] // <--
- .forEach(function(func) {
- passes[func.name] = func;
- });
diff --git a/topics/00. Course-introduction/slides/node_modules/http-proxy/package.json b/topics/00. Course-introduction/slides/node_modules/http-proxy/package.json
deleted file mode 100644
index 871cb4e..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-proxy/package.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "_args": [
- [
- "http-proxy@^1.8.1",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "http-proxy@>=1.8.1 <2.0.0",
- "_id": "http-proxy@1.12.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/http-proxy",
- "_nodeVersion": "4.2.1",
- "_npmUser": {
- "email": "jcrugzz@gmail.com",
- "name": "jcrugzz"
- },
- "_npmVersion": "2.14.7",
- "_phantomChildren": {},
- "_requested": {
- "name": "http-proxy",
- "raw": "http-proxy@^1.8.1",
- "rawSpec": "^1.8.1",
- "scope": null,
- "spec": ">=1.8.1 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.12.0.tgz",
- "_shasum": "4f02ea971e79e6affa12fa5f10ca2aebb5e3b17c",
- "_shrinkwrap": null,
- "_spec": "http-proxy@^1.8.1",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "info@nodejitsu.com",
- "name": "Nodejitsu Inc."
- },
- "bugs": {
- "url": "https://github.com/nodejitsu/node-http-proxy/issues"
- },
- "dependencies": {
- "eventemitter3": "1.x.x",
- "requires-port": "0.x.x"
- },
- "description": "HTTP proxying for the masses",
- "devDependencies": {
- "async": "*",
- "blanket": "*",
- "coveralls": "*",
- "dox": "*",
- "expect.js": "*",
- "mocha": "*",
- "mocha-lcov-reporter": "*",
- "semver": "^4.3.3",
- "socket.io": "*",
- "socket.io-client": "*",
- "ws": "~0.5.0"
- },
- "directories": {},
- "dist": {
- "shasum": "4f02ea971e79e6affa12fa5f10ca2aebb5e3b17c",
- "tarball": "http://registry.npmjs.org/http-proxy/-/http-proxy-1.12.0.tgz"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "gitHead": "b5a6d0e58396363f4c457f6d1654614bdfcfcb73",
- "homepage": "https://github.com/nodejitsu/node-http-proxy#readme",
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- },
- {
- "name": "cronopio",
- "email": "aristizabal.daniel@gmail.com"
- },
- {
- "name": "yawnt",
- "email": "yawn.localhost@gmail.com"
- },
- {
- "name": "jcrugzz",
- "email": "jcrugzz@gmail.com"
- }
- ],
- "name": "http-proxy",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/nodejitsu/node-http-proxy.git"
- },
- "scripts": {
- "coveralls": "mocha --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js",
- "test": "mocha -R landing test/*-test.js",
- "test-cov": "mocha --require blanket -R html-cov > cov/coverage.html"
- },
- "version": "1.12.0"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/.npmignore b/topics/00. Course-introduction/slides/node_modules/http-server/.npmignore
deleted file mode 100644
index 5894e20..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/*
-!node_modules/node-static
-npm-debug.log
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/.travis.yml b/topics/00. Course-introduction/slides/node_modules/http-server/.travis.yml
deleted file mode 100644
index 6d1d5b6..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - "0.10"
- - "0.12"
- - "4.1"
-
-before_install:
- - travis_retry npm install -g npm@2.14.5
- - travis_retry npm install
-
-script:
- - npm test
-
-matrix:
- allow_failures:
- - node_js: "0.10"
-
-notifications:
- email:
- - travis@nodejitsu.com
- irc: "irc.freenode.org#nodejitsu"
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/LICENSE b/topics/00. Course-introduction/slides/node_modules/http-server/LICENSE
deleted file mode 100644
index 1e989b4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2011 Charlie Robbins, Marak Squires, and the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/README.md b/topics/00. Course-introduction/slides/node_modules/http-server/README.md
deleted file mode 100644
index ff85ba8..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# http-server: a command-line http server
-
-`http-server` is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.
-
-![](https://github.com/nodeapps/http-server/raw/master/screenshots/public.png)
-
-# Installing globally:
-
-Installation via `npm`. If you don't have `npm` yet:
-
- curl https://npmjs.org/install.sh | sh
-
-Once you have `npm`:
-
- npm install http-server -g
-
-This will install `http-server` globally so that it may be run from the command line.
-
-## Usage:
-
- http-server [path] [options]
-
-`[path]` defaults to `./public` if the folder exists, and `./` otherwise.
-
-# Installing as a node app
-
- mkdir myapp
- cd myapp/
- jitsu install http-server
-
-*If you do not have `jitsu` installed you can install it via `npm install jitsu -g`*
-
-## Usage
-
-### Starting http-server locally
-
- node bin/http-server
-
-*Now you can visit http://localhost:8080 to view your server*
-
-### Deploy http-server to nodejitsu
-
- jitsu deploy
-
-*You will now be prompted for a `subdomain` to deploy your application on*
-
-## Available Options:
-
-`-p` Port to use (defaults to 8080)
-
-`-a` Address to use (defaults to 0.0.0.0)
-
-`-d` Show directory listings (defaults to 'True')
-
-`-i` Display autoIndex (defaults to 'True')
-
-`-e` or `--ext` Default file extension if none supplied (defaults to 'html')
-
-`-s` or `--silent` Suppress log messages from output
-
-`--cors` Enable CORS via the `Access-Control-Allow-Origin` header
-
-`-o` Open browser window after staring the server
-
-`-c` Set cache time (in seconds) for cache-control max-age header, e.g. -c10 for 10 seconds (defaults to '3600'). To disable caching, use -c-1.
-
-`-P` or `--proxy` Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com
-
-`-S` or `--ssl` Enable https.
-
-`-C` or `--cert` Path to ssl cert file (default: cert.pem).
-
-`-K` or `--key` Path to ssl key file (default: key.pem).
-
-`-r` or `--robots` Provide a /robots.txt (whose content defaults to 'User-agent: *\nDisallow: /')
-
-`-h` or `--help` Print this list and exit.
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/bin/http-server b/topics/00. Course-introduction/slides/node_modules/http-server/bin/http-server
deleted file mode 100755
index 8b3de28..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/bin/http-server
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var colors = require('colors'),
- os = require('os'),
- httpServer = require('../lib/http-server'),
- portfinder = require('portfinder'),
- opener = require('opener'),
- argv = require('optimist')
- .boolean('cors')
- .argv;
-
-var ifaces = os.networkInterfaces();
-
-if (argv.h || argv.help) {
- console.log([
- 'usage: http-server [path] [options]',
- '',
- 'options:',
- ' -p Port to use [8080]',
- ' -a Address to use [0.0.0.0]',
- ' -d Show directory listings [true]',
- ' -i Display autoIndex [true]',
- ' -e --ext Default file extension if none supplied [none]',
- ' -s --silent Suppress log messages from output',
- ' --cors Enable CORS via the "Access-Control-Allow-Origin" header',
- ' -o [path] Open browser window after starting the server',
- ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.',
- ' To disable caching, use -c-1.',
- '',
- ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com',
- '',
- ' -S --ssl Enable https.',
- ' -C --cert Path to ssl cert file (default: cert.pem).',
- ' -K --key Path to ssl key file (default: key.pem).',
- '',
- ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
- ' -h --help Print this list and exit.'
- ].join('\n'));
- process.exit();
-}
-
-var port = argv.p || parseInt(process.env.PORT, 10),
- host = argv.a || '0.0.0.0',
- ssl = !!argv.S || !!argv.ssl,
- proxy = argv.P || argv.proxy,
- logger;
-
-if (!argv.s && !argv.silent) {
- logger = {
- info: console.log,
- request: function (req, res, error) {
- var date = new Date().toUTCString();
- if (error) {
- logger.info(
- '[%s] "%s %s" Error (%s): "%s"',
- date, req.method.red, req.url.red,
- error.status.toString().red, error.message.red
- );
- }
- else {
- logger.info(
- '[%s] "%s %s" "%s"',
- date, req.method.cyan, req.url.cyan,
- req.headers['user-agent']
- );
- }
- }
- };
-}
-else if (colors) {
- logger = {
- info: function () {},
- request: function () {}
- };
-}
-
-if (!port) {
- portfinder.basePort = 8080;
- portfinder.getPort(function (err, port) {
- if (err) { throw err; }
- listen(port);
- });
-}
-else {
- listen(port);
-}
-
-function listen(port) {
- var options = {
- root: argv._[0],
- cache: argv.c,
- showDir: argv.d,
- autoIndex: argv.i,
- robots: argv.r || argv.robots,
- ext: argv.e || argv.ext,
- logFn: logger.request,
- proxy: proxy
- };
-
- if (argv.cors) {
- options.cors = true;
- }
-
- if (ssl) {
- options.https = {
- cert: argv.C || argv.cert || 'cert.pem',
- key: argv.K || argv.key || 'key.pem'
- };
- }
-
- var server = httpServer.createServer(options);
- server.listen(port, host, function () {
- var canonicalHost = host === '0.0.0.0' ? '127.0.0.1' : host,
- protocol = ssl ? 'https:' : 'http:';
-
- logger.info(['Starting up http-server, serving '.yellow,
- server.root.cyan,
- ssl ? (' through'.yellow + ' https'.cyan) : '',
- '\nAvailable on:'.yellow
- ].join(''));
-
- Object.keys(ifaces).forEach(function (dev) {
- ifaces[dev].forEach(function (details) {
- if (details.family === 'IPv4') {
- logger.info((' ' + protocol + details.address + ':' + port.toString()).green);
- }
- });
- });
-
- if (typeof proxy === 'string') {
- logger.info('Unhandled requests will be served from: ' + proxy);
- }
-
- logger.info('Hit CTRL-C to stop the server');
- if (argv.o) {
- opener(
- protocol + '//' + canonicalHost + ':' + port,
- { command: argv.o !== true ? argv.o : null }
- );
- }
- });
-}
-
-if (process.platform === 'win32') {
- require('readline').createInterface({
- input: process.stdin,
- output: process.stdout
- }).on('SIGINT', function () {
- process.emit('SIGINT');
- });
-}
-
-process.on('SIGINT', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
-
-process.on('SIGTERM', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/lib/http-server.js b/topics/00. Course-introduction/slides/node_modules/http-server/lib/http-server.js
deleted file mode 100644
index daddcaa..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/lib/http-server.js
+++ /dev/null
@@ -1,134 +0,0 @@
-'use strict';
-
-var fs = require('fs'),
- union = require('union'),
- ecstatic = require('ecstatic'),
- httpProxy = require('http-proxy'),
- corser = require('corser');
-
-//
-// Remark: backwards compatibility for previous
-// case convention of HTTP
-//
-exports.HttpServer = exports.HTTPServer = HttpServer;
-
-/**
- * Returns a new instance of HttpServer with the
- * specified `options`.
- */
-exports.createServer = function (options) {
- return new HttpServer(options);
-};
-
-/**
- * Constructor function for the HttpServer object
- * with is responsible for serving static files along
- * with other HTTP-related features.
- */
-function HttpServer(options) {
- options = options || {};
-
- if (options.root) {
- this.root = options.root;
- }
- else {
- try {
- fs.lstatSync('./public');
- this.root = './public';
- }
- catch (err) {
- this.root = './';
- }
- }
-
- this.headers = options.headers || {};
-
- this.cache = options.cache === undefined ? 3600 : options.cache; // in seconds.
- this.showDir = options.showDir !== 'false';
- this.autoIndex = options.autoIndex !== 'false';
- this.contentType = options.contentType || 'application/octet-stream';
-
- if (options.ext) {
- this.ext = options.ext === true
- ? 'html'
- : options.ext;
- }
-
- var before = options.before ? options.before.slice() : [];
-
- before.push(function (req, res) {
- if (options.logFn) {
- options.logFn(req, res);
- }
-
- res.emit('next');
- });
-
- if (options.cors) {
- this.headers['Access-Control-Allow-Origin'] = '*';
- this.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Range';
-
- before.push(corser.create());
- }
-
- if (options.robots) {
- before.push(function (req, res) {
- if (req.url === '/robots.txt') {
- res.setHeader('Content-Type', 'text/plain');
- var robots = options.robots === true
- ? 'User-agent: *\nDisallow: /'
- : options.robots.replace(/\\n/, '\n');
-
- return res.end(robots);
- }
-
- res.emit('next');
- });
- }
-
- before.push(ecstatic({
- root: this.root,
- cache: this.cache,
- showDir: this.showDir,
- autoIndex: this.autoIndex,
- defaultExt: this.ext,
- contentType: this.contentType,
- handleError: typeof options.proxy !== 'string'
- }));
-
- if (typeof options.proxy === 'string') {
- var proxy = httpProxy.createProxyServer({});
- before.push(function (req, res) {
- proxy.web(req, res, {
- target: options.proxy,
- changeOrigin: true
- });
- });
- }
-
- var serverOptions = {
- before: before,
- headers: this.headers,
- onError: function (err, req, res) {
- if (options.logFn) {
- options.logFn(req, res, err);
- }
-
- res.end();
- }
- };
-
- if (options.https) {
- serverOptions.https = options.https;
- }
-
- this.server = union.createServer(serverOptions);
-}
-
-HttpServer.prototype.listen = function () {
- this.server.listen.apply(this.server, arguments);
-};
-
-HttpServer.prototype.close = function () {
- return this.server.close();
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/package.json b/topics/00. Course-introduction/slides/node_modules/http-server/package.json
deleted file mode 100644
index 47cc953..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/package.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "_args": [
- [
- "http-server@^0.8.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides"
- ]
- ],
- "_from": "http-server@>=0.8.0 <0.9.0",
- "_id": "http-server@0.8.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/http-server",
- "_nodeVersion": "0.12.7",
- "_npmUser": {
- "email": "charlie.robbins@gmail.com",
- "name": "indexzero"
- },
- "_npmVersion": "2.14.5",
- "_phantomChildren": {},
- "_requested": {
- "name": "http-server",
- "raw": "http-server@^0.8.0",
- "rawSpec": "^0.8.0",
- "scope": null,
- "spec": ">=0.8.0 <0.9.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/http-server/-/http-server-0.8.5.tgz",
- "_shasum": "bbf27c9f09499e51a1fe1f979a6f39a45a04f2fb",
- "_shrinkwrap": null,
- "_spec": "http-server@^0.8.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides",
- "bin": {
- "hs": "./bin/http-server",
- "http-server": "./bin/http-server"
- },
- "bugs": {
- "url": "https://github.com/nodeapps/http-server/issues"
- },
- "contributors": [
- {
- "name": "Charlie Robbins",
- "email": "charlie.robbins@gmail.com"
- },
- {
- "name": "Marak Squires",
- "email": "marak.squires@gmail.com"
- },
- {
- "name": "Charlie McConnell",
- "email": "charlie@charlieistheman.com"
- },
- {
- "name": "Joshua Holbrook",
- "email": "josh.holbrook@gmail.com"
- },
- {
- "name": "Maciej Małecki",
- "email": "maciej.malecki@notimplemented.org"
- },
- {
- "name": "Matthew Bergman",
- "email": "mzbphoto@gmail.com"
- },
- {
- "name": "brad dunbar",
- "email": "dunbarb2@gmail.com"
- },
- {
- "name": "Dominic Tarr"
- },
- {
- "name": "Travis Person",
- "email": "travis.person@gmail.com"
- },
- {
- "name": "Jinkwon Lee",
- "email": "master@bdyne.net"
- }
- ],
- "dependencies": {
- "colors": "1.0.3",
- "corser": "~2.0.0",
- "ecstatic": "~0.7.0",
- "http-proxy": "^1.8.1",
- "opener": "~1.4.0",
- "optimist": "0.6.x",
- "portfinder": "0.4.x",
- "union": "~0.4.3"
- },
- "description": "A simple zero-configuration command-line http server",
- "devDependencies": {
- "common-style": "^3.0.0",
- "request": "2.49.x",
- "vows": "0.7.x"
- },
- "directories": {},
- "dist": {
- "shasum": "bbf27c9f09499e51a1fe1f979a6f39a45a04f2fb",
- "tarball": "http://registry.npmjs.org/http-server/-/http-server-0.8.5.tgz"
- },
- "gitHead": "b8975be281a5705e71218597940e53034ebe41d4",
- "homepage": "https://github.com/indexzero/http-server#readme",
- "keywords": [
- "cli",
- "command"
- ],
- "license": "MIT",
- "main": "./lib/http-server",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- }
- ],
- "name": "http-server",
- "optionalDependencies": {},
- "preferGlobal": "true",
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/indexzero/http-server.git"
- },
- "scripts": {
- "pretest": "common bin/http-server lib/ test",
- "start": "node ./bin/http-server",
- "test": "vows --spec --isolate"
- },
- "version": "0.8.5"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/public/404.html b/topics/00. Course-introduction/slides/node_modules/http-server/public/404.html
deleted file mode 100644
index 03d348d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/public/404.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- 404
-
-
- 404
-
- Were you just making up filenames or what?
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/public/img/turtle.png b/topics/00. Course-introduction/slides/node_modules/http-server/public/img/turtle.png
deleted file mode 100644
index 721a796..0000000
Binary files a/topics/00. Course-introduction/slides/node_modules/http-server/public/img/turtle.png and /dev/null differ
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/public/index.html b/topics/00. Course-introduction/slides/node_modules/http-server/public/index.html
deleted file mode 100644
index 12cafb2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/public/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- node.js http server
-
-
-
- Serving up static files like they were turtles strapped to rockets.
-
-
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/directory.png b/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/directory.png
deleted file mode 100644
index b255cea..0000000
Binary files a/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/directory.png and /dev/null differ
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/public.png b/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/public.png
deleted file mode 100644
index aa007bd..0000000
Binary files a/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/public.png and /dev/null differ
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/start.png b/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/start.png
deleted file mode 100644
index d4ea2b8..0000000
Binary files a/topics/00. Course-introduction/slides/node_modules/http-server/screenshots/start.png and /dev/null differ
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/test/fixtures/root/canYouSeeMe b/topics/00. Course-introduction/slides/node_modules/http-server/test/fixtures/root/canYouSeeMe
deleted file mode 100644
index c20d87f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/test/fixtures/root/canYouSeeMe
+++ /dev/null
@@ -1,2 +0,0 @@
-I bet you can. I'm in your index.
-
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/test/fixtures/root/file b/topics/00. Course-introduction/slides/node_modules/http-server/test/fixtures/root/file
deleted file mode 100644
index ca06ae2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/test/fixtures/root/file
+++ /dev/null
@@ -1,2 +0,0 @@
-hello, I know nodejitsu
-
diff --git a/topics/00. Course-introduction/slides/node_modules/http-server/test/http-server-test.js b/topics/00. Course-introduction/slides/node_modules/http-server/test/http-server-test.js
deleted file mode 100644
index a9240b2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/http-server/test/http-server-test.js
+++ /dev/null
@@ -1,154 +0,0 @@
-var assert = require('assert'),
- path = require('path'),
- fs = require('fs'),
- vows = require('vows'),
- request = require('request'),
- httpServer = require('../lib/http-server');
-
-var root = path.join(__dirname, 'fixtures', 'root');
-
-vows.describe('http-server').addBatch({
- 'When http-server is listening on 8080': {
- topic: function () {
- var server = httpServer.createServer({
- root: root,
- robots: true,
- headers: {
- 'Access-Control-Allow-Origin': '*',
- 'Access-Control-Allow-Credentials': 'true'
- }
- });
-
- server.listen(8080);
- this.callback(null, server);
- },
- 'it should serve files from root directory': {
- topic: function () {
- request('http://127.0.0.1:8080/file', this.callback);
- },
- 'status code should be 200': function (res) {
- assert.equal(res.statusCode, 200);
- },
- 'and file content': {
- topic: function (res, body) {
- var self = this;
- fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) {
- self.callback(err, data, body);
- });
- },
- 'should match content of served file': function (err, file, body) {
- assert.equal(body.trim(), file.trim());
- }
- }
- },
- 'when requesting non-existent file': {
- topic: function () {
- request('http://127.0.0.1:8080/404', this.callback);
- },
- 'status code should be 404': function (res) {
- assert.equal(res.statusCode, 404);
- }
- },
- 'when requesting /': {
- topic: function () {
- request('http://127.0.0.1:8080/', this.callback);
- },
- 'should respond with index': function (err, res, body) {
- assert.equal(res.statusCode, 200);
- assert.include(body, '/file');
- assert.include(body, '/canYouSeeMe');
- }
- },
- 'when robots options is activated': {
- topic: function () {
- request('http://127.0.0.1:8080/', this.callback);
- },
- 'should respond with status code 200 to /robots.txt': function (res) {
- assert.equal(res.statusCode, 200);
- }
- },
- 'and options include custom set http-headers': {
- topic: function () {
- request('http://127.0.0.1:8080/', this.callback);
- },
- 'should respond with headers set in options': function (err, res) {
- assert.equal(res.headers['access-control-allow-origin'], '*');
- assert.equal(res.headers['access-control-allow-credentials'], 'true');
- }
- },
- 'When http-server is proxying from 8081 to 8080': {
- topic: function () {
- var proxyServer = httpServer.createServer({
- proxy: 'http://127.0.0.1:8080/',
- root: path.join(__dirname, 'fixtures')
- });
- proxyServer.listen(8081);
- this.callback(null, proxyServer);
- },
- 'it should serve files from the proxy server root directory': {
- topic: function () {
- request('http://127.0.0.1:8081/root/file', this.callback);
- },
- 'status code should be the enpoint code 200': function (res) {
- assert.equal(res.statusCode, 200);
- },
- 'and file content': {
- topic: function (res, body) {
- var self = this;
- fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) {
- self.callback(err, data, body);
- });
- },
- 'should match content of the served file': function (err, file, body) {
- assert.equal(body.trim(), file.trim());
- }
- }
- },
- 'it should fallback to the proxied server': {
- topic: function () {
- request('http://127.0.0.1:8081/file', this.callback);
- },
- 'status code should be the enpoint code 200': function (res) {
- assert.equal(res.statusCode, 200);
- },
- 'and file content': {
- topic: function (res, body) {
- var self = this;
- fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) {
- self.callback(err, data, body);
- });
- },
- 'should match content of the proxied served file': function (err, file, body) {
- assert.equal(body.trim(), file.trim());
- }
- }
- }
- }
- },
- 'When cors is enabled': {
- topic: function () {
- var server = httpServer.createServer({
- root: root,
- cors: true
- });
- server.listen(8082);
- this.callback(null, server);
- },
- 'and given OPTIONS request': {
- topic: function () {
- request({
- method: 'OPTIONS',
- uri: 'http://127.0.0.1:8082/',
- headers: {
- 'Access-Control-Request-Method': 'GET',
- Origin: 'http://example.com',
- 'Access-Control-Request-Headers': 'Foobar'
- }
- }, this.callback);
- },
- 'status code should be 204': function (err, res) {
- assert.equal(res.statusCode, 204);
- }
- }
- }
-}).export(module);
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/.npmignore b/topics/00. Course-introduction/slides/node_modules/mime/.npmignore
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/LICENSE b/topics/00. Course-introduction/slides/node_modules/mime/LICENSE
deleted file mode 100644
index 451fc45..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mime/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/README.md b/topics/00. Course-introduction/slides/node_modules/mime/README.md
deleted file mode 100644
index 506fbe5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mime/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# mime
-
-Comprehensive MIME type mapping API based on mime-db module.
-
-## Install
-
-Install with [npm](http://github.com/isaacs/npm):
-
- npm install mime
-
-## Contributing / Testing
-
- npm run test
-
-## Command Line
-
- mime [path_string]
-
-E.g.
-
- > mime scripts/jquery.js
- application/javascript
-
-## API - Queries
-
-### mime.lookup(path)
-Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
-
-```js
-var mime = require('mime');
-
-mime.lookup('/path/to/file.txt'); // => 'text/plain'
-mime.lookup('file.txt'); // => 'text/plain'
-mime.lookup('.TXT'); // => 'text/plain'
-mime.lookup('htm'); // => 'text/html'
-```
-
-### mime.default_type
-Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
-
-### mime.extension(type)
-Get the default extension for `type`
-
-```js
-mime.extension('text/html'); // => 'html'
-mime.extension('application/octet-stream'); // => 'bin'
-```
-
-### mime.charsets.lookup()
-
-Map mime-type to charset
-
-```js
-mime.charsets.lookup('text/plain'); // => 'UTF-8'
-```
-
-(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
-
-## API - Defining Custom Types
-
-Custom type mappings can be added on a per-project basis via the following APIs.
-
-### mime.define()
-
-Add custom mime/extension mappings
-
-```js
-mime.define({
- 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
- 'application/x-my-type': ['x-mt', 'x-mtt'],
- // etc ...
-});
-
-mime.lookup('x-sft'); // => 'text/x-some-format'
-```
-
-The first entry in the extensions array is returned by `mime.extension()`. E.g.
-
-```js
-mime.extension('text/x-some-format'); // => 'x-sf'
-```
-
-### mime.load(filepath)
-
-Load mappings from an Apache ".types" format file
-
-```js
-mime.load('./my_project.types');
-```
-The .types file format is simple - See the `types` dir for examples.
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/cli.js b/topics/00. Course-introduction/slides/node_modules/mime/cli.js
deleted file mode 100755
index 20b1ffe..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mime/cli.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var mime = require('./mime.js');
-var file = process.argv[2];
-var type = mime.lookup(file);
-
-process.stdout.write(type + '\n');
-
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/mime.js b/topics/00. Course-introduction/slides/node_modules/mime/mime.js
deleted file mode 100644
index 341b6a5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mime/mime.js
+++ /dev/null
@@ -1,108 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-
-function Mime() {
- // Map of extension -> mime type
- this.types = Object.create(null);
-
- // Map of mime type -> extension
- this.extensions = Object.create(null);
-}
-
-/**
- * Define mimetype -> extension mappings. Each key is a mime-type that maps
- * to an array of extensions associated with the type. The first extension is
- * used as the default extension for the type.
- *
- * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
- *
- * @param map (Object) type definitions
- */
-Mime.prototype.define = function (map) {
- for (var type in map) {
- var exts = map[type];
- for (var i = 0; i < exts.length; i++) {
- if (process.env.DEBUG_MIME && this.types[exts]) {
- console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
- this.types[exts] + ' to ' + type);
- }
-
- this.types[exts[i]] = type;
- }
-
- // Default extension is the first one we encounter
- if (!this.extensions[type]) {
- this.extensions[type] = exts[0];
- }
- }
-};
-
-/**
- * Load an Apache2-style ".types" file
- *
- * This may be called multiple times (it's expected). Where files declare
- * overlapping types/extensions, the last file wins.
- *
- * @param file (String) path of file to load.
- */
-Mime.prototype.load = function(file) {
- this._loading = file;
- // Read file and split into lines
- var map = {},
- content = fs.readFileSync(file, 'ascii'),
- lines = content.split(/[\r\n]+/);
-
- lines.forEach(function(line) {
- // Clean up whitespace/comments, and split into fields
- var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
- map[fields.shift()] = fields;
- });
-
- this.define(map);
-
- this._loading = null;
-};
-
-/**
- * Lookup a mime type based on extension
- */
-Mime.prototype.lookup = function(path, fallback) {
- var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
-
- return this.types[ext] || fallback || this.default_type;
-};
-
-/**
- * Return file extension associated with a mime type
- */
-Mime.prototype.extension = function(mimeType) {
- var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
- return this.extensions[type];
-};
-
-// Default instance
-var mime = new Mime();
-
-// Define built-in types
-mime.define(require('./types.json'));
-
-// Default type
-mime.default_type = mime.lookup('bin');
-
-//
-// Additional API specific to the default instance
-//
-
-mime.Mime = Mime;
-
-/**
- * Lookup a charset based on mime type.
- */
-mime.charsets = {
- lookup: function(mimeType, fallback) {
- // Assume text types are utf8
- return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
- }
-};
-
-module.exports = mime;
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/package.json b/topics/00. Course-introduction/slides/node_modules/mime/package.json
deleted file mode 100644
index 475da36..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mime/package.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "_args": [
- [
- "mime@^1.2.11",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "mime@>=1.2.11 <2.0.0",
- "_id": "mime@1.3.4",
- "_inCache": true,
- "_installable": true,
- "_location": "/mime",
- "_npmUser": {
- "email": "robert@broofa.com",
- "name": "broofa"
- },
- "_npmVersion": "1.4.28",
- "_phantomChildren": {},
- "_requested": {
- "name": "mime",
- "raw": "mime@^1.2.11",
- "rawSpec": "^1.2.11",
- "scope": null,
- "spec": ">=1.2.11 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
- "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
- "_shrinkwrap": null,
- "_spec": "mime@^1.2.11",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "email": "robert@broofa.com",
- "name": "Robert Kieffer",
- "url": "http://github.com/broofa"
- },
- "bin": {
- "mime": "cli.js"
- },
- "bugs": {
- "url": "https://github.com/broofa/node-mime/issues"
- },
- "contributors": [
- {
- "name": "Benjamin Thomas",
- "email": "benjamin@benjaminthomas.org",
- "url": "http://github.com/bentomas"
- }
- ],
- "dependencies": {},
- "description": "A comprehensive library for mime-type mapping",
- "devDependencies": {
- "mime-db": "^1.2.0"
- },
- "directories": {},
- "dist": {
- "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
- "tarball": "http://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
- },
- "gitHead": "1628f6e0187095009dcef4805c3a49706f137974",
- "homepage": "https://github.com/broofa/node-mime",
- "keywords": [
- "mime",
- "util"
- ],
- "licenses": [
- {
- "type": "MIT",
- "url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
- }
- ],
- "main": "mime.js",
- "maintainers": [
- {
- "name": "broofa",
- "email": "robert@broofa.com"
- },
- {
- "name": "bentomas",
- "email": "benjamin@benjaminthomas.org"
- }
- ],
- "name": "mime",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/broofa/node-mime.git"
- },
- "scripts": {
- "prepublish": "node build/build.js > types.json",
- "test": "node build/test.js"
- },
- "version": "1.3.4"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/mime/types.json b/topics/00. Course-introduction/slides/node_modules/mime/types.json
deleted file mode 100644
index c674b1c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mime/types.json
+++ /dev/null
@@ -1 +0,0 @@
-{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mdp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a","m4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/opentype":["otf"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["markdown","md","mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-pascal":["p","pas"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/.travis.yml b/topics/00. Course-introduction/slides/node_modules/minimist/.travis.yml
deleted file mode 100644
index 74c57bf..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
-before_install:
- - npm install -g npm@~1.4.6
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/LICENSE b/topics/00. Course-introduction/slides/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/example/parse.js b/topics/00. Course-introduction/slides/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/index.js b/topics/00. Course-introduction/slides/node_modules/minimist/index.js
deleted file mode 100644
index 6a0559d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/index.js
+++ /dev/null
@@ -1,236 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {}, unknownFn: null };
-
- if (typeof opts['unknown'] === 'function') {
- flags.unknownFn = opts['unknown'];
- }
-
- if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
- flags.allBools = true;
- } else {
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
- }
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- if (aliases[key]) {
- flags.strings[aliases[key]] = true;
- }
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function argDefined(key, arg) {
- return (flags.allBools && /^--[^=]+$/.test(arg)) ||
- flags.strings[key] || flags.bools[key] || aliases[key];
- }
-
- function setArg (key, val, arg) {
- if (arg && flags.unknownFn && !argDefined(key, arg)) {
- if (flags.unknownFn(arg) === false) return;
- }
-
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
- }
-
- function aliasIsBoolean(key) {
- return aliases[key].some(function (x) {
- return flags.bools[x];
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- var key = m[1];
- var value = m[2];
- if (flags.bools[key]) {
- value = value !== 'false';
- }
- setArg(key, value, arg);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false, arg);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && !flags.allBools
- && (aliases[key] ? !aliasIsBoolean(key) : true)) {
- setArg(key, next, arg);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true', arg);
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true, arg);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next, arg)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
- setArg(letters[j], next.split('=')[1], arg);
- broken = true;
- break;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next, arg);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2), arg);
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !aliasIsBoolean(key) : true)) {
- setArg(key, args[i+1], arg);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true', arg);
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true, arg);
- }
- }
- }
- else {
- if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- if (opts.stopEarly) {
- argv._.push.apply(argv._, args.slice(i + 1));
- break;
- }
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- if (opts['--']) {
- argv['--'] = new Array();
- notFlags.forEach(function(key) {
- argv['--'].push(key);
- });
- }
- else {
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
- }
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/package.json b/topics/00. Course-introduction/slides/node_modules/minimist/package.json
deleted file mode 100644
index 6e054e5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/package.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "_args": [
- [
- "minimist@^1.1.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "minimist@>=1.1.0 <2.0.0",
- "_id": "minimist@1.2.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/minimist",
- "_nodeVersion": "2.4.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "3.2.2",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimist",
- "raw": "minimist@^1.1.0",
- "rawSpec": "^1.1.0",
- "scope": null,
- "spec": ">=1.1.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284",
- "_shrinkwrap": null,
- "_spec": "minimist@^1.1.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "dependencies": {},
- "description": "parse argument options",
- "devDependencies": {
- "covert": "^1.0.0",
- "tap": "~0.4.0",
- "tape": "^3.5.0"
- },
- "directories": {},
- "dist": {
- "shasum": "a35008b20f41383eec1fb914f4cd5df79a264284",
- "tarball": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
- },
- "gitHead": "dc624482fcfec5bc669c68cdb861f00573ed4e64",
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "optimist",
- "parser"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "minimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "scripts": {
- "coverage": "covert test/*.js",
- "test": "tap test/*.js"
- },
- "testling": {
- "browsers": [
- "chrome/10",
- "chrome/latest",
- "ff/5",
- "firefox/latest",
- "ie/6..latest",
- "opera/12",
- "safari/5.1",
- "safari/latest"
- ],
- "files": "test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/readme.markdown b/topics/00. Course-introduction/slides/node_modules/minimist/readme.markdown
deleted file mode 100644
index 30a74cf..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,91 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a boolean, string or array of strings to always treat as
-booleans. if `true` will treat all double hyphenated arguments without equal signs
-as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-* `opts.stopEarly` - when true, populate `argv._` with everything after the
-first non-option
-* `opts['--']` - when true, populate `argv._` with everything before the `--`
-and `argv['--']` with everything after the `--`. Here's an example:
-* `opts.unknown` - a function which is invoked with a command line parameter not
-defined in the `opts` configuration object. If the function returns `false`, the
-unknown option is not added to `argv`.
-
-```
-> require('./')('one two three -- four five --six'.split(' '), { '--': true })
-{ _: [ 'one', 'two', 'three' ],
- '--': [ 'four', 'five', '--six' ] }
-```
-
-Note that with `opts['--']` set, parsing for arguments still stops after the
-`--`.
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/all_bool.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/all_bool.js
deleted file mode 100644
index ac83548..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/all_bool.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean true (default all --args to boolean)', function (t) {
- var argv = parse(['moo', '--honk', 'cow'], {
- boolean: true
- });
-
- t.deepEqual(argv, {
- honk: true,
- _: ['moo', 'cow']
- });
-
- t.deepEqual(typeof argv.honk, 'boolean');
- t.end();
-});
-
-test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
- var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
- boolean: true
- });
-
- t.deepEqual(argv, {
- honk: true,
- tacos: 'good',
- p: 55,
- _: ['moo', 'cow']
- });
-
- t.deepEqual(typeof argv.honk, 'boolean');
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/bool.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/bool.js
deleted file mode 100644
index 14b0717..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/bool.js
+++ /dev/null
@@ -1,166 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias array with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var alt = [ '--harp', 'derp' ];
- var opts = {
- alias: { 'h': ['herp', 'harp'] },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var altPropertyArgv = parse(alt, opts);
- var expected = {
- harp: true,
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.same(altPropertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
-
-test('boolean --boool=true', function (t) {
- var parsed = parse(['--boool=true'], {
- default: {
- boool: false
- },
- boolean: ['boool']
- });
-
- t.same(parsed.boool, true);
- t.end();
-});
-
-test('boolean --boool=false', function (t) {
- var parsed = parse(['--boool=false'], {
- default: {
- boool: true
- },
- boolean: ['boool']
- });
-
- t.same(parsed.boool, false);
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/dash.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/dash.js
deleted file mode 100644
index 5a4fa5b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
-
-test('move arguments after the -- into their own `--` array', function(t) {
- t.plan(1);
- t.deepEqual(
- parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
- { name: 'John', _: [ 'before' ], '--': [ 'after' ] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/default_bool.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index 780a311..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
-
-test('boolean default to null', function (t) {
- var argv = parse([], {
- boolean: 'maybe',
- default: { maybe: null }
- });
- t.equal(argv.maybe, null);
- var argv = parse(['--maybe'], {
- boolean: 'maybe',
- default: { maybe: null }
- });
- t.equal(argv.maybe, true);
- t.end();
-
-})
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/dotted.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/dotted.js
deleted file mode 100644
index d8b3e85..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
-
-test('dotted default with no alias', function (t) {
- var argv = parse('', {default: {'a.b': 11}});
- t.equal(argv.a.b, 11);
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/kv_short.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/kv_short.js
deleted file mode 100644
index f813b30..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/kv_short.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('short -k=v' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b=123' ]);
- t.deepEqual(argv, { b: 123, _: [] });
-});
-
-test('multi short -k=v' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-a=whatever', '-b=robots' ]);
- t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/long.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/num.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/num.js
deleted file mode 100644
index 2cc77f4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/num.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('already a number', function (t) {
- var argv = parse([ '-x', 1234, 789 ]);
- t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/parse.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/parse.js
deleted file mode 100644
index 7b4a2a1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,197 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('string and alias', function(t) {
- var x = parse([ '--str', '000123' ], {
- string: 's',
- alias: { s: 'str' }
- });
-
- t.equal(x.str, '000123');
- t.equal(typeof x.str, 'string');
- t.equal(x.s, '000123');
- t.equal(typeof x.s, 'string');
-
- var y = parse([ '-s', '000123' ], {
- string: 'str',
- alias: { str: 's' }
- });
-
- t.equal(y.str, '000123');
- t.equal(typeof y.str, 'string');
- t.equal(y.s, '000123');
- t.equal(typeof y.s, 'string');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/parse_modified.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index ab620dc..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: [123] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/short.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/stop_early.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/stop_early.js
deleted file mode 100644
index bdf9fbc..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/stop_early.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('stops parsing on the first non-option when stopEarly is set', function (t) {
- var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
- stopEarly: true
- });
-
- t.deepEqual(argv, {
- aaa: 'bbb',
- _: ['ccc', '--ddd']
- });
-
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/unknown.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/unknown.js
deleted file mode 100644
index 462a36b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/unknown.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('boolean and alias is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '-h', 'true', '--derp', 'true' ];
- var regular = [ '--herp', 'true', '-d', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h',
- unknown: unknownFn
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
-
- t.same(unknown, ['--derp', '-d']);
- t.end();
-});
-
-test('flag boolean true any double hyphen argument is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
- boolean: true,
- unknown: unknownFn
- });
- t.same(unknown, ['--tacos=good', 'cow', '-p']);
- t.same(argv, {
- honk: true,
- _: []
- });
- t.end();
-});
-
-test('string and alias is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '-h', 'hello', '--derp', 'goodbye' ];
- var regular = [ '--herp', 'hello', '-d', 'moon' ];
- var opts = {
- alias: { h: 'herp' },
- string: 'h',
- unknown: unknownFn
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
-
- t.same(unknown, ['--derp', '-d']);
- t.end();
-});
-
-test('default and alias is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '-h', 'hello' ];
- var regular = [ '--herp', 'hello' ];
- var opts = {
- default: { 'h': 'bar' },
- alias: { 'h': 'herp' },
- unknown: unknownFn
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
-
- t.same(unknown, []);
- t.end();
- unknownFn(); // exercise fn for 100% coverage
-});
-
-test('value following -- is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '--bad', '--', 'good', 'arg' ];
- var opts = {
- '--': true,
- unknown: unknownFn
- };
- var argv = parse(aliased, opts);
-
- t.same(unknown, ['--bad']);
- t.same(argv, {
- '--': ['good', 'arg'],
- '_': []
- })
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/minimist/test/whitespace.js b/topics/00. Course-introduction/slides/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/topics/00. Course-introduction/slides/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/.travis.yml b/topics/00. Course-introduction/slides/node_modules/mkdirp/.travis.yml
deleted file mode 100644
index 74c57bf..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
-before_install:
- - npm install -g npm@~1.4.6
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/LICENSE b/topics/00. Course-introduction/slides/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 432d1ae..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright 2010 James Halliday (mail@substack.net)
-
-This project is free software released under the MIT/X11 license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/bin/cmd.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index d95de15..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env node
-
-var mkdirp = require('../');
-var minimist = require('minimist');
-var fs = require('fs');
-
-var argv = minimist(process.argv.slice(2), {
- alias: { m: 'mode', h: 'help' },
- string: [ 'mode' ]
-});
-if (argv.help) {
- fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
- return;
-}
-
-var paths = argv._.slice();
-var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
-
-(function next () {
- if (paths.length === 0) return;
- var p = paths.shift();
-
- if (mode === undefined) mkdirp(p, cb)
- else mkdirp(p, mode, cb)
-
- function cb (err) {
- if (err) {
- console.error(err.message);
- process.exit(1);
- }
- else next();
- }
-})();
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/bin/usage.txt b/topics/00. Course-introduction/slides/node_modules/mkdirp/bin/usage.txt
deleted file mode 100644
index f952aa2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/bin/usage.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories that
- don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m, --mode If a directory needs to be created, set the mode as an octal
- permission string.
-
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/examples/pow.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/examples/pow.js
deleted file mode 100644
index e692421..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/examples/pow.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/index.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/index.js
deleted file mode 100644
index 6ce241b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,98 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-var _0777 = parseInt('0777', 8);
-
-module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
-
-function mkdirP (p, opts, f, made) {
- if (typeof opts === 'function') {
- f = opts;
- opts = {};
- }
- else if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- var cb = f || function () {};
- p = path.resolve(p);
-
- xfs.mkdir(p, mode, function (er) {
- if (!er) {
- made = made || p;
- return cb(null, made);
- }
- switch (er.code) {
- case 'ENOENT':
- mkdirP(path.dirname(p), opts, function (er, made) {
- if (er) cb(er, made);
- else mkdirP(p, opts, cb, made);
- });
- break;
-
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- xfs.stat(p, function (er2, stat) {
- // if the stat fails, then that's super weird.
- // let the original error be the failure reason.
- if (er2 || !stat.isDirectory()) cb(er, made)
- else cb(null, made);
- });
- break;
- }
- });
-}
-
-mkdirP.sync = function sync (p, opts, made) {
- if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- p = path.resolve(p);
-
- try {
- xfs.mkdirSync(p, mode);
- made = made || p;
- }
- catch (err0) {
- switch (err0.code) {
- case 'ENOENT' :
- made = sync(path.dirname(p), opts, made);
- sync(p, opts, made);
- break;
-
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- var stat;
- try {
- stat = xfs.statSync(p);
- }
- catch (err1) {
- throw err0;
- }
- if (!stat.isDirectory()) throw err0;
- break;
- }
- }
-
- return made;
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/.travis.yml b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/LICENSE b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/example/parse.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/index.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/index.js
deleted file mode 100644
index 584f551..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/index.js
+++ /dev/null
@@ -1,187 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- });
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function setArg (key, val) {
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- }
- else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
-function longest (xs) {
- return Math.max.apply(null, xs.map(function (x) { return x.length }));
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/package.json b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/package.json
deleted file mode 100644
index f5cfc4a..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "_args": [
- [
- "minimist@0.0.8",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/mkdirp"
- ]
- ],
- "_from": "minimist@0.0.8",
- "_id": "minimist@0.0.8",
- "_inCache": true,
- "_installable": true,
- "_location": "/mkdirp/minimist",
- "_npmUser": {
- "email": "mail@substack.net",
- "name": "substack"
- },
- "_npmVersion": "1.4.3",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimist",
- "raw": "minimist@0.0.8",
- "rawSpec": "0.0.8",
- "scope": null,
- "spec": "0.0.8",
- "type": "version"
- },
- "_requiredBy": [
- "/mkdirp"
- ],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "_shrinkwrap": null,
- "_spec": "minimist@0.0.8",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/mkdirp",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "dependencies": {},
- "description": "parse argument options",
- "devDependencies": {
- "tap": "~0.4.0",
- "tape": "~1.0.4"
- },
- "directories": {},
- "dist": {
- "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
- },
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "optimist",
- "parser"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "minimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "testling": {
- "browsers": [
- "chrome/10",
- "chrome/latest",
- "ff/5",
- "firefox/latest",
- "ie/6..latest",
- "opera/12",
- "safari/5.1",
- "safari/latest"
- ],
- "files": "test/*.js"
- },
- "version": "0.0.8"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/readme.markdown b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/readme.markdown
deleted file mode 100644
index c256353..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,73 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/dash.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/dash.js
deleted file mode 100644
index 8b034b9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/dotted.js
deleted file mode 100644
index ef0ae34..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/long.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/parse.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/parse.js
deleted file mode 100644
index 8a90646..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,318 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/short.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/package.json b/topics/00. Course-introduction/slides/node_modules/mkdirp/package.json
deleted file mode 100644
index 2893456..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_args": [
- [
- "mkdirp@0.5.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/portfinder"
- ]
- ],
- "_from": "mkdirp@>=0.5.0 <0.6.0",
- "_id": "mkdirp@0.5.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/mkdirp",
- "_nodeVersion": "2.0.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "2.9.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "mkdirp",
- "raw": "mkdirp@0.5.x",
- "rawSpec": "0.5.x",
- "scope": null,
- "spec": ">=0.5.0 <0.6.0",
- "type": "range"
- },
- "_requiredBy": [
- "/portfinder"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903",
- "_shrinkwrap": null,
- "_spec": "mkdirp@0.5.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/portfinder",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/substack/node-mkdirp/issues"
- },
- "dependencies": {
- "minimist": "0.0.8"
- },
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "mock-fs": "2 >=2.7.0",
- "tap": "1"
- },
- "directories": {},
- "dist": {
- "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903",
- "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz"
- },
- "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7",
- "homepage": "https://github.com/substack/node-mkdirp#readme",
- "keywords": [
- "directory",
- "mkdir"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "mkdirp",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/substack/node-mkdirp.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "0.5.1"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/readme.markdown b/topics/00. Course-introduction/slides/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 3cc1315..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,100 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in node.js!
-
-[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
-
-# example
-
-## pow.js
-
-```js
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
-```
-
-Output
-
-```
-pow!
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-var mkdirp = require('mkdirp');
-```
-
-## mkdirp(dir, opts, cb)
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a non-object, it will be treated as
-the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-`cb(err, made)` fires with the error or the first directory `made`
-that had to be created, if any.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
-`opts.fs.stat(path, cb)`.
-
-## mkdirp.sync(dir, opts)
-
-Synchronously create a new directory and any necessary subdirectories at `dir`
-with octal permission string `opts.mode`. If `opts` is a non-object, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-Returns the first directory that had to be created, if any.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
-`opts.fs.statSync(path)`.
-
-# usage
-
-This package also ships with a `mkdirp` command.
-
-```
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories that
- don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m, --mode If a directory needs to be created, set the mode as an octal
- permission string.
-
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command.
-
-# license
-
-MIT
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/chmod.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/chmod.js
deleted file mode 100644
index 6a404b9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/chmod.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-var _0744 = parseInt('0744', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-test('chmod-pre', function (t) {
- var mode = _0744
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.equal(stat && stat.mode & _0777, mode, 'should be 0744');
- t.end();
- });
- });
-});
-
-test('chmod', function (t) {
- var mode = _0755
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.end();
- });
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/clobber.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/clobber.js
deleted file mode 100644
index 2433b9a..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/clobber.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-// a file in the way
-var itw = ps.slice(0, 3).join('/');
-
-
-test('clobber-pre', function (t) {
- console.error("about to write to "+itw)
- fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
-
- fs.stat(itw, function (er, stat) {
- t.ifError(er)
- t.ok(stat && stat.isFile(), 'should be file')
- t.end()
- })
-})
-
-test('clobber', function (t) {
- t.plan(2);
- mkdirp(file, _0755, function (err) {
- t.ok(err);
- t.equal(err.code, 'ENOTDIR');
- t.end();
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/mkdirp.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/mkdirp.js
deleted file mode 100644
index eaa8921..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/mkdirp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('woo', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/opts_fs.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/opts_fs.js
deleted file mode 100644
index 97186b6..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/opts_fs.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs', function (t) {
- t.plan(5);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp(file, { fs: xfs, mode: _0755 }, function (err) {
- t.ifError(err);
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/opts_fs_sync.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/opts_fs_sync.js
deleted file mode 100644
index 6c370aa..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/opts_fs_sync.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs sync', function (t) {
- t.plan(4);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp.sync(file, { fs: xfs, mode: _0755 });
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/perm.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/perm.js
deleted file mode 100644
index fbce44b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/perm.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('async perm', function (t) {
- t.plan(5);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
-
-test('async root perm', function (t) {
- mkdirp('/tmp', _0755, function (err) {
- if (err) t.fail(err);
- t.end();
- });
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/perm_sync.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/perm_sync.js
deleted file mode 100644
index 398229f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/perm_sync.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync perm', function (t) {
- t.plan(4);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
-
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
-
-test('sync root perm', function (t) {
- t.plan(3);
-
- var file = '/tmp';
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/race.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/race.js
deleted file mode 100644
index b0b9e18..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/race.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('race', function (t) {
- t.plan(10);
- var ps = [ '', 'tmp' ];
-
- for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
- }
- var file = ps.join('/');
-
- var res = 2;
- mk(file);
-
- mk(file);
-
- function mk (file, cb) {
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
- }
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/rel.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/rel.js
deleted file mode 100644
index 4ddb342..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/rel.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('rel', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var cwd = process.cwd();
- process.chdir('/tmp');
-
- var file = [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- process.chdir(cwd);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/return.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/return.js
deleted file mode 100644
index bce68e5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/return.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, '/tmp/' + x);
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, null);
- });
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/return_sync.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/return_sync.js
deleted file mode 100644
index 7c222d3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/return_sync.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- // Note that this will throw on failure, which will fail the test.
- var made = mkdirp.sync(file);
- t.equal(made, '/tmp/' + x);
-
- // making the same file again should have no effect.
- made = mkdirp.sync(file);
- t.equal(made, null);
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/root.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/root.js
deleted file mode 100644
index 9e7d079..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/root.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-test('root', function (t) {
- // '/' on unix, 'c:/' on windows.
- var file = path.resolve('/');
-
- mkdirp(file, _0755, function (err) {
- if (err) throw err
- fs.stat(file, function (er, stat) {
- if (er) throw er
- t.ok(stat.isDirectory(), 'target is a directory');
- t.end();
- })
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/sync.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/sync.js
deleted file mode 100644
index 8c8dc93..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file, _0755);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/umask.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/umask.js
deleted file mode 100644
index 2033c63..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/umask.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('implicit mode from umask', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0777 & (~process.umask()));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/umask_sync.js b/topics/00. Course-introduction/slides/node_modules/mkdirp/test/umask_sync.js
deleted file mode 100644
index 11a7614..0000000
--- a/topics/00. Course-introduction/slides/node_modules/mkdirp/test/umask_sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('umask sync modes', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, (_0777 & (~process.umask())));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/opener/LICENSE.txt b/topics/00. Course-introduction/slides/node_modules/opener/LICENSE.txt
deleted file mode 100644
index f580e3d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/opener/LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright © 2012–2015 Domenic Denicola
-
-This work is free. You can redistribute it and/or modify it under the
-terms of the Do What The Fuck You Want To Public License, Version 2,
-as published by Sam Hocevar. See below for more details.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/topics/00. Course-introduction/slides/node_modules/opener/README.md b/topics/00. Course-introduction/slides/node_modules/opener/README.md
deleted file mode 100644
index 8a803f3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/opener/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# It Opens Stuff
-
-That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them:
-
-```bash
-npm install opener -g
-
-opener http://google.com
-opener ./my-file.txt
-opener firefox
-opener npm run lint
-```
-
-Also if you want to use it programmatically you can do that too:
-
-```js
-var opener = require("opener");
-
-opener("http://google.com");
-opener("./my-file.txt");
-opener("firefox");
-opener("npm run lint");
-```
-
-Plus, it returns the child process created, so you can do things like let your script exit while the window stays open:
-
-```js
-var editor = opener("documentation.odt");
-editor.unref();
-// These other unrefs may be necessary if your OS's opener process
-// exits before the process it started is complete.
-editor.stdin.unref();
-editor.stdout.unref();
-editor.stderr.unref();
-```
-
-
-## Use It for Good
-
-Like opening the user's browser with a test harness in your package's test script:
-
-```json
-{
- "scripts": {
- "test": "opener ./test/runner.html"
- },
- "devDependencies": {
- "opener": "*"
- }
-}
-```
-
-## Why
-
-Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least
-[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all
-three. Like Node.js. And Opener.
diff --git a/topics/00. Course-introduction/slides/node_modules/opener/opener.js b/topics/00. Course-introduction/slides/node_modules/opener/opener.js
deleted file mode 100755
index 8951fa2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/opener/opener.js
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env node
-
-"use strict";
-
-var childProcess = require("child_process");
-
-function opener(args, options, callback) {
- // http://stackoverflow.com/q/1480971/3191, but see below for Windows.
- var command = process.platform === "win32" ? "cmd" :
- process.platform === "darwin" ? "open" :
- "xdg-open";
-
- if (typeof args === "string") {
- args = [args];
- }
-
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
-
- if (options && typeof options === "object" && options.command) {
- if (process.platform === "win32") {
- // *always* use cmd on windows
- args = [options.command].concat(args);
- } else {
- command = options.command;
- }
- }
-
- if (process.platform === "win32") {
- // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and
- // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the
- // responsibility to "cmd /c", which has that logic built in.
- //
- // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
- // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
- //
- // Additionally, on Windows ampersand needs to be escaped when passed to "start"
- args = args.map(function(value) {
- return value.replace(/&/g, '^&');
- });
- args = ["/c", "start", '""'].concat(args);
- }
-
- return childProcess.execFile(command, args, options, callback);
-}
-
-// Export `opener` for programmatic access.
-// You might use this to e.g. open a website: `opener("http://google.com")`
-module.exports = opener;
-
-// If we're being called from the command line, just execute, using the command-line arguments.
-if (require.main && require.main.id === module.id) {
- opener(process.argv.slice(2), function (error) {
- if (error) {
- throw error;
- }
- });
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/opener/package.json b/topics/00. Course-introduction/slides/node_modules/opener/package.json
deleted file mode 100644
index 0131080..0000000
--- a/topics/00. Course-introduction/slides/node_modules/opener/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_args": [
- [
- "opener@~1.4.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "opener@>=1.4.0 <1.5.0",
- "_id": "opener@1.4.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/opener",
- "_nodeVersion": "1.5.1",
- "_npmUser": {
- "email": "d@domenic.me",
- "name": "domenic"
- },
- "_npmVersion": "2.7.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "opener",
- "raw": "opener@~1.4.0",
- "rawSpec": "~1.4.0",
- "scope": null,
- "spec": ">=1.4.0 <1.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.1.tgz",
- "_shasum": "897590acd1aed3311b703b58bccb4d43f56f2895",
- "_shrinkwrap": null,
- "_spec": "opener@~1.4.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "d@domenic.me",
- "name": "Domenic Denicola",
- "url": "https://domenic.me/"
- },
- "bin": {
- "opener": "opener.js"
- },
- "bugs": {
- "url": "https://github.com/domenic/opener/issues"
- },
- "dependencies": {},
- "description": "Opens stuff, like webpages and files and executables, cross-platform",
- "devDependencies": {
- "jshint": "^2.6.3"
- },
- "directories": {},
- "dist": {
- "shasum": "897590acd1aed3311b703b58bccb4d43f56f2895",
- "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.1.tgz"
- },
- "files": [
- "opener.js"
- ],
- "gitHead": "d0ee95b19951703462fa593baa16e81fdff7827c",
- "homepage": "https://github.com/domenic/opener",
- "license": "WTFPL",
- "main": "opener.js",
- "maintainers": [
- {
- "name": "domenic",
- "email": "domenic@domenicdenicola.com"
- }
- ],
- "name": "opener",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/domenic/opener.git"
- },
- "scripts": {
- "lint": "jshint opener.js"
- },
- "version": "1.4.1"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/.name b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/.name
deleted file mode 100644
index 9cca3a1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-openurl
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/encodings.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/encodings.xml
deleted file mode 100644
index e206d70..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/encodings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/inspectionProfiles/Project_Default.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index c66df00..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/inspectionProfiles/profiles_settings.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 3b31283..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/misc.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/misc.xml
deleted file mode 100644
index 3284406..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/misc.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- http://www.w3.org/1999/xhtml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/modules.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/modules.xml
deleted file mode 100644
index 8ad08a3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/openurl.iml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/openurl.iml
deleted file mode 100644
index 6b8184f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/openurl.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/scopes/scope_settings.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/vcs.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/vcs.xml
deleted file mode 100644
index def6a6a..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/workspace.xml b/topics/00. Course-introduction/slides/node_modules/openurl/.idea/workspace.xml
deleted file mode 100644
index 750e1e5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.idea/workspace.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1330134580398
- 1330134580398
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/.npmignore b/topics/00. Course-introduction/slides/node_modules/openurl/.npmignore
deleted file mode 100644
index 08302ef..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.DS_Store
-.idea
-
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/README.md b/topics/00. Course-introduction/slides/node_modules/openurl/README.md
deleted file mode 100644
index f66356f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-openurl – Node.js module for opening URLs
-=========================================
-
-openurl is a Node.js module for opening a URL via the operating system. This will usually trigger actions such as:
-
-- http URLs: open the default browser
-- mailto URLs: open the default email client
-- file URLs: open a window showing the directory (on OS X)
-
-Example interaction on the Node.js REPL:
-
- > require("openurl").open("http://rauschma.de")
- > require("openurl").open("mailto:john@example.com")
-
-You can generate emails as follows:
-
- require("openurl").mailto(["john@example.com", "jane@example.com"],
- { subject: "Hello!", body: "This is\nan automatically sent email!\n" });
-
-Install via npm:
-
- npm install openurl
-
-I’m not yet terribly familiar with implementing npm packages, so any feedback is welcome
-(especially experience reports on Windows and Linux, which I can’t test on).
-
-Related reading:
-
-- [Write your shell scripts in JavaScript, via Node.js](http://www.2ality.com/2011/12/nodejs-shell-scripting.html)
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/openurl.js b/topics/00. Course-introduction/slides/node_modules/openurl/openurl.js
deleted file mode 100644
index d8c17a0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/openurl.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var spawn = require('child_process').spawn;
-
-var command;
-
-switch(process.platform) {
- case 'darwin':
- command = 'open';
- break;
- case 'win32':
- command = 'explorer.exe';
- break;
- case 'linux':
- command = 'xdg-open';
- break;
- default:
- throw new Error('Unsupported platform: ' + process.platform);
-}
-
-/**
- * Error handling is deliberately minimal, as this function is to be easy to use for shell scripting
- *
- * @param url The URL to open
- * @param callback A function with a single error argument. Optional.
- */
-
-function open(url, callback) {
- var child = spawn(command, [url]);
- var errorText = "";
- child.stderr.setEncoding('utf8');
- child.stderr.on('data', function (data) {
- errorText += data;
- });
- child.stderr.on('end', function () {
- if (errorText.length > 0) {
- var error = new Error(errorText);
- if (callback) {
- callback(error);
- } else {
- throw error;
- }
- } else if (callback) {
- callback(error);
- }
- });
-}
-
-/**
- * @param fields Common fields are: "subject", "body".
- * Some email apps let you specify arbitrary headers here.
- * @param recipientsSeparator Default is ",". Use ";" for Outlook.
- */
-function mailto(recipients, fields, recipientsSeparator, callback) {
- recipientsSeparator = recipientsSeparator || ",";
-
- var url = "mailto:"+recipients.join(recipientsSeparator);
- Object.keys(fields).forEach(function (key, index) {
- if (index === 0) {
- url += "?";
- } else {
- url += "&";
- }
- url += key + "=" + encodeURIComponent(fields[key]);
- });
- open(url, callback);
-}
-
-exports.open = open;
-exports.mailto = mailto;
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/openurl/package.json b/topics/00. Course-introduction/slides/node_modules/openurl/package.json
deleted file mode 100644
index ff1592d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/openurl/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_args": [
- [
- "openurl@^1.1.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides"
- ]
- ],
- "_defaultsLoaded": true,
- "_engineSupported": true,
- "_from": "openurl@>=1.1.0 <2.0.0",
- "_id": "openurl@1.1.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/openurl",
- "_nodeVersion": "v0.6.6",
- "_npmUser": {
- "email": "axel@rauschma.de",
- "name": "rauschma"
- },
- "_npmVersion": "1.0.106",
- "_phantomChildren": {},
- "_requested": {
- "name": "openurl",
- "raw": "openurl@^1.1.0",
- "rawSpec": "^1.1.0",
- "scope": null,
- "spec": ">=1.1.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.0.tgz",
- "_shasum": "e2f2189d999c04823201f083f0f1a7cd8903187a",
- "_shrinkwrap": null,
- "_spec": "openurl@^1.1.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides",
- "author": {
- "email": "axe@rauschma.de",
- "name": "Axel Rauschmayer"
- },
- "bugs": {
- "url": "https://github.com/rauschma/openurl/issues"
- },
- "dependencies": {},
- "description": "Open a URL via the operating system (http: in default browser, mailto: in mail client etc.",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "e2f2189d999c04823201f083f0f1a7cd8903187a",
- "tarball": "http://registry.npmjs.org/openurl/-/openurl-1.1.0.tgz"
- },
- "engines": {
- "node": "*"
- },
- "homepage": "https://github.com/rauschma/openurl#readme",
- "keywords": [
- "browser",
- "desktop"
- ],
- "license": "MIT",
- "main": "./openurl.js",
- "maintainers": [
- {
- "name": "rauschma",
- "email": "axel@rauschma.de"
- }
- ],
- "name": "openurl",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/rauschma/openurl.git"
- },
- "version": "1.1.0"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/.travis.yml b/topics/00. Course-introduction/slides/node_modules/optimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/LICENSE b/topics/00. Course-introduction/slides/node_modules/optimist/LICENSE
deleted file mode 100644
index 432d1ae..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright 2010 James Halliday (mail@substack.net)
-
-This project is free software released under the MIT/X11 license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/bool.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/bool.js
deleted file mode 100644
index a998fb7..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/bool.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-var util = require('util');
-var argv = require('optimist').argv;
-
-if (argv.s) {
- util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
-}
-console.log(
- (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
-);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/boolean_double.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/boolean_double.js
deleted file mode 100644
index a35a7e6..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/boolean_double.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean(['x','y','z'])
- .argv
-;
-console.dir([ argv.x, argv.y, argv.z ]);
-console.dir(argv._);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/boolean_single.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/boolean_single.js
deleted file mode 100644
index 017bb68..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/boolean_single.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean('v')
- .argv
-;
-console.dir(argv.v);
-console.dir(argv._);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/default_hash.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/default_hash.js
deleted file mode 100644
index ade7768..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/default_hash.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var argv = require('optimist')
- .default({ x : 10, y : 10 })
- .argv
-;
-
-console.log(argv.x + argv.y);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/default_singles.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/default_singles.js
deleted file mode 100644
index d9b1ff4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/default_singles.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .default('x', 10)
- .default('y', 10)
- .argv
-;
-console.log(argv.x + argv.y);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/divide.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/divide.js
deleted file mode 100644
index 5e2ee82..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/divide.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var argv = require('optimist')
- .usage('Usage: $0 -x [num] -y [num]')
- .demand(['x','y'])
- .argv;
-
-console.log(argv.x / argv.y);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count.js
deleted file mode 100644
index b5f95bf..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count.js
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .demand('f')
- .alias('f', 'file')
- .describe('f', 'Load a file')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines);
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count_options.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count_options.js
deleted file mode 100644
index d9ac709..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count_options.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .options({
- file : {
- demand : true,
- alias : 'f',
- description : 'Load a file'
- },
- base : {
- alias : 'b',
- description : 'Numeric base to use for output',
- default : 10,
- },
- })
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines.toString(argv.base));
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count_wrap.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count_wrap.js
deleted file mode 100644
index 4267511..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/line_count_wrap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .wrap(80)
- .demand('f')
- .alias('f', [ 'file', 'filename' ])
- .describe('f',
- "Load a file. It's pretty important."
- + " Required even. So you'd better specify it."
- )
- .alias('b', 'base')
- .describe('b', 'Numeric base to display the number of lines in')
- .default('b', 10)
- .describe('x', 'Super-secret optional parameter which is secret')
- .default('x', '')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines.toString(argv.base));
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/nonopt.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/nonopt.js
deleted file mode 100644
index ee633ee..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/nonopt.js
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-console.log(argv._);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/reflect.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/reflect.js
deleted file mode 100644
index 816b3e1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/reflect.js
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env node
-console.dir(require('optimist').argv);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/short.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/short.js
deleted file mode 100644
index 1db0ad0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/short.js
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/string.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/string.js
deleted file mode 100644
index a8e5aeb..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/string.js
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .string('x', 'y')
- .argv
-;
-console.dir([ argv.x, argv.y ]);
-
-/* Turns off numeric coercion:
- ./node string.js -x 000123 -y 9876
- [ '000123', '9876' ]
-*/
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/usage-options.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/usage-options.js
deleted file mode 100644
index b999977..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/usage-options.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var optimist = require('./../index');
-
-var argv = optimist.usage('This is my awesome program', {
- 'about': {
- description: 'Provide some details about the author of this program',
- required: true,
- short: 'a',
- },
- 'info': {
- description: 'Provide some information about the node.js agains!!!!!!',
- boolean: true,
- short: 'i'
- }
-}).argv;
-
-optimist.showHelp();
-
-console.log('\n\nInspecting options');
-console.dir(argv);
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/example/xup.js b/topics/00. Course-introduction/slides/node_modules/optimist/example/xup.js
deleted file mode 100644
index 8f6ecd2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/example/xup.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-
-if (argv.rif - 5 * argv.xup > 7.138) {
- console.log('Buy more riffiwobbles');
-}
-else {
- console.log('Sell the xupptumblers');
-}
-
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/index.js b/topics/00. Course-introduction/slides/node_modules/optimist/index.js
deleted file mode 100644
index 4da5a6d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/index.js
+++ /dev/null
@@ -1,343 +0,0 @@
-var path = require('path');
-var minimist = require('minimist');
-var wordwrap = require('wordwrap');
-
-/* Hack an instance of Argv with process.argv into Argv
- so people can do
- require('optimist')(['--beeble=1','-z','zizzle']).argv
- to parse a list of args and
- require('optimist').argv
- to get a parsed version of process.argv.
-*/
-
-var inst = Argv(process.argv.slice(2));
-Object.keys(inst).forEach(function (key) {
- Argv[key] = typeof inst[key] == 'function'
- ? inst[key].bind(inst)
- : inst[key];
-});
-
-var exports = module.exports = Argv;
-function Argv (processArgs, cwd) {
- var self = {};
- if (!cwd) cwd = process.cwd();
-
- self.$0 = process.argv
- .slice(0,2)
- .map(function (x) {
- var b = rebase(cwd, x);
- return x.match(/^\//) && b.length < x.length
- ? b : x
- })
- .join(' ')
- ;
-
- if (process.env._ != undefined && process.argv[1] == process.env._) {
- self.$0 = process.env._.replace(
- path.dirname(process.execPath) + '/', ''
- );
- }
-
- var options = {
- boolean: [],
- string: [],
- alias: {},
- default: []
- };
-
- self.boolean = function (bools) {
- options.boolean.push.apply(options.boolean, [].concat(bools));
- return self;
- };
-
- self.string = function (strings) {
- options.string.push.apply(options.string, [].concat(strings));
- return self;
- };
-
- self.default = function (key, value) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.default(k, key[k]);
- });
- }
- else {
- options.default[key] = value;
- }
- return self;
- };
-
- self.alias = function (x, y) {
- if (typeof x === 'object') {
- Object.keys(x).forEach(function (key) {
- self.alias(key, x[key]);
- });
- }
- else {
- options.alias[x] = (options.alias[x] || []).concat(y);
- }
- return self;
- };
-
- var demanded = {};
- self.demand = function (keys) {
- if (typeof keys == 'number') {
- if (!demanded._) demanded._ = 0;
- demanded._ += keys;
- }
- else if (Array.isArray(keys)) {
- keys.forEach(function (key) {
- self.demand(key);
- });
- }
- else {
- demanded[keys] = true;
- }
-
- return self;
- };
-
- var usage;
- self.usage = function (msg, opts) {
- if (!opts && typeof msg === 'object') {
- opts = msg;
- msg = null;
- }
-
- usage = msg;
-
- if (opts) self.options(opts);
-
- return self;
- };
-
- function fail (msg) {
- self.showHelp();
- if (msg) console.error(msg);
- process.exit(1);
- }
-
- var checks = [];
- self.check = function (f) {
- checks.push(f);
- return self;
- };
-
- var descriptions = {};
- self.describe = function (key, desc) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.describe(k, key[k]);
- });
- }
- else {
- descriptions[key] = desc;
- }
- return self;
- };
-
- self.parse = function (args) {
- return parseArgs(args);
- };
-
- self.option = self.options = function (key, opt) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.options(k, key[k]);
- });
- }
- else {
- if (opt.alias) self.alias(key, opt.alias);
- if (opt.demand) self.demand(key);
- if (typeof opt.default !== 'undefined') {
- self.default(key, opt.default);
- }
-
- if (opt.boolean || opt.type === 'boolean') {
- self.boolean(key);
- }
- if (opt.string || opt.type === 'string') {
- self.string(key);
- }
-
- var desc = opt.describe || opt.description || opt.desc;
- if (desc) {
- self.describe(key, desc);
- }
- }
-
- return self;
- };
-
- var wrap = null;
- self.wrap = function (cols) {
- wrap = cols;
- return self;
- };
-
- self.showHelp = function (fn) {
- if (!fn) fn = console.error;
- fn(self.help());
- };
-
- self.help = function () {
- var keys = Object.keys(
- Object.keys(descriptions)
- .concat(Object.keys(demanded))
- .concat(Object.keys(options.default))
- .reduce(function (acc, key) {
- if (key !== '_') acc[key] = true;
- return acc;
- }, {})
- );
-
- var help = keys.length ? [ 'Options:' ] : [];
-
- if (usage) {
- help.unshift(usage.replace(/\$0/g, self.$0), '');
- }
-
- var switches = keys.reduce(function (acc, key) {
- acc[key] = [ key ].concat(options.alias[key] || [])
- .map(function (sw) {
- return (sw.length > 1 ? '--' : '-') + sw
- })
- .join(', ')
- ;
- return acc;
- }, {});
-
- var switchlen = longest(Object.keys(switches).map(function (s) {
- return switches[s] || '';
- }));
-
- var desclen = longest(Object.keys(descriptions).map(function (d) {
- return descriptions[d] || '';
- }));
-
- keys.forEach(function (key) {
- var kswitch = switches[key];
- var desc = descriptions[key] || '';
-
- if (wrap) {
- desc = wordwrap(switchlen + 4, wrap)(desc)
- .slice(switchlen + 4)
- ;
- }
-
- var spadding = new Array(
- Math.max(switchlen - kswitch.length + 3, 0)
- ).join(' ');
-
- var dpadding = new Array(
- Math.max(desclen - desc.length + 1, 0)
- ).join(' ');
-
- var type = null;
-
- if (options.boolean[key]) type = '[boolean]';
- if (options.string[key]) type = '[string]';
-
- if (!wrap && dpadding.length > 0) {
- desc += dpadding;
- }
-
- var prelude = ' ' + kswitch + spadding;
- var extra = [
- type,
- demanded[key]
- ? '[required]'
- : null
- ,
- options.default[key] !== undefined
- ? '[default: ' + JSON.stringify(options.default[key]) + ']'
- : null
- ,
- ].filter(Boolean).join(' ');
-
- var body = [ desc, extra ].filter(Boolean).join(' ');
-
- if (wrap) {
- var dlines = desc.split('\n');
- var dlen = dlines.slice(-1)[0].length
- + (dlines.length === 1 ? prelude.length : 0)
-
- body = desc + (dlen + extra.length > wrap - 2
- ? '\n'
- + new Array(wrap - extra.length + 1).join(' ')
- + extra
- : new Array(wrap - extra.length - dlen + 1).join(' ')
- + extra
- );
- }
-
- help.push(prelude + body);
- });
-
- help.push('');
- return help.join('\n');
- };
-
- Object.defineProperty(self, 'argv', {
- get : function () { return parseArgs(processArgs) },
- enumerable : true,
- });
-
- function parseArgs (args) {
- var argv = minimist(args, options);
- argv.$0 = self.$0;
-
- if (demanded._ && argv._.length < demanded._) {
- fail('Not enough non-option arguments: got '
- + argv._.length + ', need at least ' + demanded._
- );
- }
-
- var missing = [];
- Object.keys(demanded).forEach(function (key) {
- if (!argv[key]) missing.push(key);
- });
-
- if (missing.length) {
- fail('Missing required arguments: ' + missing.join(', '));
- }
-
- checks.forEach(function (f) {
- try {
- if (f(argv) === false) {
- fail('Argument check failed: ' + f.toString());
- }
- }
- catch (err) {
- fail(err)
- }
- });
-
- return argv;
- }
-
- function longest (xs) {
- return Math.max.apply(
- null,
- xs.map(function (x) { return x.length })
- );
- }
-
- return self;
-};
-
-// rebase an absolute path to a relative one with respect to a base directory
-// exported for tests
-exports.rebase = rebase;
-function rebase (base, dir) {
- var ds = path.normalize(dir).split('/').slice(1);
- var bs = path.normalize(base).split('/').slice(1);
-
- for (var i = 0; ds[i] && ds[i] == bs[i]; i++);
- ds.splice(0, i); bs.splice(0, i);
-
- var p = path.normalize(
- bs.map(function () { return '..' }).concat(ds).join('/')
- ).replace(/\/$/,'').replace(/^$/, '.');
- return p.match(/^[.\/]/) ? p : './' + p;
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/.travis.yml b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/LICENSE b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/example/parse.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/index.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/index.js
deleted file mode 100644
index 71fb830..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/index.js
+++ /dev/null
@@ -1,187 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- if (aliases[key]) {
- flags.strings[aliases[key]] = true;
- }
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function setArg (key, val) {
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- }
- else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/package.json b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/package.json
deleted file mode 100644
index 23b5b15..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "_args": [
- [
- "minimist@~0.0.1",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist"
- ]
- ],
- "_from": "minimist@>=0.0.1 <0.1.0",
- "_id": "minimist@0.0.10",
- "_inCache": true,
- "_installable": true,
- "_location": "/optimist/minimist",
- "_npmUser": {
- "email": "mail@substack.net",
- "name": "substack"
- },
- "_npmVersion": "1.4.3",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimist",
- "raw": "minimist@~0.0.1",
- "rawSpec": "~0.0.1",
- "scope": null,
- "spec": ">=0.0.1 <0.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/optimist"
- ],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
- "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf",
- "_shrinkwrap": null,
- "_spec": "minimist@~0.0.1",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "dependencies": {},
- "description": "parse argument options",
- "devDependencies": {
- "tap": "~0.4.0",
- "tape": "~1.0.4"
- },
- "directories": {},
- "dist": {
- "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf",
- "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz"
- },
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "optimist",
- "parser"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "minimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "testling": {
- "browsers": [
- "chrome/10",
- "chrome/latest",
- "ff/5",
- "firefox/latest",
- "ie/6..latest",
- "opera/12",
- "safari/5.1",
- "safari/latest"
- ],
- "files": "test/*.js"
- },
- "version": "0.0.10"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/readme.markdown b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/readme.markdown
deleted file mode 100644
index c256353..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,73 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/bool.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/bool.js
deleted file mode 100644
index 749e083..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/bool.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/dash.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/dash.js
deleted file mode 100644
index 8b034b9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/default_bool.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/dotted.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/dotted.js
deleted file mode 100644
index d8b3e85..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
-
-test('dotted default with no alias', function (t) {
- var argv = parse('', {default: {'a.b': 11}});
- t.equal(argv.a.b, 11);
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/long.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/num.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/num.js
deleted file mode 100644
index 2cc77f4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/num.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('already a number', function (t) {
- var argv = parse([ '-x', 1234, 789 ]);
- t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/parse.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/parse.js
deleted file mode 100644
index 7b4a2a1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,197 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('string and alias', function(t) {
- var x = parse([ '--str', '000123' ], {
- string: 's',
- alias: { s: 'str' }
- });
-
- t.equal(x.str, '000123');
- t.equal(typeof x.str, 'string');
- t.equal(x.s, '000123');
- t.equal(typeof x.s, 'string');
-
- var y = parse([ '-s', '000123' ], {
- string: 'str',
- alias: { str: 's' }
- });
-
- t.equal(y.str, '000123');
- t.equal(typeof y.str, 'string');
- t.equal(y.s, '000123');
- t.equal(typeof y.s, 'string');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/short.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/whitespace.js b/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/package.json b/topics/00. Course-introduction/slides/node_modules/optimist/package.json
deleted file mode 100644
index 8fb0544..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_args": [
- [
- "optimist@0.6.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "optimist@>=0.6.0 <0.7.0",
- "_id": "optimist@0.6.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/optimist",
- "_npmUser": {
- "email": "mail@substack.net",
- "name": "substack"
- },
- "_npmVersion": "1.3.21",
- "_phantomChildren": {},
- "_requested": {
- "name": "optimist",
- "raw": "optimist@0.6.x",
- "rawSpec": "0.6.x",
- "scope": null,
- "spec": ">=0.6.0 <0.7.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
- "_shasum": "da3ea74686fa21a19a111c326e90eb15a0196686",
- "_shrinkwrap": null,
- "_spec": "optimist@0.6.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/node-optimist/issues"
- },
- "dependencies": {
- "minimist": "~0.0.1",
- "wordwrap": "~0.0.2"
- },
- "description": "Light-weight option parsing with an argv hash. No optstrings attached.",
- "devDependencies": {
- "hashish": "~0.0.4",
- "tap": "~0.4.0"
- },
- "directories": {},
- "dist": {
- "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686",
- "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz"
- },
- "engine": {
- "node": ">=0.4"
- },
- "homepage": "https://github.com/substack/node-optimist",
- "keywords": [
- "args",
- "argument",
- "cli",
- "command",
- "option",
- "parser",
- "parsing"
- ],
- "license": "MIT/X11",
- "main": "./index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "optimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/substack/node-optimist.git"
- },
- "scripts": {
- "test": "tap ./test/*.js"
- },
- "version": "0.6.1"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/readme.markdown b/topics/00. Course-introduction/slides/node_modules/optimist/readme.markdown
deleted file mode 100644
index b74b437..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/readme.markdown
+++ /dev/null
@@ -1,513 +0,0 @@
-# DEPRECATION NOTICE
-
-I don't want to maintain this module anymore since I just use
-[minimist](https://npmjs.org/package/minimist), the argument parsing engine,
-directly instead nowadays.
-
-See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed
-successor to optimist.
-
-[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs)
-
-You should also consider [nomnom](https://github.com/harthur/nomnom).
-
-optimist
-========
-
-Optimist is a node.js library for option parsing for people who hate option
-parsing. More specifically, this module is for people who like all the --bells
-and -whistlz of program usage but think optstrings are a waste of time.
-
-With optimist, option parsing doesn't have to suck (as much).
-
-[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)
-
-examples
-========
-
-With Optimist, the options are just a hash! No optstrings attached.
--------------------------------------------------------------------
-
-xup.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-
-if (argv.rif - 5 * argv.xup > 7.138) {
- console.log('Buy more riffiwobbles');
-}
-else {
- console.log('Sell the xupptumblers');
-}
-````
-
-***
-
- $ ./xup.js --rif=55 --xup=9.52
- Buy more riffiwobbles
-
- $ ./xup.js --rif 12 --xup 8.1
- Sell the xupptumblers
-
-![This one's optimistic.](http://substack.net/images/optimistic.png)
-
-But wait! There's more! You can do short options:
--------------------------------------------------
-
-short.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-````
-
-***
-
- $ ./short.js -x 10 -y 21
- (10,21)
-
-And booleans, both long and short (and grouped):
-----------------------------------
-
-bool.js:
-
-````javascript
-#!/usr/bin/env node
-var util = require('util');
-var argv = require('optimist').argv;
-
-if (argv.s) {
- util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
-}
-console.log(
- (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
-);
-````
-
-***
-
- $ ./bool.js -s
- The cat says: meow
-
- $ ./bool.js -sp
- The cat says: meow.
-
- $ ./bool.js -sp --fr
- Le chat dit: miaou.
-
-And non-hypenated options too! Just use `argv._`!
--------------------------------------------------
-
-nonopt.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-console.log(argv._);
-````
-
-***
-
- $ ./nonopt.js -x 6.82 -y 3.35 moo
- (6.82,3.35)
- [ 'moo' ]
-
- $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz
- (0.54,1.12)
- [ 'foo', 'bar', 'baz' ]
-
-Plus, Optimist comes with .usage() and .demand()!
--------------------------------------------------
-
-divide.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Usage: $0 -x [num] -y [num]')
- .demand(['x','y'])
- .argv;
-
-console.log(argv.x / argv.y);
-````
-
-***
-
- $ ./divide.js -x 55 -y 11
- 5
-
- $ node ./divide.js -x 4.91 -z 2.51
- Usage: node ./divide.js -x [num] -y [num]
-
- Options:
- -x [required]
- -y [required]
-
- Missing required arguments: y
-
-EVEN MORE HOLY COW
-------------------
-
-default_singles.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .default('x', 10)
- .default('y', 10)
- .argv
-;
-console.log(argv.x + argv.y);
-````
-
-***
-
- $ ./default_singles.js -x 5
- 15
-
-default_hash.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .default({ x : 10, y : 10 })
- .argv
-;
-console.log(argv.x + argv.y);
-````
-
-***
-
- $ ./default_hash.js -y 7
- 17
-
-And if you really want to get all descriptive about it...
----------------------------------------------------------
-
-boolean_single.js
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean('v')
- .argv
-;
-console.dir(argv);
-````
-
-***
-
- $ ./boolean_single.js -v foo bar baz
- true
- [ 'bar', 'baz', 'foo' ]
-
-boolean_double.js
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean(['x','y','z'])
- .argv
-;
-console.dir([ argv.x, argv.y, argv.z ]);
-console.dir(argv._);
-````
-
-***
-
- $ ./boolean_double.js -x -z one two three
- [ true, false, true ]
- [ 'one', 'two', 'three' ]
-
-Optimist is here to help...
----------------------------
-
-You can describe parameters for help messages and set aliases. Optimist figures
-out how to format a handy help string automatically.
-
-line_count.js
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .demand('f')
- .alias('f', 'file')
- .describe('f', 'Load a file')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines);
-});
-````
-
-***
-
- $ node line_count.js
- Count the lines in a file.
- Usage: node ./line_count.js
-
- Options:
- -f, --file Load a file [required]
-
- Missing required arguments: f
-
- $ node line_count.js --file line_count.js
- 20
-
- $ node line_count.js -f line_count.js
- 20
-
-methods
-=======
-
-By itself,
-
-````javascript
-require('optimist').argv
-`````
-
-will use `process.argv` array to construct the `argv` object.
-
-You can pass in the `process.argv` yourself:
-
-````javascript
-require('optimist')([ '-x', '1', '-y', '2' ]).argv
-````
-
-or use .parse() to do the same thing:
-
-````javascript
-require('optimist').parse([ '-x', '1', '-y', '2' ])
-````
-
-The rest of these methods below come in just before the terminating `.argv`.
-
-.alias(key, alias)
-------------------
-
-Set key names as equivalent such that updates to a key will propagate to aliases
-and vice-versa.
-
-Optionally `.alias()` can take an object that maps keys to aliases.
-
-.default(key, value)
---------------------
-
-Set `argv[key]` to `value` if no option was specified on `process.argv`.
-
-Optionally `.default()` can take an object that maps keys to default values.
-
-.demand(key)
-------------
-
-If `key` is a string, show the usage information and exit if `key` wasn't
-specified in `process.argv`.
-
-If `key` is a number, demand at least as many non-option arguments, which show
-up in `argv._`.
-
-If `key` is an Array, demand each element.
-
-.describe(key, desc)
---------------------
-
-Describe a `key` for the generated usage information.
-
-Optionally `.describe()` can take an object that maps keys to descriptions.
-
-.options(key, opt)
-------------------
-
-Instead of chaining together `.alias().demand().default()`, you can specify
-keys in `opt` for each of the chainable methods.
-
-For example:
-
-````javascript
-var argv = require('optimist')
- .options('f', {
- alias : 'file',
- default : '/etc/passwd',
- })
- .argv
-;
-````
-
-is the same as
-
-````javascript
-var argv = require('optimist')
- .alias('f', 'file')
- .default('f', '/etc/passwd')
- .argv
-;
-````
-
-Optionally `.options()` can take an object that maps keys to `opt` parameters.
-
-.usage(message)
----------------
-
-Set a usage message to show which commands to use. Inside `message`, the string
-`$0` will get interpolated to the current script name or node command for the
-present script similar to how `$0` works in bash or perl.
-
-.check(fn)
-----------
-
-Check that certain conditions are met in the provided arguments.
-
-If `fn` throws or returns `false`, show the thrown error, usage information, and
-exit.
-
-.boolean(key)
--------------
-
-Interpret `key` as a boolean. If a non-flag option follows `key` in
-`process.argv`, that string won't get set as the value of `key`.
-
-If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be
-`false`.
-
-If `key` is an Array, interpret all the elements as booleans.
-
-.string(key)
-------------
-
-Tell the parser logic not to interpret `key` as a number or boolean.
-This can be useful if you need to preserve leading zeros in an input.
-
-If `key` is an Array, interpret all the elements as strings.
-
-.wrap(columns)
---------------
-
-Format usage output to wrap at `columns` many columns.
-
-.help()
--------
-
-Return the generated usage string.
-
-.showHelp(fn=console.error)
----------------------------
-
-Print the usage data using `fn` for printing.
-
-.parse(args)
-------------
-
-Parse `args` instead of `process.argv`. Returns the `argv` object.
-
-.argv
------
-
-Get the arguments as a plain old object.
-
-Arguments without a corresponding flag show up in the `argv._` array.
-
-The script name or node command is available at `argv.$0` similarly to how `$0`
-works in bash or perl.
-
-parsing tricks
-==============
-
-stop parsing
-------------
-
-Use `--` to stop parsing flags and stuff the remainder into `argv._`.
-
- $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4
- { _: [ '-c', '3', '-d', '4' ],
- '$0': 'node ./examples/reflect.js',
- a: 1,
- b: 2 }
-
-negate fields
--------------
-
-If you want to explicity set a field to false instead of just leaving it
-undefined or to override a default you can do `--no-key`.
-
- $ node examples/reflect.js -a --no-b
- { _: [],
- '$0': 'node ./examples/reflect.js',
- a: true,
- b: false }
-
-numbers
--------
-
-Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to
-one. This way you can just `net.createConnection(argv.port)` and you can add
-numbers out of `argv` with `+` without having that mean concatenation,
-which is super frustrating.
-
-duplicates
-----------
-
-If you specify a flag multiple times it will get turned into an array containing
-all the values in order.
-
- $ node examples/reflect.js -x 5 -x 8 -x 0
- { _: [],
- '$0': 'node ./examples/reflect.js',
- x: [ 5, 8, 0 ] }
-
-dot notation
-------------
-
-When you use dots (`.`s) in argument names, an implicit object path is assumed.
-This lets you organize arguments into nested objects.
-
- $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5
- { _: [],
- '$0': 'node ./examples/reflect.js',
- foo: { bar: { baz: 33 }, quux: 5 } }
-
-short numbers
--------------
-
-Short numeric `head -n5` style argument work too:
-
- $ node reflect.js -n123 -m456
- { '3': true,
- '6': true,
- _: [],
- '$0': 'node ./reflect.js',
- n: 123,
- m: 456 }
-
-installation
-============
-
-With [npm](http://github.com/isaacs/npm), just do:
- npm install optimist
-
-or clone this project on github:
-
- git clone http://github.com/substack/node-optimist.git
-
-To run the tests with [expresso](http://github.com/visionmedia/expresso),
-just do:
-
- expresso
-
-inspired By
-===========
-
-This module is loosely inspired by Perl's
-[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/_.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/_.js
deleted file mode 100644
index d9c58b3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/_.js
+++ /dev/null
@@ -1,71 +0,0 @@
-var spawn = require('child_process').spawn;
-var test = require('tap').test;
-
-test('dotSlashEmpty', testCmd('./bin.js', []));
-
-test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ]));
-
-test('nodeEmpty', testCmd('node bin.js', []));
-
-test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ]));
-
-test('whichNodeEmpty', function (t) {
- var which = spawn('which', ['node']);
-
- which.stdout.on('data', function (buf) {
- t.test(
- testCmd(buf.toString().trim() + ' bin.js', [])
- );
- t.end();
- });
-
- which.stderr.on('data', function (err) {
- assert.error(err);
- t.end();
- });
-});
-
-test('whichNodeArgs', function (t) {
- var which = spawn('which', ['node']);
-
- which.stdout.on('data', function (buf) {
- t.test(
- testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ])
- );
- t.end();
- });
-
- which.stderr.on('data', function (err) {
- t.error(err);
- t.end();
- });
-});
-
-function testCmd (cmd, args) {
-
- return function (t) {
- var to = setTimeout(function () {
- assert.fail('Never got stdout data.')
- }, 5000);
-
- var oldDir = process.cwd();
- process.chdir(__dirname + '/_');
-
- var cmds = cmd.split(' ');
-
- var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String)));
- process.chdir(oldDir);
-
- bin.stderr.on('data', function (err) {
- t.error(err);
- t.end();
- });
-
- bin.stdout.on('data', function (buf) {
- clearTimeout(to);
- var _ = JSON.parse(buf.toString());
- t.same(_.map(String), args.map(String));
- t.end();
- });
- };
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/_/argv.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/_/argv.js
deleted file mode 100644
index 3d09606..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/_/argv.js
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env node
-console.log(JSON.stringify(process.argv));
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/_/bin.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/_/bin.js
deleted file mode 100755
index 4a18d85..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/_/bin.js
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-var argv = require('../../index').argv
-console.log(JSON.stringify(argv._));
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/dash.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/dash.js
deleted file mode 100644
index af8ed6f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/dash.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var optimist = require('../index');
-var test = require('tap').test;
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(
- fix(optimist.parse([ '-n', '-' ])),
- { n: '-', _: [] }
- );
- t.deepEqual(
- fix(optimist.parse([ '-' ])),
- { _: [ '-' ] }
- );
- t.deepEqual(
- fix(optimist.parse([ '-f-' ])),
- { f: '-', _: [] }
- );
- t.deepEqual(
- fix(optimist([ '-b', '-' ]).boolean('b').argv),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- fix(optimist([ '-s', '-' ]).string('s').argv),
- { s: '-', _: [] }
- );
-});
-
-function fix (obj) {
- delete obj.$0;
- return obj;
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/parse.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/parse.js
deleted file mode 100644
index d320f43..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/parse.js
+++ /dev/null
@@ -1,446 +0,0 @@
-var optimist = require('../index');
-var path = require('path');
-var test = require('tap').test;
-
-var $0 = 'node ./' + path.relative(process.cwd(), __filename);
-
-test('short boolean', function (t) {
- var parse = optimist.parse([ '-b' ]);
- t.same(parse, { b : true, _ : [], $0 : $0 });
- t.same(typeof parse.b, 'boolean');
- t.end();
-});
-
-test('long boolean', function (t) {
- t.same(
- optimist.parse([ '--bool' ]),
- { bool : true, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('bare', function (t) {
- t.same(
- optimist.parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 }
- );
- t.end();
-});
-
-test('short group', function (t) {
- t.same(
- optimist.parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('short group next', function (t) {
- t.same(
- optimist.parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('short capture', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('short captures', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('long capture sp', function (t) {
- t.same(
- optimist.parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('long capture eq', function (t) {
- t.same(
- optimist.parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [], $0 : $0 }
- );
- t.end()
-});
-
-test('long captures sp', function (t) {
- t.same(
- optimist.parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('long captures eq', function (t) {
- t.same(
- optimist.parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ], $0 : $0,
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ], $0 : $0,
- }
- );
- t.end();
-});
-
-test('no', function (t) {
- t.same(
- optimist.parse([ '--no-moo' ]),
- { moo : false, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('multi', function (t) {
- t.same(
- optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.same(
- optimist.parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ],
- $0 : $0
- }
- );
- t.end();
-});
-
-test('nums', function (t) {
- var argv = optimist.parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789',
- ]);
- t.same(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ],
- $0 : $0
- });
- t.same(typeof argv.x, 'number');
- t.same(typeof argv.y, 'number');
- t.same(typeof argv.z, 'number');
- t.same(typeof argv.w, 'string');
- t.same(typeof argv.hex, 'number');
- t.same(typeof argv._[0], 'number');
- t.end();
-});
-
-test('flag boolean', function (t) {
- var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv;
- t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 });
- t.same(typeof parse.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true'])
- .boolean(['t', 'verbose']).default('verbose', true).argv;
-
- t.same(parse, {
- verbose: false,
- t: true,
- _: ['moo'],
- $0 : $0
- });
-
- t.same(typeof parse.verbose, 'boolean');
- t.same(typeof parse.t, 'boolean');
- t.end();
-});
-
-test('flag boolean default false', function (t) {
- var parse = optimist(['moo'])
- .boolean(['t', 'verbose'])
- .default('verbose', false)
- .default('t', false).argv;
-
- t.same(parse, {
- verbose: false,
- t: false,
- _: ['moo'],
- $0 : $0
- });
-
- t.same(typeof parse.verbose, 'boolean');
- t.same(typeof parse.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ])
- .boolean(['x','y','z']).argv;
-
- t.same(parse, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ],
- $0 : $0
- });
-
- t.same(typeof parse.x, 'boolean');
- t.same(typeof parse.y, 'boolean');
- t.same(typeof parse.z, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = optimist.parse([ '-s', "X\nX" ])
- t.same(args, { _ : [], s : "X\nX", $0 : $0 });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = optimist.parse([ "--s=X\nX" ])
- t.same(args, { _ : [], s : "X\nX", $0 : $0 });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = optimist([ '-s', '0001234' ]).string('s').argv.s;
- t.same(s, '0001234');
- t.same(typeof s, 'string');
-
- var x = optimist([ '-x', '56' ]).string('x').argv.x;
- t.same(x, '56');
- t.same(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = optimist([ ' ', ' ' ]).string('_').argv._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- optimist.parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [], $0 : $0 }
- );
- t.same(
- optimist.parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = optimist([ '-f', '11', '--zoom', '55' ])
- .alias('z', 'zoom')
- .argv
- ;
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = optimist([ '-f', '11', '--zoom', '55' ])
- .alias('z', [ 'zm', 'zoom' ])
- .argv
- ;
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('boolean default true', function (t) {
- var argv = optimist.options({
- sometrue: {
- boolean: true,
- default: true
- }
- }).argv;
-
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = optimist.options({
- somefalse: {
- boolean: true,
- default: false
- }
- }).argv;
-
- t.equal(argv.somefalse, false);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = optimist([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]).argv;
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- },
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = optimist(aliased)
- .boolean('herp')
- .alias('h', 'herp')
- .argv;
- var propertyArgv = optimist(regular)
- .boolean('herp')
- .alias('h', 'herp')
- .argv;
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ],
- '$0': $0,
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = optimist(aliased)
- .options(opts)
- .argv;
- var propertyArgv = optimist(regular).options(opts).argv;
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ],
- '$0': $0,
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
-
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = optimist(aliased)
- .boolean('h')
- .alias('h', 'herp')
- .argv;
- var propertyArgv = optimist(regular)
- .boolean('h')
- .alias('h', 'herp')
- .argv;
- var expected = {
- herp: true,
- h: true,
- '_': [ ],
- '$0': $0,
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv;
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = optimist(['--boool', '--other=false']).boolean('boool').argv;
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/parse_modified.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/parse_modified.js
deleted file mode 100644
index a57dc84..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/parse_modified.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var optimist = require('../');
-var test = require('tap').test;
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = optimist().boolean('b').parse([ '-b', '123' ]);
- t.deepEqual(fix(argv), { b: true, _: ['123'] });
-});
-
-function fix (obj) {
- delete obj.$0;
- return obj;
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/short.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/short.js
deleted file mode 100644
index b2c38ad..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/short.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var optimist = require('../index');
-var test = require('tap').test;
-
-test('-n123', function (t) {
- t.plan(1);
- var parse = optimist.parse([ '-n123' ]);
- t.equal(parse.n, 123);
-});
-
-test('-123', function (t) {
- t.plan(3);
- var parse = optimist.parse([ '-123', '456' ]);
- t.equal(parse['1'], true);
- t.equal(parse['2'], true);
- t.equal(parse['3'], 456);
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/usage.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/usage.js
deleted file mode 100644
index 300454c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/usage.js
+++ /dev/null
@@ -1,292 +0,0 @@
-var Hash = require('hashish');
-var optimist = require('../index');
-var test = require('tap').test;
-
-test('usageFail', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -z 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .demand(['x','y'])
- .argv;
- });
- t.same(
- r.result,
- { x : 10, z : 20, _ : [], $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/),
- [
- 'Usage: ./usage -x NUM -y NUM',
- 'Options:',
- ' -x [required]',
- ' -y [required]',
- 'Missing required arguments: y',
- ]
- );
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-
-test('usagePass', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -y 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .demand(['x','y'])
- .argv;
- });
- t.same(r, {
- result : { x : 10, y : 20, _ : [], $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('checkPass', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -y 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(function (argv) {
- if (!('x' in argv)) throw 'You forgot about -x';
- if (!('y' in argv)) throw 'You forgot about -y';
- })
- .argv;
- });
- t.same(r, {
- result : { x : 10, y : 20, _ : [], $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('checkFail', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -z 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(function (argv) {
- if (!('x' in argv)) throw 'You forgot about -x';
- if (!('y' in argv)) throw 'You forgot about -y';
- })
- .argv;
- });
-
- t.same(
- r.result,
- { x : 10, z : 20, _ : [], $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/),
- [
- 'Usage: ./usage -x NUM -y NUM',
- 'You forgot about -y'
- ]
- );
-
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-test('checkCondPass', function (t) {
- function checker (argv) {
- return 'x' in argv && 'y' in argv;
- }
-
- var r = checkUsage(function () {
- return optimist('-x 10 -y 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(checker)
- .argv;
- });
- t.same(r, {
- result : { x : 10, y : 20, _ : [], $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('checkCondFail', function (t) {
- function checker (argv) {
- return 'x' in argv && 'y' in argv;
- }
-
- var r = checkUsage(function () {
- return optimist('-x 10 -z 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(checker)
- .argv;
- });
-
- t.same(
- r.result,
- { x : 10, z : 20, _ : [], $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/).join('\n'),
- 'Usage: ./usage -x NUM -y NUM\n'
- + 'Argument check failed: ' + checker.toString()
- );
-
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-test('countPass', function (t) {
- var r = checkUsage(function () {
- return optimist('1 2 3 --moo'.split(' '))
- .usage('Usage: $0 [x] [y] [z] {OPTIONS}')
- .demand(3)
- .argv;
- });
- t.same(r, {
- result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('countFail', function (t) {
- var r = checkUsage(function () {
- return optimist('1 2 --moo'.split(' '))
- .usage('Usage: $0 [x] [y] [z] {OPTIONS}')
- .demand(3)
- .argv;
- });
- t.same(
- r.result,
- { _ : [ '1', '2' ], moo : true, $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/),
- [
- 'Usage: ./usage [x] [y] [z] {OPTIONS}',
- 'Not enough non-option arguments: got 2, need at least 3',
- ]
- );
-
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-test('defaultSingles', function (t) {
- var r = checkUsage(function () {
- return optimist('--foo 50 --baz 70 --powsy'.split(' '))
- .default('foo', 5)
- .default('bar', 6)
- .default('baz', 7)
- .argv
- ;
- });
- t.same(r.result, {
- foo : '50',
- bar : 6,
- baz : '70',
- powsy : true,
- _ : [],
- $0 : './usage',
- });
- t.end();
-});
-
-test('defaultAliases', function (t) {
- var r = checkUsage(function () {
- return optimist('')
- .alias('f', 'foo')
- .default('f', 5)
- .argv
- ;
- });
- t.same(r.result, {
- f : '5',
- foo : '5',
- _ : [],
- $0 : './usage',
- });
- t.end();
-});
-
-test('defaultHash', function (t) {
- var r = checkUsage(function () {
- return optimist('--foo 50 --baz 70'.split(' '))
- .default({ foo : 10, bar : 20, quux : 30 })
- .argv
- ;
- });
- t.same(r.result, {
- _ : [],
- $0 : './usage',
- foo : 50,
- baz : 70,
- bar : 20,
- quux : 30,
- });
- t.end();
-});
-
-test('rebase', function (t) {
- t.equal(
- optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'),
- './foo/bar/baz'
- );
- t.equal(
- optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'),
- '../../..'
- );
- t.equal(
- optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'),
- '../pow/zoom.txt'
- );
- t.end();
-});
-
-function checkUsage (f) {
-
- var exit = false;
-
- process._exit = process.exit;
- process._env = process.env;
- process._argv = process.argv;
-
- process.exit = function (t) { exit = true };
- process.env = Hash.merge(process.env, { _ : 'node' });
- process.argv = [ './usage' ];
-
- var errors = [];
- var logs = [];
-
- console._error = console.error;
- console.error = function (msg) { errors.push(msg) };
- console._log = console.log;
- console.log = function (msg) { logs.push(msg) };
-
- var result = f();
-
- process.exit = process._exit;
- process.env = process._env;
- process.argv = process._argv;
-
- console.error = console._error;
- console.log = console._log;
-
- return {
- errors : errors,
- logs : logs,
- exit : exit,
- result : result,
- };
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/optimist/test/whitespace.js b/topics/00. Course-introduction/slides/node_modules/optimist/test/whitespace.js
deleted file mode 100644
index 90b9075..0000000
--- a/topics/00. Course-introduction/slides/node_modules/optimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var optimist = require('../');
-var test = require('tap').test;
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = optimist.parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/.npmignore b/topics/00. Course-introduction/slides/node_modules/portfinder/.npmignore
deleted file mode 100644
index 5171c54..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-npm-debug.log
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/.travis.yml b/topics/00. Course-introduction/slides/node_modules/portfinder/.travis.yml
deleted file mode 100644
index 62b5273..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.11"
-
-before_install:
- - travis_retry npm install -g npm
- - travis_retry npm install
-
-script:
- - npm test
-
-matrix:
- allow_failures:
- - node_js: "0.11"
-
-notifications:
- email:
- - travis@nodejitsu.com
- irc: "irc.freenode.org#nodejitsu"
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/LICENSE b/topics/00. Course-introduction/slides/node_modules/portfinder/LICENSE
deleted file mode 100644
index d26f4a2..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-node-portfinder
-
-Copyright (c) 2012 Charlie Robbins
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/README.md b/topics/00. Course-introduction/slides/node_modules/portfinder/README.md
deleted file mode 100644
index 229ccf0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# node-portfinder [![Build Status](https://api.travis-ci.org/indexzero/node-portfinder.svg)](https://travis-ci.org/indexzero/node-portfinder)
-
-## Installation
-
-### Installing npm (node package manager)
-``` bash
- curl http://npmjs.org/install.sh | sh
-```
-
-### Installing node-portfinder
-``` bash
- $ [sudo] npm install portfinder
-```
-
-## Usage
-The `portfinder` module has a simple interface:
-
-``` js
- var portfinder = require('portfinder');
-
- portfinder.getPort(function (err, port) {
- //
- // `port` is guaranteed to be a free port
- // in this scope.
- //
- });
-```
-
-By default `portfinder` will start searching from `8000`. To change this simply set `portfinder.basePort`.
-
-## Run Tests
-``` bash
- $ npm test
-```
-
-#### Author: [Charlie Robbins][0]
-#### License: MIT/X11
-[0]: http://nodejitsu.com
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/lib/portfinder.js b/topics/00. Course-introduction/slides/node_modules/portfinder/lib/portfinder.js
deleted file mode 100644
index 3da2562..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/lib/portfinder.js
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * portfinder.js: A simple tool to find an open port on the current machine.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var fs = require('fs'),
- net = require('net'),
- path = require('path'),
- async = require('async'),
- mkdirp = require('mkdirp').mkdirp;
-
-//
-// ### @basePort {Number}
-// The lowest port to begin any port search from
-//
-exports.basePort = 8000;
-
-//
-// ### @basePath {string}
-// Default path to begin any socket search from
-//
-exports.basePath = '/tmp/portfinder'
-
-//
-// ### function getPort (options, callback)
-// #### @options {Object} Settings to use when finding the necessary port
-// #### @callback {function} Continuation to respond to when complete.
-// Responds with a unbound port on the current machine.
-//
-exports.getPort = function (options, callback) {
- if (!callback) {
- callback = options;
- options = {};
- }
-
- options.port = options.port || exports.basePort;
- options.host = options.host || null;
- options.server = options.server || net.createServer(function () {
- //
- // Create an empty listener for the port testing server.
- //
- });
-
- function onListen () {
- options.server.removeListener('error', onError);
- options.server.close();
- callback(null, options.port)
- }
-
- function onError (err) {
- options.server.removeListener('listening', onListen);
-
- if (err.code !== 'EADDRINUSE' && err.code !== 'EACCES') {
- return callback(err);
- }
-
- exports.getPort({
- port: exports.nextPort(options.port),
- host: options.host,
- server: options.server
- }, callback);
- }
-
- options.server.once('error', onError);
- options.server.once('listening', onListen);
- options.server.listen(options.port, options.host);
-};
-
-//
-// ### function getPorts (count, options, callback)
-// #### @count {Number} The number of ports to find
-// #### @options {Object} Settings to use when finding the necessary port
-// #### @callback {function} Continuation to respond to when complete.
-// Responds with an array of unbound ports on the current machine.
-//
-exports.getPorts = function (count, options, callback) {
- if (!callback) {
- callback = options;
- options = {};
- }
-
- var lastPort = null;
- async.timesSeries(count, function(index, asyncCallback) {
- if (lastPort) {
- options.port = exports.nextPort(lastPort);
- }
-
- exports.getPort(options, function (err, port) {
- if (err) {
- asyncCallback(err);
- } else {
- lastPort = port;
- asyncCallback(null, port);
- }
- });
- }, callback);
-};
-
-//
-// ### function getSocket (options, callback)
-// #### @options {Object} Settings to use when finding the necessary port
-// #### @callback {function} Continuation to respond to when complete.
-// Responds with a unbound socket using the specified directory and base
-// name on the current machine.
-//
-exports.getSocket = function (options, callback) {
- if (!callback) {
- callback = options;
- options = {};
- }
-
- options.mod = options.mod || 0755;
- options.path = options.path || exports.basePath + '.sock';
-
- //
- // Tests the specified socket
- //
- function testSocket () {
- fs.stat(options.path, function (err) {
- //
- // If file we're checking doesn't exist (thus, stating it emits ENOENT),
- // we should be OK with listening on this socket.
- //
- if (err) {
- if (err.code == 'ENOENT') {
- callback(null, options.path);
- }
- else {
- callback(err);
- }
- }
- else {
- //
- // This file exists, so it isn't possible to listen on it. Lets try
- // next socket.
- //
- options.path = exports.nextSocket(options.path);
- exports.getSocket(options, callback);
- }
- });
- }
-
- //
- // Create the target `dir` then test connection
- // against the socket.
- //
- function createAndTestSocket (dir) {
- mkdirp(dir, options.mod, function (err) {
- if (err) {
- return callback(err);
- }
-
- options.exists = true;
- testSocket();
- });
- }
-
- //
- // Check if the parent directory of the target
- // socket path exists. If it does, test connection
- // against the socket. Otherwise, create the directory
- // then test connection.
- //
- function checkAndTestSocket () {
- var dir = path.dirname(options.path);
-
- fs.stat(dir, function (err, stats) {
- if (err || !stats.isDirectory()) {
- return createAndTestSocket(dir);
- }
-
- options.exists = true;
- testSocket();
- });
- }
-
- //
- // If it has been explicitly stated that the
- // target `options.path` already exists, then
- // simply test the socket.
- //
- return options.exists
- ? testSocket()
- : checkAndTestSocket();
-};
-
-//
-// ### function nextPort (port)
-// #### @port {Number} Port to increment from.
-// Gets the next port in sequence from the
-// specified `port`.
-//
-exports.nextPort = function (port) {
- return port + 1;
-};
-
-//
-// ### function nextSocket (socketPath)
-// #### @socketPath {string} Path to increment from
-// Gets the next socket path in sequence from the
-// specified `socketPath`.
-//
-exports.nextSocket = function (socketPath) {
- var dir = path.dirname(socketPath),
- name = path.basename(socketPath, '.sock'),
- match = name.match(/^([a-zA-z]+)(\d*)$/i),
- index = parseInt(match[2]),
- base = match[1];
-
- if (isNaN(index)) {
- index = 0;
- }
-
- index += 1;
- return path.join(dir, base + index + '.sock');
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/package.json b/topics/00. Course-introduction/slides/node_modules/portfinder/package.json
deleted file mode 100644
index 19c04d5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_args": [
- [
- "portfinder@0.4.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "portfinder@>=0.4.0 <0.5.0",
- "_id": "portfinder@0.4.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/portfinder",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "email": "charlie.robbins@gmail.com",
- "name": "indexzero"
- },
- "_npmVersion": "2.2.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "portfinder",
- "raw": "portfinder@0.4.x",
- "rawSpec": "0.4.x",
- "scope": null,
- "spec": ">=0.4.0 <0.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz",
- "_shasum": "a3ffadffafe4fb98e0601a85eda27c27ce84ca1e",
- "_shrinkwrap": null,
- "_spec": "portfinder@0.4.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "charlie.robbins@gmail.com",
- "name": "Charlie Robbins"
- },
- "bugs": {
- "url": "https://github.com/indexzero/node-portfinder/issues"
- },
- "dependencies": {
- "async": "0.9.0",
- "mkdirp": "0.5.x"
- },
- "description": "A simple tool to find an open port on the current machine",
- "devDependencies": {
- "vows": "0.8.0"
- },
- "directories": {},
- "dist": {
- "shasum": "a3ffadffafe4fb98e0601a85eda27c27ce84ca1e",
- "tarball": "http://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "gitHead": "8c3f20bf1d5ec399262c592f61129a65727004a9",
- "homepage": "https://github.com/indexzero/node-portfinder",
- "keywords": [
- "http",
- "ports",
- "utilities"
- ],
- "license": "MIT/X11",
- "main": "./lib/portfinder",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- }
- ],
- "name": "portfinder",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/indexzero/node-portfinder.git"
- },
- "scripts": {
- "test": "vows test/*-test.js --spec"
- },
- "version": "0.4.0"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/test/fixtures/.gitkeep b/topics/00. Course-introduction/slides/node_modules/portfinder/test/fixtures/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-multiple-test.js b/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-multiple-test.js
deleted file mode 100644
index ede487e..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-multiple-test.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * portfinder-test.js: Tests for the `portfinder` module.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var vows = require('vows'),
- assert = require('assert'),
- async = require('async'),
- http = require('http'),
- portfinder = require('../lib/portfinder');
-
-var servers = [];
-
-function createServers (callback) {
- var base = 8000;
-
- async.whilst(
- function () { return base < 8005 },
- function (next) {
- var server = http.createServer(function () { });
- server.listen(base, next);
- base++;
- servers.push(server);
- }, callback);
-}
-
-vows.describe('portfinder').addBatch({
- "When using portfinder module": {
- "with 5 existing servers": {
- topic: function () {
- createServers(this.callback);
- },
- "the getPorts() method with an argument of 3": {
- topic: function () {
- portfinder.getPorts(3, this.callback);
- },
- "should respond with the first three available ports (8005, 8006, 8007)": function (err, ports) {
- assert.isTrue(!err);
- assert.deepEqual(ports, [8005, 8006, 8007]);
- }
- }
- }
- }
-}).addBatch({
- "When using portfinder module": {
- "with no existing servers": {
- topic: function () {
- servers.forEach(function (server) {
- server.close();
- });
-
- return null;
- },
- "the getPorts() method with an argument of 3": {
- topic: function () {
- portfinder.getPorts(3, this.callback);
- },
- "should respond with the first three available ports (8000, 8001, 80072": function (err, ports) {
- assert.isTrue(!err);
- assert.deepEqual(ports, [8000, 8001, 8002]);
- }
- }
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-socket-test.js b/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-socket-test.js
deleted file mode 100644
index 91c840c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-socket-test.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * portfinder-test.js: Tests for the `portfinder` module.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var assert = require('assert'),
- exec = require('child_process').exec,
- net = require('net'),
- path = require('path'),
- async = require('async'),
- vows = require('vows'),
- portfinder = require('../lib/portfinder');
-
-var servers = [],
- socketDir = path.join(__dirname, 'fixtures'),
- badDir = path.join(__dirname, 'bad-dir');
-
-function createServers (callback) {
- var base = 0;
-
- async.whilst(
- function () { return base < 5 },
- function (next) {
- var server = net.createServer(function () { }),
- name = base === 0 ? 'test.sock' : 'test' + base + '.sock';
-
- server.listen(path.join(socketDir, name), next);
- base++;
- servers.push(server);
- }, callback);
-}
-
-vows.describe('portfinder').addBatch({
- "When using portfinder module": {
- "with 5 existing servers": {
- topic: function () {
- createServers(this.callback);
- },
- "the getPort() method": {
- topic: function () {
- portfinder.getSocket({
- path: path.join(socketDir, 'test.sock')
- }, this.callback);
- },
- "should respond with the first free socket (test5.sock)": function (err, socket) {
- assert.isTrue(!err);
- assert.equal(socket, path.join(socketDir, 'test5.sock'));
- }
- }
- }
- }
-}).addBatch({
- "When using portfinder module": {
- "with no existing servers": {
- "the getSocket() method": {
- "with a directory that doesnt exist": {
- topic: function () {
- var that = this;
- exec('rm -rf ' + badDir, function () {
- portfinder.getSocket({
- path: path.join(badDir, 'test.sock')
- }, that.callback);
- });
- },
- "should respond with the first free socket (test.sock)": function (err, socket) {
- assert.isTrue(!err);
- assert.equal(socket, path.join(badDir, 'test.sock'));
- }
- },
- "with a directory that exists": {
- topic: function () {
- portfinder.getSocket({
- path: path.join(socketDir, 'exists.sock')
- }, this.callback);
- },
- "should respond with the first free socket (exists.sock)": function (err, socket) {
- assert.isTrue(!err);
- assert.equal(socket, path.join(socketDir, 'exists.sock'));
- }
- }
- }
- }
- }
-}).addBatch({
- "When the tests are over": {
- "necessary cleanup should take place": function () {
- exec('rm -rf ' + badDir + ' ' + path.join(socketDir, '*'), function () { });
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-test.js b/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-test.js
deleted file mode 100644
index c10ded9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/portfinder/test/port-finder-test.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * portfinder-test.js: Tests for the `portfinder` module.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var vows = require('vows'),
- assert = require('assert'),
- async = require('async'),
- http = require('http'),
- portfinder = require('../lib/portfinder');
-
-var servers = [];
-
-function createServers (callback) {
- var base = 8000;
-
- async.whilst(
- function () { return base < 8005 },
- function (next) {
- var server = http.createServer(function () { });
- server.listen(base, next);
- base++;
- servers.push(server);
- }, callback);
-}
-
-vows.describe('portfinder').addBatch({
- "When using portfinder module": {
- "with 5 existing servers": {
- topic: function () {
- createServers(this.callback);
- },
- "the getPort() method": {
- topic: function () {
- portfinder.getPort(this.callback);
- },
- "should respond with the first free port (8005)": function (err, port) {
- assert.isTrue(!err);
- assert.equal(port, 8005);
- }
- }
- }
- }
-}).addBatch({
- "When using portfinder module": {
- "with no existing servers": {
- topic: function () {
- servers.forEach(function (server) {
- server.close();
- });
-
- return null;
- },
- "the getPort() method": {
- topic: function () {
- portfinder.getPort(this.callback);
- },
- "should respond with the first free port (8000)": function (err, port) {
- assert.isTrue(!err);
- assert.equal(port, 8000);
- }
- }
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/.jshintignore b/topics/00. Course-introduction/slides/node_modules/qs/.jshintignore
deleted file mode 100644
index 3c3629e..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/.jshintrc b/topics/00. Course-introduction/slides/node_modules/qs/.jshintrc
deleted file mode 100644
index 997b3f7..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/.jshintrc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "node": true,
-
- "curly": true,
- "latedef": true,
- "quotmark": true,
- "undef": true,
- "unused": true,
- "trailing": true
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/.npmignore b/topics/00. Course-introduction/slides/node_modules/qs/.npmignore
deleted file mode 100644
index 7e1574d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-complexity.md
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/.travis.yml b/topics/00. Course-introduction/slides/node_modules/qs/.travis.yml
deleted file mode 100644
index c891dd0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/CHANGELOG.md b/topics/00. Course-introduction/slides/node_modules/qs/CHANGELOG.md
deleted file mode 100644
index f5ee8b4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/CHANGELOG.md
+++ /dev/null
@@ -1,68 +0,0 @@
-
-## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=open)
-- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57
-- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader
-
-## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed)
-- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object
-
-## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
-- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
-
-## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
-- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
-
-## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed)
-- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer?
-- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
-- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39
-
-## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed)
-- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number
-
-## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed)
-- [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array
-- [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x
-
-## [**2.2.2**](https://github.com/hapijs/qs/issues?milestone=11&state=closed)
-- [**#33**](https://github.com/hapijs/qs/issues/33) Error when plain object in a value
-- [**#34**](https://github.com/hapijs/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
-- [**#24**](https://github.com/hapijs/qs/issues/24) Changelog? Semver?
-
-## [**2.2.1**](https://github.com/hapijs/qs/issues?milestone=10&state=closed)
-- [**#32**](https://github.com/hapijs/qs/issues/32) account for circular references properly, closes #31
-- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects
-
-## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed)
-- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present
-- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays
-- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
-- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters?
-
-## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed)
-- [**#22**](https://github.com/hapijs/qs/issues/22) Enable using a RegExp as delimiter
-
-## [**2.0.0**](https://github.com/hapijs/qs/issues?milestone=7&state=closed)
-- [**#18**](https://github.com/hapijs/qs/issues/18) Why is there arrayLimit?
-- [**#20**](https://github.com/hapijs/qs/issues/20) Configurable parametersLimit
-- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20
-
-## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed)
-- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values
-
-## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed)
-- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters
-- [**#15**](https://github.com/hapijs/qs/issues/15) Close code block
-
-## [**1.2.0**](https://github.com/hapijs/qs/issues?milestone=4&state=closed)
-- [**#12**](https://github.com/hapijs/qs/issues/12) Add optional delim argument
-- [**#13**](https://github.com/hapijs/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
-
-## [**1.1.0**](https://github.com/hapijs/qs/issues?milestone=3&state=closed)
-- [**#7**](https://github.com/hapijs/qs/issues/7) Empty values of a POST array disappear after being submitted
-- [**#9**](https://github.com/hapijs/qs/issues/9) Should not omit equals signs (=) when value is null
-- [**#6**](https://github.com/hapijs/qs/issues/6) Minor grammar fix in README
-
-## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed)
-- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index
-
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/CONTRIBUTING.md b/topics/00. Course-introduction/slides/node_modules/qs/CONTRIBUTING.md
deleted file mode 100644
index 8928361..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/CONTRIBUTING.md
+++ /dev/null
@@ -1 +0,0 @@
-Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/LICENSE b/topics/00. Course-introduction/slides/node_modules/qs/LICENSE
deleted file mode 100755
index d456948..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2014 Nathan LaFreniere and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/Makefile b/topics/00. Course-introduction/slides/node_modules/qs/Makefile
deleted file mode 100644
index 31cc899..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-test:
- @node node_modules/lab/bin/lab -a code -L
-test-cov:
- @node node_modules/lab/bin/lab -a code -t 100 -L
-test-cov-html:
- @node node_modules/lab/bin/lab -a code -L -r html -o coverage.html
-
-.PHONY: test test-cov test-cov-html
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/README.md b/topics/00. Course-introduction/slides/node_modules/qs/README.md
deleted file mode 100755
index 21bf3fa..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/README.md
+++ /dev/null
@@ -1,222 +0,0 @@
-# qs
-
-A querystring parsing and stringifying library with some added security.
-
-[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs)
-
-Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
-
-The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
-
-## Usage
-
-```javascript
-var Qs = require('qs');
-
-var obj = Qs.parse('a=c'); // { a: 'c' }
-var str = Qs.stringify(obj); // 'a=c'
-```
-
-### Parsing Objects
-
-```javascript
-Qs.parse(string, [options]);
-```
-
-**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
-For example, the string `'foo[bar]=baz'` converts to:
-
-```javascript
-{
- foo: {
- bar: 'baz'
- }
-}
-```
-
-URI encoded strings work too:
-
-```javascript
-Qs.parse('a%5Bb%5D=c');
-// { a: { b: 'c' } }
-```
-
-You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
-
-```javascript
-{
- foo: {
- bar: {
- baz: 'foobarbaz'
- }
- }
-}
-```
-
-By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
-`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
-
-```javascript
-{
- a: {
- b: {
- c: {
- d: {
- e: {
- f: {
- '[g][h][i]': 'j'
- }
- }
- }
- }
- }
- }
-}
-```
-
-This depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`:
-
-```javascript
-Qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
-// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }
-```
-
-The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
-
-For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
-
-```javascript
-Qs.parse('a=b&c=d', { parameterLimit: 1 });
-// { a: 'b' }
-```
-
-An optional delimiter can also be passed:
-
-```javascript
-Qs.parse('a=b;c=d', { delimiter: ';' });
-// { a: 'b', c: 'd' }
-```
-
-Delimiters can be a regular expression too:
-
-```javascript
-Qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
-// { a: 'b', c: 'd', e: 'f' }
-```
-
-### Parsing Arrays
-
-**qs** can also parse arrays using a similar `[]` notation:
-
-```javascript
-Qs.parse('a[]=b&a[]=c');
-// { a: ['b', 'c'] }
-```
-
-You may specify an index as well:
-
-```javascript
-Qs.parse('a[1]=c&a[0]=b');
-// { a: ['b', 'c'] }
-```
-
-Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
-to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
-their order:
-
-```javascript
-Qs.parse('a[1]=b&a[15]=c');
-// { a: ['b', 'c'] }
-```
-
-Note that an empty string is also a value, and will be preserved:
-
-```javascript
-Qs.parse('a[]=&a[]=b');
-// { a: ['', 'b'] }
-Qs.parse('a[0]=b&a[1]=&a[2]=c');
-// { a: ['b', '', 'c'] }
-```
-
-**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
-instead be converted to an object with the index as the key:
-
-```javascript
-Qs.parse('a[100]=b');
-// { a: { '100': 'b' } }
-```
-
-This limit can be overridden by passing an `arrayLimit` option:
-
-```javascript
-Qs.parse('a[1]=b', { arrayLimit: 0 });
-// { a: { '1': 'b' } }
-```
-
-To disable array parsing entirely, set `arrayLimit` to `-1`.
-
-If you mix notations, **qs** will merge the two items into an object:
-
-```javascript
-Qs.parse('a[0]=b&a[b]=c');
-// { a: { '0': 'b', b: 'c' } }
-```
-
-You can also create arrays of objects:
-
-```javascript
-Qs.parse('a[][b]=c');
-// { a: [{ b: 'c' }] }
-```
-
-### Stringifying
-
-```javascript
-Qs.stringify(object, [options]);
-```
-
-When stringifying, **qs** always URI encodes output. Objects are stringified as you would expect:
-
-```javascript
-Qs.stringify({ a: 'b' });
-// 'a=b'
-Qs.stringify({ a: { b: 'c' } });
-// 'a%5Bb%5D=c'
-```
-
-Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
-
-When arrays are stringified, by default they are given explicit indices:
-
-```javascript
-Qs.stringify({ a: ['b', 'c', 'd'] });
-// 'a[0]=b&a[1]=c&a[2]=d'
-```
-
-You may override this by setting the `indices` option to `false`:
-
-```javascript
-Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
-// 'a=b&a=c&a=d'
-```
-
-Empty strings and null values will omit the value, but the equals sign (=) remains in place:
-
-```javascript
-Qs.stringify({ a: '' });
-// 'a='
-```
-
-Properties that are set to `undefined` will be omitted entirely:
-
-```javascript
-Qs.stringify({ a: null, b: undefined });
-// 'a='
-```
-
-The delimiter may be overridden with stringify as well:
-
-```javascript
-Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' });
-// 'a=b;c=d'
-```
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/index.js b/topics/00. Course-introduction/slides/node_modules/qs/index.js
deleted file mode 100644
index 2291cd8..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/');
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/lib/index.js b/topics/00. Course-introduction/slides/node_modules/qs/lib/index.js
deleted file mode 100755
index 0e09493..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/lib/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Load modules
-
-var Stringify = require('./stringify');
-var Parse = require('./parse');
-
-
-// Declare internals
-
-var internals = {};
-
-
-module.exports = {
- stringify: Stringify,
- parse: Parse
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/lib/parse.js b/topics/00. Course-introduction/slides/node_modules/qs/lib/parse.js
deleted file mode 100755
index 4e7d02a..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/lib/parse.js
+++ /dev/null
@@ -1,157 +0,0 @@
-// Load modules
-
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {
- delimiter: '&',
- depth: 5,
- arrayLimit: 20,
- parameterLimit: 1000
-};
-
-
-internals.parseValues = function (str, options) {
-
- var obj = {};
- var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
-
- for (var i = 0, il = parts.length; i < il; ++i) {
- var part = parts[i];
- var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
-
- if (pos === -1) {
- obj[Utils.decode(part)] = '';
- }
- else {
- var key = Utils.decode(part.slice(0, pos));
- var val = Utils.decode(part.slice(pos + 1));
-
- if (!obj.hasOwnProperty(key)) {
- obj[key] = val;
- }
- else {
- obj[key] = [].concat(obj[key]).concat(val);
- }
- }
- }
-
- return obj;
-};
-
-
-internals.parseObject = function (chain, val, options) {
-
- if (!chain.length) {
- return val;
- }
-
- var root = chain.shift();
-
- var obj = {};
- if (root === '[]') {
- obj = [];
- obj = obj.concat(internals.parseObject(chain, val, options));
- }
- else {
- var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
- var index = parseInt(cleanRoot, 10);
- var indexString = '' + index;
- if (!isNaN(index) &&
- root !== cleanRoot &&
- indexString === cleanRoot &&
- index >= 0 &&
- index <= options.arrayLimit) {
-
- obj = [];
- obj[index] = internals.parseObject(chain, val, options);
- }
- else {
- obj[cleanRoot] = internals.parseObject(chain, val, options);
- }
- }
-
- return obj;
-};
-
-
-internals.parseKeys = function (key, val, options) {
-
- if (!key) {
- return;
- }
-
- // The regex chunks
-
- var parent = /^([^\[\]]*)/;
- var child = /(\[[^\[\]]*\])/g;
-
- // Get the parent
-
- var segment = parent.exec(key);
-
- // Don't allow them to overwrite object prototype properties
-
- if (Object.prototype.hasOwnProperty(segment[1])) {
- return;
- }
-
- // Stash the parent if it exists
-
- var keys = [];
- if (segment[1]) {
- keys.push(segment[1]);
- }
-
- // Loop through children appending to the array until we hit depth
-
- var i = 0;
- while ((segment = child.exec(key)) !== null && i < options.depth) {
-
- ++i;
- if (!Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
- keys.push(segment[1]);
- }
- }
-
- // If there's a remainder, just add whatever is left
-
- if (segment) {
- keys.push('[' + key.slice(segment.index) + ']');
- }
-
- return internals.parseObject(keys, val, options);
-};
-
-
-module.exports = function (str, options) {
-
- if (str === '' ||
- str === null ||
- typeof str === 'undefined') {
-
- return {};
- }
-
- options = options || {};
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
-
- var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
- var obj = {};
-
- // Iterate over the keys and setup the new object
-
- var keys = Object.keys(tempObj);
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- var newObj = internals.parseKeys(key, tempObj[key], options);
- obj = Utils.merge(obj, newObj);
- }
-
- return Utils.compact(obj);
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/lib/stringify.js b/topics/00. Course-introduction/slides/node_modules/qs/lib/stringify.js
deleted file mode 100755
index b441104..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/lib/stringify.js
+++ /dev/null
@@ -1,77 +0,0 @@
-// Load modules
-
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {
- delimiter: '&',
- indices: true
-};
-
-
-internals.stringify = function (obj, prefix, options) {
-
- if (Utils.isBuffer(obj)) {
- obj = obj.toString();
- }
- else if (obj instanceof Date) {
- obj = obj.toISOString();
- }
- else if (obj === null) {
- obj = '';
- }
-
- if (typeof obj === 'string' ||
- typeof obj === 'number' ||
- typeof obj === 'boolean') {
-
- return [encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)];
- }
-
- var values = [];
-
- if (typeof obj === 'undefined') {
- return values;
- }
-
- var objKeys = Object.keys(obj);
- for (var i = 0, il = objKeys.length; i < il; ++i) {
- var key = objKeys[i];
- if (!options.indices &&
- Array.isArray(obj)) {
-
- values = values.concat(internals.stringify(obj[key], prefix, options));
- }
- else {
- values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options));
- }
- }
-
- return values;
-};
-
-
-module.exports = function (obj, options) {
-
- options = options || {};
- var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
- options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices;
-
- var keys = [];
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return '';
- }
-
- var objKeys = Object.keys(obj);
- for (var i = 0, il = objKeys.length; i < il; ++i) {
- var key = objKeys[i];
- keys = keys.concat(internals.stringify(obj[key], key, options));
- }
-
- return keys.join(delimiter);
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/lib/utils.js b/topics/00. Course-introduction/slides/node_modules/qs/lib/utils.js
deleted file mode 100755
index 5240bd5..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/lib/utils.js
+++ /dev/null
@@ -1,132 +0,0 @@
-// Load modules
-
-
-// Declare internals
-
-var internals = {};
-
-
-exports.arrayToObject = function (source) {
-
- var obj = {};
- for (var i = 0, il = source.length; i < il; ++i) {
- if (typeof source[i] !== 'undefined') {
-
- obj[i] = source[i];
- }
- }
-
- return obj;
-};
-
-
-exports.merge = function (target, source) {
-
- if (!source) {
- return target;
- }
-
- if (typeof source !== 'object') {
- if (Array.isArray(target)) {
- target.push(source);
- }
- else {
- target[source] = true;
- }
-
- return target;
- }
-
- if (typeof target !== 'object') {
- target = [target].concat(source);
- return target;
- }
-
- if (Array.isArray(target) &&
- !Array.isArray(source)) {
-
- target = exports.arrayToObject(target);
- }
-
- var keys = Object.keys(source);
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var value = source[key];
-
- if (!target[key]) {
- target[key] = value;
- }
- else {
- target[key] = exports.merge(target[key], value);
- }
- }
-
- return target;
-};
-
-
-exports.decode = function (str) {
-
- try {
- return decodeURIComponent(str.replace(/\+/g, ' '));
- } catch (e) {
- return str;
- }
-};
-
-
-exports.compact = function (obj, refs) {
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return obj;
- }
-
- refs = refs || [];
- var lookup = refs.indexOf(obj);
- if (lookup !== -1) {
- return refs[lookup];
- }
-
- refs.push(obj);
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var i = 0, il = obj.length; i < il; ++i) {
- if (typeof obj[i] !== 'undefined') {
- compacted.push(obj[i]);
- }
- }
-
- return compacted;
- }
-
- var keys = Object.keys(obj);
- for (i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- obj[key] = exports.compact(obj[key], refs);
- }
-
- return obj;
-};
-
-
-exports.isRegExp = function (obj) {
- return Object.prototype.toString.call(obj) === '[object RegExp]';
-};
-
-
-exports.isBuffer = function (obj) {
-
- if (obj === null ||
- typeof obj === 'undefined') {
-
- return false;
- }
-
- return !!(obj.constructor &&
- obj.constructor.isBuffer &&
- obj.constructor.isBuffer(obj));
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/package.json b/topics/00. Course-introduction/slides/node_modules/qs/package.json
deleted file mode 100644
index 35d9614..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/package.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "_args": [
- [
- "qs@~2.3.3",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/union"
- ]
- ],
- "_from": "qs@>=2.3.3 <2.4.0",
- "_id": "qs@2.3.3",
- "_inCache": true,
- "_installable": true,
- "_location": "/qs",
- "_nodeVersion": "0.10.32",
- "_npmUser": {
- "email": "quitlahok@gmail.com",
- "name": "nlf"
- },
- "_npmVersion": "2.1.6",
- "_phantomChildren": {},
- "_requested": {
- "name": "qs",
- "raw": "qs@~2.3.3",
- "rawSpec": "~2.3.3",
- "scope": null,
- "spec": ">=2.3.3 <2.4.0",
- "type": "range"
- },
- "_requiredBy": [
- "/union"
- ],
- "_resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
- "_shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
- "_shrinkwrap": null,
- "_spec": "qs@~2.3.3",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/union",
- "bugs": {
- "url": "https://github.com/hapijs/qs/issues"
- },
- "dependencies": {},
- "description": "A querystring parser that supports nesting and arrays, with a depth limit",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "5.x.x"
- },
- "directories": {},
- "dist": {
- "shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
- "tarball": "http://registry.npmjs.org/qs/-/qs-2.3.3.tgz"
- },
- "gitHead": "9250c4cda5102fcf72441445816e6d311fc6813d",
- "homepage": "https://github.com/hapijs/qs",
- "keywords": [
- "qs",
- "querystring"
- ],
- "licenses": [
- {
- "type": "BSD",
- "url": "http://github.com/hapijs/qs/raw/master/LICENSE"
- }
- ],
- "main": "index.js",
- "maintainers": [
- {
- "name": "nlf",
- "email": "quitlahok@gmail.com"
- },
- {
- "name": "hueniverse",
- "email": "eran@hueniverse.com"
- }
- ],
- "name": "qs",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/hapijs/qs.git"
- },
- "scripts": {
- "test": "make test-cov"
- },
- "version": "2.3.3"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/test/parse.js b/topics/00. Course-introduction/slides/node_modules/qs/test/parse.js
deleted file mode 100755
index 6c20cc1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/test/parse.js
+++ /dev/null
@@ -1,413 +0,0 @@
-/* eslint no-extend-native:0 */
-// Load modules
-
-var Code = require('code');
-var Lab = require('lab');
-var Qs = require('../');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var expect = Code.expect;
-var describe = lab.experiment;
-var it = lab.test;
-
-
-describe('parse()', function () {
-
- it('parses a simple string', function (done) {
-
- expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' });
- expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' });
- expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } });
- expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } });
- expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } });
- expect(Qs.parse('foo')).to.deep.equal({ foo: '' });
- expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' });
- expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' });
- expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' });
- expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' });
- expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' });
- expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({
- cht: 'p3',
- chd: 't:60,40',
- chs: '250x100',
- chl: 'Hello|World'
- });
- done();
- });
-
- it('parses a single nested string', function (done) {
-
- expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } });
- done();
- });
-
- it('parses a double nested string', function (done) {
-
- expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } });
- done();
- });
-
- it('defaults to a depth of 5', function (done) {
-
- expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } });
- done();
- });
-
- it('only parses one level when depth = 1', function (done) {
-
- expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } });
- expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } });
- done();
- });
-
- it('parses a simple array', function (done) {
-
- expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- done();
- });
-
- it('parses an explicit array', function (done) {
-
- expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] });
- expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
- done();
- });
-
- it('parses a mix of simple and explicit arrays', function (done) {
-
- expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] });
- done();
- });
-
- it('parses a nested array', function (done) {
-
- expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
- expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } });
- done();
- });
-
- it('allows to specify array indices', function (done) {
-
- expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
- expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] });
- done();
- });
-
- it('limits specific array indices to 20', function (done) {
-
- expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] });
- expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } });
- done();
- });
-
- it('supports keys that begin with a number', function (done) {
-
- expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } });
- done();
- });
-
- it('supports encoded = signs', function (done) {
-
- expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' });
- done();
- });
-
- it('is ok with url encoded strings', function (done) {
-
- expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } });
- expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } });
- done();
- });
-
- it('allows brackets in the value', function (done) {
-
- expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' });
- expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' });
- done();
- });
-
- it('allows empty values', function (done) {
-
- expect(Qs.parse('')).to.deep.equal({});
- expect(Qs.parse(null)).to.deep.equal({});
- expect(Qs.parse(undefined)).to.deep.equal({});
- done();
- });
-
- it('transforms arrays to objects', function (done) {
-
- expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
- expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
- expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
- expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
- expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
- expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({foo: [ {a: 'a', b: 'b'}, {a: 'aa', b: 'bb'} ]});
- done();
- });
-
- it('can add keys to objects', function (done) {
-
- expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
- done();
- });
-
- it('correctly prunes undefined values when converting an array to an object', function (done) {
-
- expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
- done();
- });
-
- it('supports malformed uri characters', function (done) {
-
- expect(Qs.parse('{%:%}')).to.deep.equal({ '{%:%}': '' });
- expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' });
- done();
- });
-
- it('doesn\'t produce empty keys', function (done) {
-
- expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' });
- done();
- });
-
- it('cannot override prototypes', function (done) {
-
- var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad');
- expect(typeof obj.toString).to.equal('function');
- expect(typeof obj.bad.toString).to.equal('function');
- expect(typeof obj.constructor).to.equal('function');
- done();
- });
-
- it('cannot access Object prototype', function (done) {
-
- Qs.parse('constructor[prototype][bad]=bad');
- Qs.parse('bad[constructor][prototype][bad]=bad');
- expect(typeof Object.prototype.bad).to.equal('undefined');
- done();
- });
-
- it('parses arrays of objects', function (done) {
-
- expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
- expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
- done();
- });
-
- it('allows for empty strings in arrays', function (done) {
-
- expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] });
- expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]=')).to.deep.equal({ a: ['b', '', 'c', ''] });
- expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] });
- done();
- });
-
- it('compacts sparse arrays', function (done) {
-
- expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] });
- done();
- });
-
- it('parses semi-parsed strings', function (done) {
-
- expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } });
- expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } });
- done();
- });
-
- it('parses buffers correctly', function (done) {
-
- var b = new Buffer('test');
- expect(Qs.parse({ a: b })).to.deep.equal({ a: b });
- done();
- });
-
- it('continues parsing when no parent is found', function (done) {
-
- expect(Qs.parse('[]&a=b')).to.deep.equal({ '0': '', a: 'b' });
- expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' });
- done();
- });
-
- it('does not error when parsing a very long array', function (done) {
-
- var str = 'a[]=a';
- while (Buffer.byteLength(str) < 128 * 1024) {
- str += '&' + str;
- }
-
- expect(function () {
-
- Qs.parse(str);
- }).to.not.throw();
-
- done();
- });
-
- it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) {
-
- Object.prototype.crash = '';
- Array.prototype.crash = '';
- expect(Qs.parse.bind(null, 'a=b')).to.not.throw();
- expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' });
- expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw();
- expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
- delete Object.prototype.crash;
- delete Array.prototype.crash;
- done();
- });
-
- it('parses a string with an alternative string delimiter', function (done) {
-
- expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('parses a string with an alternative RegExp delimiter', function (done) {
-
- expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('does not use non-splittable objects as delimiters', function (done) {
-
- expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('allows overriding parameter limit', function (done) {
-
- expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' });
- done();
- });
-
- it('allows setting the parameter limit to Infinity', function (done) {
-
- expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('allows overriding array limit', function (done) {
-
- expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } });
- expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } });
- expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
- done();
- });
-
- it('parses an object', function (done) {
-
- var input = {
- 'user[name]': {'pop[bob]': 3},
- 'user[email]': null
- };
-
- var expected = {
- 'user': {
- 'name': {'pop[bob]': 3},
- 'email': null
- }
- };
-
- var result = Qs.parse(input);
-
- expect(result).to.deep.equal(expected);
- done();
- });
-
- it('parses an object and not child values', function (done) {
-
- var input = {
- 'user[name]': {'pop[bob]': { 'test': 3 }},
- 'user[email]': null
- };
-
- var expected = {
- 'user': {
- 'name': {'pop[bob]': { 'test': 3 }},
- 'email': null
- }
- };
-
- var result = Qs.parse(input);
-
- expect(result).to.deep.equal(expected);
- done();
- });
-
- it('does not blow up when Buffer global is missing', function (done) {
-
- var tempBuffer = global.Buffer;
- delete global.Buffer;
- var result = Qs.parse('a=b&c=d');
- global.Buffer = tempBuffer;
- expect(result).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('does not crash when using invalid dot notation', function (done) {
-
- expect(Qs.parse('roomInfoList[0].childrenAges[0]=15&roomInfoList[0].numberOfAdults=2')).to.deep.equal({ roomInfoList: [['15', '2']] });
- done();
- });
-
- it('does not crash when parsing circular references', function (done) {
-
- var a = {};
- a.b = a;
-
- var parsed;
-
- expect(function () {
-
- parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
- }).to.not.throw();
-
- expect(parsed).to.contain('foo');
- expect(parsed.foo).to.contain('bar', 'baz');
- expect(parsed.foo.bar).to.equal('baz');
- expect(parsed.foo.baz).to.deep.equal(a);
- done();
- });
-
- it('parses plain objects correctly', function (done) {
-
- var a = Object.create(null);
- a.b = 'c';
-
- expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
- var result = Qs.parse({ a: a });
- expect(result).to.contain('a');
- expect(result.a).to.deep.equal(a);
- done();
- });
-
- it('parses dates correctly', function (done) {
-
- var now = new Date();
- expect(Qs.parse({ a: now })).to.deep.equal({ a: now });
- done();
- });
-
- it('parses regular expressions correctly', function (done) {
-
- var re = /^test$/;
- expect(Qs.parse({ a: re })).to.deep.equal({ a: re });
- done();
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/qs/test/stringify.js b/topics/00. Course-introduction/slides/node_modules/qs/test/stringify.js
deleted file mode 100755
index 75e397a..0000000
--- a/topics/00. Course-introduction/slides/node_modules/qs/test/stringify.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* eslint no-extend-native:0 */
-// Load modules
-
-var Code = require('code');
-var Lab = require('lab');
-var Qs = require('../');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var expect = Code.expect;
-var describe = lab.experiment;
-var it = lab.test;
-
-
-describe('stringify()', function () {
-
- it('stringifies a querystring object', function (done) {
-
- expect(Qs.stringify({ a: 'b' })).to.equal('a=b');
- expect(Qs.stringify({ a: 1 })).to.equal('a=1');
- expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2');
- done();
- });
-
- it('stringifies a nested object', function (done) {
-
- expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
- expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e');
- done();
- });
-
- it('stringifies an array value', function (done) {
-
- expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
- done();
- });
-
- it('omits array indices when asked', function (done) {
-
- expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d');
- done();
- });
-
- it('stringifies a nested array value', function (done) {
-
- expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
- done();
- });
-
- it('stringifies an object inside an array', function (done) {
-
- expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c');
- expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
- done();
- });
-
- it('does not omit object keys when indices = false', function (done) {
-
- expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c');
- done();
- });
-
- it('stringifies a complicated object', function (done) {
-
- expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
- done();
- });
-
- it('stringifies an empty value', function (done) {
-
- expect(Qs.stringify({ a: '' })).to.equal('a=');
- expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b=');
- expect(Qs.stringify({ a: null })).to.equal('a=');
- expect(Qs.stringify({ a: { b: null } })).to.equal('a%5Bb%5D=');
- done();
- });
-
- it('stringifies an empty object', function (done) {
-
- var obj = Object.create(null);
- obj.a = 'b';
- expect(Qs.stringify(obj)).to.equal('a=b');
- done();
- });
-
- it('returns an empty string for invalid input', function (done) {
-
- expect(Qs.stringify(undefined)).to.equal('');
- expect(Qs.stringify(false)).to.equal('');
- expect(Qs.stringify(null)).to.equal('');
- expect(Qs.stringify('')).to.equal('');
- done();
- });
-
- it('stringifies an object with an empty object as a child', function (done) {
-
- var obj = {
- a: Object.create(null)
- };
-
- obj.a.b = 'c';
- expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c');
- done();
- });
-
- it('drops keys with a value of undefined', function (done) {
-
- expect(Qs.stringify({ a: undefined })).to.equal('');
- expect(Qs.stringify({ a: { b: undefined, c: null } })).to.equal('a%5Bc%5D=');
- done();
- });
-
- it('url encodes values', function (done) {
-
- expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c');
- done();
- });
-
- it('stringifies a date', function (done) {
-
- var now = new Date();
- var str = 'a=' + encodeURIComponent(now.toISOString());
- expect(Qs.stringify({ a: now })).to.equal(str);
- done();
- });
-
- it('stringifies the weird object from qs', function (done) {
-
- expect(Qs.stringify({ 'my weird field': 'q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F');
- done();
- });
-
- it('skips properties that are part of the object prototype', function (done) {
-
- Object.prototype.crash = 'test';
- expect(Qs.stringify({ a: 'b'})).to.equal('a=b');
- expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
- delete Object.prototype.crash;
- done();
- });
-
- it('stringifies boolean values', function (done) {
-
- expect(Qs.stringify({ a: true })).to.equal('a=true');
- expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true');
- expect(Qs.stringify({ b: false })).to.equal('b=false');
- expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false');
- done();
- });
-
- it('stringifies buffer values', function (done) {
-
- expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test');
- expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test');
- done();
- });
-
- it('stringifies an object using an alternative delimiter', function (done) {
-
- expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d');
- done();
- });
-
- it('doesn\'t blow up when Buffer global is missing', function (done) {
-
- var tempBuffer = global.Buffer;
- delete global.Buffer;
- expect(Qs.stringify({ a: 'b', c: 'd' })).to.equal('a=b&c=d');
- global.Buffer = tempBuffer;
- done();
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/.npmignore b/topics/00. Course-introduction/slides/node_modules/requires-port/.npmignore
deleted file mode 100644
index ba2a97b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-coverage
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/.travis.yml b/topics/00. Course-introduction/slides/node_modules/requires-port/.travis.yml
deleted file mode 100644
index 22ebb02..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: node_js
-node_js:
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "iojs-v1.1"
- - "iojs-v1.0"
-before_install:
- - "npm install -g npm@1.4.x"
-script:
- - "npm run test-travis"
-after_script:
- - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls"
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "iojs-v1.1"
- - node_js: "iojs-v1.0"
-notifications:
- irc:
- channels:
- - "irc.freenode.org#unshift"
- on_success: change
- on_failure: change
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/LICENSE b/topics/00. Course-introduction/slides/node_modules/requires-port/LICENSE
deleted file mode 100644
index 6dc9316..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/README.md b/topics/00. Course-introduction/slides/node_modules/requires-port/README.md
deleted file mode 100644
index 3effe75..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# requires-port
-
-[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](http://img.shields.io/npm/v/requires-port.svg?style=flat-square)](http://browsenpm.org/package/requires-port)[![Build Status](http://img.shields.io/travis/unshiftio/requires-port/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/requires-port)[![Dependencies](https://img.shields.io/david/unshiftio/requires-port.svg?style=flat-square)](https://david-dm.org/unshiftio/requires-port)[![Coverage Status](http://img.shields.io/coveralls/unshiftio/requires-port/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/requires-port?branch=master)[![IRC channel](http://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](http://webchat.freenode.net/?channels=unshift)
-
-The module name says it all, check if a protocol requires a given port.
-
-## Installation
-
-This module is intended to be used with browserify or Node.js and is distributed
-in the public npm registry. To install it simply run the following command from
-your CLI:
-
-```j
-npm install --save requires-port
-```
-
-## Usage
-
-The module exports it self as function and requires 2 arguments:
-
-1. The port number, can be a string or number.
-2. Protocol, can be `http`, `http:` or even `https://yomoma.com`. We just split
- it at `:` and use the first result. We currently accept the following
- protocols:
- - `http`
- - `https`
- - `ws`
- - `wss`
- - `ftp`
- - `gopher`
- - `file`
-
-It returns a boolean that indicates if protocol requires this port to be added
-to your URL.
-
-```js
-'use strict';
-
-var required = require('requires-port');
-
-console.log(required('8080', 'http')) // true
-console.log(required('80', 'http')) // false
-```
-
-# License
-
-MIT
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/index.js b/topics/00. Course-introduction/slides/node_modules/requires-port/index.js
deleted file mode 100644
index 9ecfae3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-/**
- * Check if we're required to add a port number.
- *
- * @see https://url.spec.whatwg.org/#default-port
- * @param {Number|String} port Port number we need to check
- * @param {String} protocol Protocol we need to check against.
- * @returns {Boolean} Is it a default port for the given protocol
- * @api private
- */
-module.exports = function required(port, protocol) {
- protocol = protocol.split(':')[0];
- port = +port;
-
- if (!port) return false;
-
- switch (protocol) {
- case 'http':
- case 'ws':
- return port !== 80;
-
- case 'https':
- case 'wss':
- return port !== 443;
-
- case 'ftp':
- return port !== 22;
-
- case 'gopher':
- return port !== 70;
-
- case 'file':
- return false;
- }
-
- return port !== 0;
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/package.json b/topics/00. Course-introduction/slides/node_modules/requires-port/package.json
deleted file mode 100644
index f096fbe..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/package.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "_args": [
- [
- "requires-port@0.x.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-proxy"
- ]
- ],
- "_from": "requires-port@>=0.0.0 <1.0.0",
- "_id": "requires-port@0.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/requires-port",
- "_nodeVersion": "0.12.3",
- "_npmUser": {
- "email": "npm@3rd-Eden.com",
- "name": "3rdeden"
- },
- "_npmVersion": "2.9.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "requires-port",
- "raw": "requires-port@0.x.x",
- "rawSpec": "0.x.x",
- "scope": null,
- "spec": ">=0.0.0 <1.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-proxy"
- ],
- "_resolved": "https://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz",
- "_shasum": "4b4414411d9df7c855995dd899a8c78a2951c16d",
- "_shrinkwrap": null,
- "_spec": "requires-port@0.x.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-proxy",
- "author": {
- "name": "Arnout Kazemier"
- },
- "bugs": {
- "url": "https://github.com/unshiftio/requires-port/issues"
- },
- "dependencies": {},
- "description": "Check if a protocol requires a certain port number to be added to an URL.",
- "devDependencies": {
- "assume": "1.1.x",
- "istanbul": "0.3.x",
- "mocha": "2.1.x",
- "pre-commit": "1.0.x"
- },
- "directories": {},
- "dist": {
- "shasum": "4b4414411d9df7c855995dd899a8c78a2951c16d",
- "tarball": "http://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz"
- },
- "gitHead": "d6235df7aa7e8d08e9ac72c842e1e2c6c366376f",
- "homepage": "https://github.com/unshiftio/requires-port",
- "keywords": [
- "cows",
- "file",
- "ftp",
- "gopher",
- "http",
- "https",
- "parsing",
- "port",
- "portnumber",
- "require",
- "requires",
- "requried",
- "url",
- "validation",
- "ws",
- "wss"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "v1",
- "email": "info@3rd-Eden.com"
- },
- {
- "name": "3rdeden",
- "email": "npm@3rd-Eden.com"
- }
- ],
- "name": "requires-port",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/unshiftio/requires-port.git"
- },
- "scripts": {
- "100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
- "coverage": "istanbul cover ./node_modules/.bin/_mocha -- test.js",
- "test": "mocha test.js",
- "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js",
- "watch": "mocha --watch test.js"
- },
- "version": "0.0.1"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/requires-port/test.js b/topics/00. Course-introduction/slides/node_modules/requires-port/test.js
deleted file mode 100644
index abd6bcb..0000000
--- a/topics/00. Course-introduction/slides/node_modules/requires-port/test.js
+++ /dev/null
@@ -1,98 +0,0 @@
-describe('requires-port', function () {
- 'use strict';
-
- var assume = require('assume')
- , required = require('./');
-
- it('is exported as a function', function () {
- assume(required).is.a('function');
- });
-
- it('does not require empty ports', function () {
- assume(required('', 'http')).false();
- assume(required('', 'wss')).false();
- assume(required('', 'ws')).false();
- assume(required('', 'cowsack')).false();
- });
-
- it('assumes true for unknown protocols',function () {
- assume(required('808', 'foo')).true();
- assume(required('80', 'bar')).true();
- });
-
- it('never requires port numbers for file', function () {
- assume(required(8080, 'file')).false();
- });
-
- it('does not require port 80 for http', function () {
- assume(required('80', 'http')).false();
- assume(required(80, 'http')).false();
- assume(required(80, 'http://')).false();
- assume(required(80, 'http://www.google.com')).false();
-
- assume(required('8080', 'http')).true();
- assume(required(8080, 'http')).true();
- assume(required(8080, 'http://')).true();
- assume(required(8080, 'http://www.google.com')).true();
- });
-
- it('does not require port 80 for ws', function () {
- assume(required('80', 'ws')).false();
- assume(required(80, 'ws')).false();
- assume(required(80, 'ws://')).false();
- assume(required(80, 'ws://www.google.com')).false();
-
- assume(required('8080', 'ws')).true();
- assume(required(8080, 'ws')).true();
- assume(required(8080, 'ws://')).true();
- assume(required(8080, 'ws://www.google.com')).true();
- });
-
- it('does not require port 443 for https', function () {
- assume(required('443', 'https')).false();
- assume(required(443, 'https')).false();
- assume(required(443, 'https://')).false();
- assume(required(443, 'https://www.google.com')).false();
-
- assume(required('8080', 'https')).true();
- assume(required(8080, 'https')).true();
- assume(required(8080, 'https://')).true();
- assume(required(8080, 'https://www.google.com')).true();
- });
-
- it('does not require port 443 for wss', function () {
- assume(required('443', 'wss')).false();
- assume(required(443, 'wss')).false();
- assume(required(443, 'wss://')).false();
- assume(required(443, 'wss://www.google.com')).false();
-
- assume(required('8080', 'wss')).true();
- assume(required(8080, 'wss')).true();
- assume(required(8080, 'wss://')).true();
- assume(required(8080, 'wss://www.google.com')).true();
- });
-
- it('does not require port 22 for ftp', function () {
- assume(required('22', 'ftp')).false();
- assume(required(22, 'ftp')).false();
- assume(required(22, 'ftp://')).false();
- assume(required(22, 'ftp://www.google.com')).false();
-
- assume(required('8080', 'ftp')).true();
- assume(required(8080, 'ftp')).true();
- assume(required(8080, 'ftp://')).true();
- assume(required(8080, 'ftp://www.google.com')).true();
- });
-
- it('does not require port 70 for gopher', function () {
- assume(required('70', 'gopher')).false();
- assume(required(70, 'gopher')).false();
- assume(required(70, 'gopher://')).false();
- assume(required(70, 'gopher://www.google.com')).false();
-
- assume(required('8080', 'gopher')).true();
- assume(required(8080, 'gopher')).true();
- assume(required(8080, 'gopher://')).true();
- assume(required(8080, 'gopher://www.google.com')).true();
- });
-});
diff --git a/topics/00. Course-introduction/slides/node_modules/union/.npmignore b/topics/00. Course-introduction/slides/node_modules/union/.npmignore
deleted file mode 100644
index cb6fcfe..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-node_modules
-npm-debug.log
-test/fixtures/*-test.txt
-examples/*.txt
-examples/simple/*.txt
-.DS_Store
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/.travis.yml b/topics/00. Course-introduction/slides/node_modules/union/.travis.yml
deleted file mode 100644
index 04d6dd9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.11"
-
-notifications:
- email:
- - travis@nodejitsu.com
- irc: "irc.freenode.org#nodejitsu"
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/CHANGELOG.md b/topics/00. Course-introduction/slides/node_modules/union/CHANGELOG.md
deleted file mode 100644
index c4d4c99..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/CHANGELOG.md
+++ /dev/null
@@ -1,7 +0,0 @@
-
-0.3.4 / 2012-07-24
-==================
-
- * Added SPDY support
- * Added http redirect utility function
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/LICENSE b/topics/00. Course-introduction/slides/node_modules/union/LICENSE
deleted file mode 100644
index b7e5560..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010 Charlie Robbins & the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/union/README.md b/topics/00. Course-introduction/slides/node_modules/union/README.md
deleted file mode 100644
index bd8b59b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/README.md
+++ /dev/null
@@ -1,323 +0,0 @@
-
-
-
-# Synopsis
-A hybrid streaming middleware kernel backwards compatible with connect.
-
-# Motivation
-The advantage to streaming middlewares is that they do not require buffering the entire stream in order to execute their function.
-
-# Status
-
-[![Build Status](https://secure.travis-ci.org/flatiron/union.png)](http://travis-ci.org/flatiron/union)
-
-# Installation
-There are a few ways to use `union`. Install the library using npm. You can add it to your `package.json` file as a dependancy
-
-```bash
- $ [sudo] npm install union
-```
-
-## Usage
-Union's request handling is [connect](https://github.com/senchalabs/connect)-compatible, meaning that all existing connect middlewares should work out-of-the-box with union.
-
-**(Union 0.3.x is compatible with connect >= 2.1.0, [Extensively Tested](https://github.com/pksunkara/connect-union))**
-
-In addition, the response object passed to middlewares listens for a "next" event, which is equivalent to calling `next()`. Flatiron middlewares are written in this manner, meaning they are not reverse-compatible with connect.
-
-### A simple case
-
-``` js
-var fs = require('fs'),
- union = require('../lib'),
- director = require('director');
-
-var router = new director.http.Router();
-
-var server = union.createServer({
- before: [
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-
-router.get(/foo/, function () {
- this.res.writeHead(200, { 'Content-Type': 'text/plain' })
- this.res.end('hello world\n');
-});
-
-router.post(/foo/, { stream: true }, function () {
- var req = this.req,
- res = this.res,
- writeStream;
-
- writeStream = fs.createWriteStream(Date.now() + '-foo.txt');
- req.pipe(writeStream);
-
- writeStream.on('close', function () {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.end('wrote to a stream!');
- });
-});
-
-server.listen(9090);
-console.log('union with director running on 9090');
-```
-
-To demonstrate the code, we use [director](https://github.com/flatiron/director). A light-weight, Client AND Server side URL-Router for Node.js and Single Page Apps!
-
-### A case with connect
-
-Code based on connect
-
-```js
-var connect = require('connect')
- , http = require('http');
-
-var app = connect()
- .use(connect.favicon())
- .use(connect.logger('dev'))
- .use(connect.static('public'))
- .use(connect.directory('public'))
- .use(connect.cookieParser('my secret here'))
- .use(connect.session())
- .use(function (req, res) {
- res.end('Hello from Connect!\n');
- });
-
-http.createServer(app).listen(3000);
-```
-
-Code based on union
-
-```js
-var connect = require('connect')
- , union = require('union');
-
-var server = union.createServer({
- buffer: false,
- before: [
- connect.favicon(),
- connect.logger('dev'),
- connect.static('public'),
- connect.directory('public'),
- connect.cookieParser('my secret here'),
- connect.session(),
- function (req, res) {
- res.end('Hello from Connect!\n');
- },
- ]
-}).listen(3000);
-```
-
-### SPDY enabled server example
-
-# API
-
-## union Static Members
-
-### createServer(options)
-The `options` object is required. Options include:
-
-Specification
-
-```
- function createServer(options)
-
- @param options {Object}
- An object literal that represents the configuration for the server.
-
- @option before {Array}
- The `before` value is an array of middlewares, which are used to route and serve incoming
- requests. For instance, in the example, `favicon` is a middleware which handles requests
- for `/favicon.ico`.
-
- @option after {Array}
- The `after` value is an array of functions that return stream filters,
- which are applied after the request handlers in `options.before`.
- Stream filters inherit from `union.ResponseStream`, which implements the
- Node.js core streams api with a bunch of other goodies.
-
- @option limit {Object}
- (optional) A value, passed to internal instantiations of `union.BufferedStream`.
-
- @option https {Object}
- (optional) A value that specifies the certificate and key necessary to create an instance of
- `https.Server`.
-
- @option spdy {Object}
- (optional) A value that specifies the certificate and key necessary to create an instance of
- `spdy.Server`.
-
- @option headers {Object}
- (optional) An object representing a set of headers to set in every outgoing response
-```
-
-Example
-
-```js
-var server = union.createServer({
- before: [
- favicon('./favicon.png'),
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-```
-
-An example of the `https` or `spdy` option.
-
-``` js
-{
- cert: 'path/to/cert.pem',
- key: 'path/to/key.pem',
- ca: 'path/to/ca.pem'
-}
-```
-
-An example of the `headers` option.
-
-``` js
-{
- 'x-powered-by': 'your-sweet-application v10.9.8'
-}
-```
-
-## Error Handling
-Error handler is similiar to middlware but takes an extra argument for error at the beginning.
-
-```js
-var handle = function (err, req, res) {
- res.statusCode = err.status;
- res.end(req.headers);
-};
-
-var server = union.createServer({
- onError: handle,
- before: [
- favicon('./favicon.png'),
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-```
-
-## BufferedStream Constructor
-This constructor inherits from `Stream` and can buffer data up to `limit` bytes. It also implements `pause` and `resume` methods.
-
-Specification
-
-```
- function BufferedStream(limit)
-
- @param limit {Number}
- the limit for which the stream can be buffered
-```
-
-Example
-
-```js
-var bs = union.BufferedStream(n);
-```
-
-## HttpStream Constructor
-This constructor inherits from `union.BufferedStream` and returns a stream with these extra properties:
-
-Specification
-
-```
- function HttpStream()
-```
-
-Example
-
-```js
-var hs = union.HttpStream();
-```
-
-## HttpStream Instance Members
-
-### url
-The url from the request.
-
-Example
-
-```js
-httpStream.url = '';
-```
-
-### headers
-The HTTP headers associated with the stream.
-
-Example
-
-```js
-httpStream.headers = '';
-```
-
-### method
-The HTTP method ("GET", "POST", etc).
-
-Example
-
-```js
-httpStream.method = 'POST';
-```
-
-### query
-The querystring associated with the stream (if applicable).
-
-Example
-
-```js
-httpStream.query = '';
-```
-
-## ResponseStream Constructor
-This constructor inherits from `union.HttpStream`, and is additionally writeable. Union supplies this constructor as a basic response stream middleware from which to inherit.
-
-Specification
-
-```
- function ResponseStream()
-```
-
-Example
-
-```js
-var rs = union.ResponseStream();
-```
-
-# Tests
-
-All tests are written with [vows][0] and should be run with [npm][1]:
-
-``` bash
- $ npm test
-```
-
-# Licence
-
-(The MIT License)
-
-Copyright (c) 2010-2012 Charlie Robbins & the Contributors
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-[0]: http://vowsjs.org
-[1]: http://npmjs.org
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/after/index.js b/topics/00. Course-introduction/slides/node_modules/union/examples/after/index.js
deleted file mode 100644
index 1f407bd..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/after/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var fs = require('fs'),
- path = require('path'),
- union = require('../../lib');
-
-var server = union.createServer({
- before: [ function (req,res) {
- if (req.url === "/foo") {
- res.text(201, "foo");
- }
- } ],
- after: [
- function LoggerStream() {
- var stream = new union.ResponseStream();
-
- stream.once("pipe", function (req) {
- console.log({res: this.res.statusCode, method: this.req.method});
- });
-
- return stream;
- }
- ]
-});
-
-server.listen(9080);
-console.log('union running on 9080');
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/favicon.png b/topics/00. Course-introduction/slides/node_modules/union/examples/simple/favicon.png
deleted file mode 100644
index bf002b1..0000000
Binary files a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/favicon.png and /dev/null differ
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/favicon.js b/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/favicon.js
deleted file mode 100644
index 9707f37..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/favicon.js
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/*!
- * Connect - favicon
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var crypto = require('crypto')
- , fs = require('fs');
-
-/**
- * Favicon cache.
- */
-
-var icon;
-
-/**
- * Return md5 hash of the given string and optional encoding,
- * defaulting to hex.
- *
- * utils.md5('wahoo');
- * // => "e493298061761236c96b02ea6aa8a2ad"
- *
- * @param {String} str
- * @param {String} encoding
- * @return {String}
- * @api public
- */
-
-exports.md5 = function (str, encoding) {
- return crypto
- .createHash('md5')
- .update(str)
- .digest(encoding || 'hex');
-};
-
-/**
- * By default serves the connect favicon, or the favicon
- * located by the given `path`.
- *
- * Options:
- *
- * - `maxAge` cache-control max-age directive, defaulting to 1 day
- *
- * Examples:
- *
- * connect.createServer(
- * connect.favicon()
- * );
- *
- * connect.createServer(
- * connect.favicon(__dirname + '/public/favicon.ico')
- * );
- *
- * @param {String} path
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function favicon(path, options) {
- var options = options || {}
- , path = path || __dirname + '/../public/favicon.ico'
- , maxAge = options.maxAge || 86400000;
-
- return function favicon(req, res, next) {
- if ('/favicon.ico' == req.url) {
- if (icon) {
- res.writeHead(200, icon.headers);
- res.end(icon.body);
- } else {
- fs.readFile(path, function (err, buf) {
- if (err) return next(err);
- icon = {
- headers: {
- 'Content-Type': 'image/x-icon'
- , 'Content-Length': buf.length
- , 'ETag': '"' + exports.md5(buf) + '"'
- , 'Cache-Control': 'public, max-age=' + (maxAge / 1000)
- },
- body: buf
- };
- res.writeHead(200, icon.headers);
- res.end(icon.body);
- });
- }
- } else {
- next();
- }
- };
-};
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/gzip-decode.js b/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/gzip-decode.js
deleted file mode 100644
index 16735fe..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/gzip-decode.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var spawn = require('child_process').spawn,
- util = require('util'),
- RequestStream = require('../../lib').RequestStream;
-
-var GzipDecode = module.exports = function GzipDecoder(options) {
- RequestStream.call(this, options);
-
- this.on('pipe', this.decode);
-}
-
-util.inherits(GzipDecode, RequestStream);
-
-GzipDecode.prototype.decode = function (source) {
- this.decoder = spawn('gunzip');
- this.decoder.stdout.on('data', this._onGunzipData.bind(this));
- this.decoder.stdout.on('end', this._onGunzipEnd.bind(this));
- source.pipe(this.decoder);
-}
-
-GzipDecoderStack.prototype._onGunzipData = function (chunk) {
- this.emit('data', chunk);
-}
-
-GzipDecoderStack.prototype._onGunzipEnd = function () {
- this.emit('end');
-}
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/gzip-encode.js b/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/gzip-encode.js
deleted file mode 100644
index 647148c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/middleware/gzip-encode.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var spawn = require('child_process').spawn,
- util = require('util'),
- ResponseStream = require('../../lib').ResponseStream;
-
-/**
- * Accepts a writable stream, i.e. fs.WriteStream, and returns a StreamStack
- * whose 'write()' calls are transparently sent to a 'gzip' process before
- * being written to the target stream.
- */
-var GzipEncode = module.exports = function GzipEncode(options) {
- ResponseStream.call(this, options);
-
- if (compression) {
- process.assert(compression >= 1 && compression <= 9);
- this.compression = compression;
- }
-
- this.on('pipe', this.encode);
-}
-
-util.inherits(GzipEncode, ResponseStream);
-
-GzipEncode.prototype.encode = function (source) {
- this.source = source;
-};
-
-GzipEncode.prototype.pipe = function (dest) {
- if (!this.source) {
- throw new Error('GzipEncode is only pipeable once it has been piped to');
- }
-
- this.encoder = spawn('gzip', ['-'+this.compression]);
- this.encoder.stdout.pipe(dest);
- this.encoder.stdin.pipe(this.source);
-};
-
-inherits(GzipEncoderStack, StreamStack);
-exports.GzipEncoderStack = GzipEncoderStack;
-
-GzipEncoderStack.prototype.compression = 6;
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/simple.js b/topics/00. Course-introduction/slides/node_modules/union/examples/simple/simple.js
deleted file mode 100644
index 7bb0e1f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/simple.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var fs = require('fs'),
- path = require('path'),
- union = require('../../lib'),
- director = require('director'),
- favicon = require('./middleware/favicon');
-
-var router = new director.http.Router();
-
-var server = union.createServer({
- before: [
- favicon(path.join(__dirname, 'favicon.png')),
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-
-router.get('/foo', function () {
- this.res.writeHead(200, { 'Content-Type': 'text/plain' });
- this.res.end('hello world\n');
-});
-
-router.post('/foo', { stream: true }, function () {
- var req = this.req,
- res = this.res,
- writeStream;
-
- writeStream = fs.createWriteStream(__dirname + '/' + Date.now() + '-foo.txt');
- req.pipe(writeStream);
-
- writeStream.on('close', function () {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.end('wrote to a stream!');
- });
-});
-
-router.get('/redirect', function () {
- this.res.redirect('http://www.google.com');
-});
-
-router.get('/custom_redirect', function () {
- this.res.redirect('/foo', 301);
-});
-
-router.get('/async', function () {
- var self = this;
- process.nextTick(function () {
- self.req.on('end', function () {
- self.res.end();
- })
- self.req.buffer = false;
- });
-});
-
-server.listen(9090);
-console.log('union with director running on 9090');
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/spdy.js b/topics/00. Course-introduction/slides/node_modules/union/examples/simple/spdy.js
deleted file mode 100644
index 83c8f14..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/simple/spdy.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// In order to run this example you need to
-// generate local ssl certificate
-var union = require('../../lib'),
- director = require('director');
-
-var router = new director.http.Router();
-
-var server = union.createServer({
- before: [
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ],
- spdy :{
- key: './certs/privatekey.pem',
- cert: './certs/certificate.pem'
- }
-});
-
-router.get(/foo/, function () {
- this.res.writeHead(200, { 'Content-Type': 'text/plain' })
- this.res.end('hello world\n');
-});
-
-server.listen(9090, function () {
- console.log('union with director running on 9090 with SPDY');
-});
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/README b/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/README
deleted file mode 100644
index 9788811..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This folder contains an example of how to use Union with Socket.io.
-
-First, you'll want to install both Union and Socket.io. Run this
-command in the folder you placed these two files:
-
-npm install union socket.io
-
-You can run the server like so:
-
-node server.js
-
-Now open up your web browser to http://localhost and see the results
-in the console!
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/index.html b/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/index.html
deleted file mode 100644
index fd8dc8c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/index.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/server.js b/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/server.js
deleted file mode 100644
index 1b7c580..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/examples/socketio/server.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var fs = require('fs'),
- union = require('union');
-
-var server = union.createServer({
- before: [
- function (req, res) {
- fs.readFile(__dirname + '/index.html',
- function (err, data) {
- if (err) {
- res.writeHead(500);
- return res.end('Error loading index.html');
- }
-
- res.writeHead(200);
- res.end(data);
- });
- }
- ]
-});
-
-server.listen(9090);
-
-var io = require('socket.io').listen(server);
-
-io.sockets.on('connection', function (socket) {
- socket.emit('news', {hello: 'world'});
- socket.on('my other event', function (data) {
- console.log(data);
- });
-});
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/buffered-stream.js b/topics/00. Course-introduction/slides/node_modules/union/lib/buffered-stream.js
deleted file mode 100644
index d53117b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/buffered-stream.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * buffered-stream.js: A simple(r) Stream which is partially buffered into memory.
- *
- * (C) 2010, Mikeal Rogers
- *
- * Adapted for Flatiron
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var events = require('events'),
- fs = require('fs'),
- stream = require('stream'),
- util = require('util');
-
-//
-// ### function BufferedStream (limit)
-// #### @limit {number} **Optional** Size of the buffer to limit
-// Constructor function for the BufferedStream object responsible for
-// maintaining a stream interface which can also persist to memory
-// temporarily.
-//
-
-var BufferedStream = module.exports = function (limit) {
- events.EventEmitter.call(this);
-
- if (typeof limit === 'undefined') {
- limit = Infinity;
- }
-
- this.limit = limit;
- this.size = 0;
- this.chunks = [];
- this.writable = true;
- this.readable = true;
- this._buffer = true;
-};
-
-util.inherits(BufferedStream, stream.Stream);
-
-Object.defineProperty(BufferedStream.prototype, 'buffer', {
- get: function () {
- return this._buffer;
- },
- set: function (value) {
- if (!value && this.chunks) {
- var self = this;
- this.chunks.forEach(function (c) { self.emit('data', c) });
- if (this.ended) this.emit('end');
- this.size = 0;
- delete this.chunks;
- }
-
- this._buffer = value;
- }
-});
-
-BufferedStream.prototype.pipe = function () {
- var self = this,
- dest;
-
- if (self.resume) {
- self.resume();
- }
-
- dest = stream.Stream.prototype.pipe.apply(self, arguments);
-
- //
- // just incase you are piping to two streams, do not emit data twice.
- // note: you can pipe twice, but you need to pipe both streams in the same tick.
- // (this is normal for streams)
- //
- if (this.piped) {
- return dest;
- }
-
- process.nextTick(function () {
- if (self.chunks) {
- self.chunks.forEach(function (c) { self.emit('data', c) });
- self.size = 0;
- delete self.chunks;
- }
-
- if (!self.readable) {
- if (self.ended) {
- self.emit('end');
- }
- else if (self.closed) {
- self.emit('close');
- }
- }
- });
-
- this.piped = true;
-
- return dest;
-};
-
-BufferedStream.prototype.write = function (chunk) {
- if (!this.chunks || this.piped) {
- this.emit('data', chunk);
- return;
- }
-
- this.chunks.push(chunk);
- this.size += chunk.length;
- if (this.limit < this.size) {
- this.pause();
- }
-};
-
-BufferedStream.prototype.end = function () {
- this.readable = false;
- this.ended = true;
- this.emit('end');
-};
-
-BufferedStream.prototype.destroy = function () {
- this.readable = false;
- this.writable = false;
- delete this.chunks;
-};
-
-BufferedStream.prototype.close = function () {
- this.readable = false;
- this.closed = true;
-};
-
-if (!stream.Stream.prototype.pause) {
- BufferedStream.prototype.pause = function () {
- this.emit('pause');
- };
-}
-
-if (!stream.Stream.prototype.resume) {
- BufferedStream.prototype.resume = function () {
- this.emit('resume');
- };
-}
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/core.js b/topics/00. Course-introduction/slides/node_modules/union/lib/core.js
deleted file mode 100644
index 8aed9c1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/core.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * core.js: Core functionality for the Flatiron HTTP (with SPDY support) plugin.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var http = require('http'),
- https = require('https'),
- fs = require('fs'),
- stream = require('stream'),
- HttpStream = require('./http-stream'),
- RoutingStream = require('./routing-stream');
-
-var core = exports;
-
-core.createServer = function (options) {
- var isArray = Array.isArray(options.after),
- credentials;
-
- if (!options) {
- throw new Error('options is required to create a server');
- }
-
- function requestHandler(req, res) {
- var routingStream = new RoutingStream({
- before: options.before,
- buffer: options.buffer,
- //
- // Remark: without new after is a huge memory leak that
- // pipes to every single open connection
- //
- after: isArray && options.after.map(function (After) {
- return new After;
- }),
- request: req,
- response: res,
- limit: options.limit,
- headers: options.headers
- });
-
- routingStream.on('error', function (err) {
- var fn = options.onError || core.errorHandler;
- fn(err, routingStream, routingStream.target, function () {
- routingStream.target.emit('next');
- });
- });
-
- req.pipe(routingStream);
- }
-
- //
- // both https and spdy requires same params
- //
- if (options.https || options.spdy) {
- if (options.https && options.spdy) {
- throw new Error('You shouldn\'t be using https and spdy simultaneously.');
- }
-
- var serverOptions,
- credentials,
- key = !options.spdy
- ? 'https'
- : 'spdy';
-
- serverOptions = options[key];
- if (!serverOptions.key || !serverOptions.cert) {
- throw new Error('Both options.' + key + '.`key` and options.' + key + '.`cert` are required.');
- }
-
- credentials = {
- key: fs.readFileSync(serverOptions.key),
- cert: fs.readFileSync(serverOptions.cert)
- };
-
- if (serverOptions.ca) {
- serverOptions.ca = !Array.isArray(serverOptions.ca)
- ? [serverOptions.ca]
- : serverOptions.ca
-
- credentials.ca = serverOptions.ca.map(function (ca) {
- return fs.readFileSync(ca);
- });
- }
-
- if (options.spdy) {
- // spdy is optional so we require module here rather than on top
- var spdy = require('spdy');
- return spdy.createServer(credentials, requestHandler);
- }
-
- return https.createServer(credentials, requestHandler);
- }
-
- return http.createServer(requestHandler);
-};
-
-core.errorHandler = function error(err, req, res) {
- if (err) {
- (this.res || res).writeHead(err.status || 500, err.headers || { "Content-Type": "text/plain" });
- (this.res || res).end(err.message + "\n");
- return;
- }
-
- (this.res || res).writeHead(404, {"Content-Type": "text/plain"});
- (this.res || res).end("Not Found\n");
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/http-stream.js b/topics/00. Course-introduction/slides/node_modules/union/lib/http-stream.js
deleted file mode 100644
index 021884f..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/http-stream.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * http-stream.js: Idomatic buffered stream which pipes additional HTTP information.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var url = require('url'),
- util = require('util'),
- qs = require('qs'),
- BufferedStream = require('./buffered-stream');
-
-var HttpStream = module.exports = function (options) {
- options = options || {};
- BufferedStream.call(this, options.limit);
-
- if (options.buffer === false) {
- this.buffer = false;
- }
-
- this.on('pipe', this.pipeState);
-};
-
-util.inherits(HttpStream, BufferedStream);
-
-//
-// ### function pipeState (source)
-// #### @source {ServerRequest|HttpStream} Source stream piping to this instance
-// Pipes additional HTTP metadata from the `source` HTTP stream (either concrete or
-// abstract) to this instance. e.g. url, headers, query, etc.
-//
-// Remark: Is there anything else we wish to pipe?
-//
-HttpStream.prototype.pipeState = function (source) {
- this.headers = source.headers;
- this.trailers = source.trailers;
- this.method = source.method;
-
- if (source.url) {
- this.url = this.originalUrl = source.url;
- }
-
- if (source.query) {
- this.query = source.query;
- }
- else if (source.url) {
- this.query = ~source.url.indexOf('?')
- ? qs.parse(url.parse(source.url).query)
- : {};
- }
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/index.js b/topics/00. Course-introduction/slides/node_modules/union/lib/index.js
deleted file mode 100644
index 34c5f0b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * index.js: Top-level plugin exposing HTTP features in flatiron
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var union = exports;
-
-//
-// Expose version information
-//
-exports.version = require('../package.json').version;
-
-//
-// Expose core union components
-//
-union.BufferedStream = require('./buffered-stream');
-union.HttpStream = require('./http-stream');
-union.ResponseStream = require('./response-stream');
-union.RoutingStream = require('./routing-stream');
-union.createServer = require('./core').createServer;
-union.errorHandler = require('./core').errorHandler;
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/request-stream.js b/topics/00. Course-introduction/slides/node_modules/union/lib/request-stream.js
deleted file mode 100644
index 6cb7150..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/request-stream.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * http-stream.js: Idomatic buffered stream which pipes additional HTTP information.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var url = require('url'),
- util = require('util'),
- qs = require('qs'),
- HttpStream = require('./http-stream');
-
-var RequestStream = module.exports = function (options) {
- options = options || {};
- HttpStream.call(this, options);
-
- this.on('pipe', this.pipeRequest);
- this.request = options.request;
-};
-
-util.inherits(RequestStream, HttpStream);
-
-//
-// ### function pipeRequest (source)
-// #### @source {ServerRequest|HttpStream} Source stream piping to this instance
-// Pipes additional HTTP request metadata from the `source` HTTP stream (either concrete or
-// abstract) to this instance. e.g. url, headers, query, etc.
-//
-// Remark: Is there anything else we wish to pipe?
-//
-RequestStream.prototype.pipeRequest = function (source) {
- this.url = this.originalUrl = source.url;
- this.method = source.method;
- this.httpVersion = source.httpVersion;
- this.httpVersionMajor = source.httpVersionMajor;
- this.httpVersionMinor = source.httpVersionMinor;
- this.setEncoding = source.setEncoding;
- this.connection = source.connection;
- this.socket = source.socket;
-
- if (source.query) {
- this.query = source.query;
- }
- else {
- this.query = ~source.url.indexOf('?')
- ? qs.parse(url.parse(source.url).query)
- : {};
- }
-};
-
-// http.serverRequest methods
-['setEncoding'].forEach(function (method) {
- RequestStream.prototype[method] = function () {
- return this.request[method].apply(this.request, arguments);
- };
-});
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/response-stream.js b/topics/00. Course-introduction/slides/node_modules/union/lib/response-stream.js
deleted file mode 100644
index aec4aae..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/response-stream.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * response-stream.js: A Stream focused on writing any relevant information to
- * a raw http.ServerResponse object.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var util = require('util'),
- HttpStream = require('./http-stream');
-
-//
-// ### function ResponseStream (options)
-//
-//
-var ResponseStream = module.exports = function (options) {
- var self = this,
- key;
-
- options = options || {};
- HttpStream.call(this, options);
-
- this.writeable = true;
- this.response = options.response;
-
- if (options.headers) {
- for (key in options.headers) {
- this.response.setHeader(key, options.headers[key]);
- }
- }
-
- //
- // Proxy `statusCode` changes to the actual `response.statusCode`.
- //
- Object.defineProperty(this, 'statusCode', {
- get: function () {
- return self.response.statusCode;
- },
- set: function (value) {
- self.response.statusCode = value;
- },
- enumerable: true,
- configurable: true
- });
-
- if (this.response) {
- this._headers = this.response._headers = this.response._headers || {};
-
- // Patch to node core
- this.response._headerNames = this.response._headerNames || {};
-
- //
- // Proxy to emit "header" event
- //
- this._renderHeaders = this.response._renderHeaders;
- this.response._renderHeaders = function () {
- if (!self._emittedHeader) {
- self._emittedHeader = true;
- self.headerSent = true;
- self._header = true;
- self.emit('header');
- }
-
- return self._renderHeaders.call(self.response);
- };
- }
-};
-
-util.inherits(ResponseStream, HttpStream);
-
-ResponseStream.prototype.writeHead = function (statusCode, headers) {
- if (headers) {
- for (var key in headers) {
- this.response.setHeader(key, headers[key]);
- }
- }
-
- this.response.statusCode = statusCode;
-};
-
-//
-// Create pass-thru for the necessary
-// `http.ServerResponse` methods.
-//
-['setHeader', 'getHeader', 'removeHeader', '_implicitHeader', 'addTrailers'].forEach(function (method) {
- ResponseStream.prototype[method] = function () {
- return this.response[method].apply(this.response, arguments);
- };
-});
-
-ResponseStream.prototype.json = function (obj) {
- if (!this.response.writable) {
- return;
- }
-
- if (typeof obj === 'number') {
- this.response.statusCode = obj;
- obj = arguments[1];
- }
-
- this.modified = true;
-
- if (!this.response._header && this.response.getHeader('content-type') !== 'application/json') {
- this.response.setHeader('content-type', 'application/json');
- }
-
- this.end(obj ? JSON.stringify(obj) : '');
-};
-
-ResponseStream.prototype.html = function (str) {
- if (!this.response.writable) {
- return;
- }
-
- if (typeof str === 'number') {
- this.response.statusCode = str;
- str = arguments[1];
- }
-
- this.modified = true;
-
- if (!this.response._header && this.response.getHeader('content-type') !== 'text/html') {
- this.response.setHeader('content-type', 'text/html');
- }
-
- this.end(str ? str: '');
-};
-
-ResponseStream.prototype.text = function (str) {
- if (!this.response.writable) {
- return;
- }
-
- if (typeof str === 'number') {
- this.response.statusCode = str;
- str = arguments[1];
- }
-
- this.modified = true;
-
- if (!this.response._header && this.response.getHeader('content-type') !== 'text/plain') {
- this.response.setHeader('content-type', 'text/plain');
- }
-
- this.end(str ? str: '');
-};
-
-ResponseStream.prototype.end = function (data) {
- if (data && this.writable) {
- this.emit('data', data);
- }
-
- this.modified = true;
- this.emit('end');
-};
-
-ResponseStream.prototype.write = function (data) {
- this.modified = true;
-
- if (this.writable) {
- this.emit('data', data);
- }
-};
-
-ResponseStream.prototype.redirect = function (path, status) {
- var url = '';
-
- if (~path.indexOf('://')) {
- url = path;
- } else {
- url += this.req.connection.encrypted ? 'https://' : 'http://';
- url += this.req.headers.host;
- url += (path[0] === '/') ? path : '/' + path;
- }
-
- this.res.writeHead(status || 302, { 'Location': url });
- this.end();
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/union/lib/routing-stream.js b/topics/00. Course-introduction/slides/node_modules/union/lib/routing-stream.js
deleted file mode 100644
index 2597c47..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/lib/routing-stream.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * routing-stream.js: A Stream focused on connecting an arbitrary RequestStream and
- * ResponseStream through a given Router.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var util = require('util'),
- union = require('./index'),
- RequestStream = require('./request-stream'),
- ResponseStream = require('./response-stream');
-
-//
-// ### function RoutingStream (options)
-//
-//
-var RoutingStream = module.exports = function (options) {
- options = options || {};
- RequestStream.call(this, options);
-
- this.before = options.before || [];
- this.after = options.after || [];
- this.response = options.response || options.res;
- this.headers = options.headers || {
- 'x-powered-by': 'union ' + union.version
- };
-
- this.target = new ResponseStream({
- response: this.response,
- headers: this.headers
- });
-
- this.once('pipe', this.route);
-};
-
-util.inherits(RoutingStream, RequestStream);
-
-//
-// Called when this instance is piped to **by another stream**
-//
-RoutingStream.prototype.route = function (req) {
- //
- // When a `RoutingStream` is piped to:
- //
- // 1. Setup the pipe-chain between the `after` middleware, the abstract response
- // and the concrete response.
- // 2. Attempt to dispatch to the `before` middleware, which represent things such as
- // favicon, static files, application routing.
- // 3. If no match is found then pipe to the 404Stream
- //
- var self = this,
- after,
- error,
- i;
-
- //
- // Don't allow `this.target` to be writable on HEAD requests
- //
- this.target.writable = req.method !== 'HEAD';
-
- //
- // 1. Setup the pipe-chain between the `after` middleware, the abstract response
- // and the concrete response.
- //
- after = [this.target].concat(this.after, this.response);
- for (i = 0; i < after.length - 1; i++) {
- //
- // attach req and res to all streams
- //
- after[i].req = req;
- after[i + 1].req = req;
- after[i].res = this.response;
- after[i + 1].res = this.response;
- after[i].pipe(after[i + 1]);
-
- //
- // prevent multiple responses and memory leaks
- //
- after[i].on('error', this.onError);
- }
-
- //
- // Helper function for dispatching to the 404 stream.
- //
- function notFound() {
- error = new Error('Not found');
- error.status = 404;
- self.onError(error);
- }
-
- //
- // 2. Attempt to dispatch to the `before` middleware, which represent things such as
- // favicon, static files, application routing.
- //
- (function dispatch(i) {
- if (self.target.modified) {
- return;
- }
- else if (++i === self.before.length) {
- //
- // 3. If no match is found then pipe to the 404Stream
- //
- return notFound();
- }
-
- self.target.once('next', dispatch.bind(null, i));
- if (self.before[i].length === 3) {
- self.before[i](self, self.target, function (err) {
- if (err) {
- self.onError(err);
- } else {
- self.target.emit('next');
- }
- });
- }
- else {
- self.before[i](self, self.target);
- }
- })(-1);
-};
-
-RoutingStream.prototype.onError = function (err) {
- this.emit('error', err);
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/union/package.json b/topics/00. Course-introduction/slides/node_modules/union/package.json
deleted file mode 100644
index ec69313..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/package.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "_args": [
- [
- "union@~0.4.3",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "union@>=0.4.3 <0.5.0",
- "_id": "union@0.4.4",
- "_inCache": true,
- "_installable": true,
- "_location": "/union",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "email": "charlie.robbins@gmail.com",
- "name": "indexzero"
- },
- "_npmVersion": "2.1.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "union",
- "raw": "union@~0.4.3",
- "rawSpec": "~0.4.3",
- "scope": null,
- "spec": ">=0.4.3 <0.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/union/-/union-0.4.4.tgz",
- "_shasum": "d73f49321d6ffb721a4c69ff5b0a6c31a98ff3e0",
- "_shrinkwrap": null,
- "_spec": "union@~0.4.3",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "charlie.robbins@gmail.com",
- "name": "Charlie Robbins"
- },
- "bugs": {
- "url": "https://github.com/flatiron/union/issues"
- },
- "dependencies": {
- "qs": "~2.3.3"
- },
- "description": "A hybrid buffered / streaming middleware kernel backwards compatible with connect.",
- "devDependencies": {
- "connect": "2.22.x",
- "director": "1.x.x",
- "ecstatic": "0.5.x",
- "request": "2.29.x",
- "vows": "0.8.x"
- },
- "directories": {},
- "dist": {
- "shasum": "d73f49321d6ffb721a4c69ff5b0a6c31a98ff3e0",
- "tarball": "http://registry.npmjs.org/union/-/union-0.4.4.tgz"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "gitHead": "091b39a84f2f9a972ea1e15cf5922c99450c325d",
- "homepage": "https://github.com/flatiron/union",
- "main": "./lib",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- },
- {
- "name": "dscape",
- "email": "nunojobpinto@gmail.com"
- },
- {
- "name": "jcrugzz",
- "email": "jcrugzz@gmail.com"
- },
- {
- "name": "swaagie",
- "email": "info@martijnswaagman.nl"
- }
- ],
- "name": "union",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/flatiron/union.git"
- },
- "scripts": {
- "test": "vows test/*-test.js --spec -i"
- },
- "version": "0.4.4"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/after-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/after-test.js
deleted file mode 100644
index 79c8f76..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/after-test.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var assert = require('assert'),
- vows = require('vows'),
- request = require('request'),
- union = require('../');
-
-function stream_callback(cb) {
- return function () {
- var stream = new union.ResponseStream();
-
- stream.once("pipe", function (req) {
- return cb ? cb(null,req) : undefined;
- });
-
- return stream;
- };
-}
-
-vows.describe('union/after').addBatch({
- 'When using `union`': {
- 'a union server with after middleware': {
- topic: function () {
- var self = this;
-
- union.createServer({
- after: [ stream_callback(), stream_callback(self.callback) ]
- }).listen(9000, function () {
- request.get('http://localhost:9000');
- });
- },
- 'should preserve the request until the last call': function (req) {
- assert.equal(req.req.httpVersion, '1.1');
- assert.equal(req.req.url, '/');
- assert.equal(req.req.method, 'GET');
- }
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/body-parser-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/body-parser-test.js
deleted file mode 100644
index b0c605c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/body-parser-test.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- connect = require('connect'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/body-parser').addBatch({
- "When using union with connect body parsing via urlencoded() or json()": {
- topic: function () {
- union.createServer({
- buffer: false,
- before: [
- connect.urlencoded(),
- connect.json(),
- function (req, res) {
- res.end(JSON.stringify(req.body, true, 2));
- }
- ]
- }).listen(8082, this.callback);
- },
- "a request to /": {
- topic: function () {
- request.post({
- uri: 'http://localhost:8082/',
- headers: {
- 'content-type': 'application/json'
- },
- body: JSON.stringify({ a: "foo", b: "bar" })
- }, this.callback);
- },
- "should respond with a body-decoded object": function (err, res, body) {
- assert.isNull(err);
- assert.equal(res.statusCode, 200);
- assert.deepEqual(
- JSON.parse(body),
- { a: 'foo', b: 'bar' }
- );
- }
- }
- }
-}).export(module);
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/double-write-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/double-write-test.js
deleted file mode 100644
index 555c737..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/double-write-test.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- request = require('request'),
- vows = require('vows'),
- union = require('../lib/index'),
- macros = require('./helpers/macros');
-
-var doubleWrite = false,
- server;
-
-server = union.createServer({
- before: [
- function (req, res) {
- res.json(200, { 'hello': 'world' });
- res.emit('next');
- },
- function (req, res) {
- doubleWrite = true;
- res.json(200, { 'hello': 'world' });
- res.emit('next');
- }
- ]
-});
-
-
-vows.describe('union/double-write').addBatch({
- "When using union": {
- "an http server which attempts to write to the response twice": {
- topic: function () {
- server.listen(9091, this.callback);
- },
- "a GET request to `/foo`": {
- topic: function () {
- request({ uri: 'http://localhost:9091/foo' }, this.callback);
- },
- "it should respond with `{ 'hello': 'world' }`": function (err, res, body) {
- macros.assertValidResponse(err, res);
- assert.deepEqual(JSON.parse(body), { 'hello': 'world' });
- },
- "it should not write to the response twice": function () {
- assert.isFalse(doubleWrite);
- }
- }
- }
- }
-}).addBatch({
- "When the tests are over": {
- "the server should close": function () {
- server.close();
- }
- }
-}).export(module);
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/ecstatic-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/ecstatic-test.js
deleted file mode 100644
index 2c3e2d8..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/ecstatic-test.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- ecstatic = require('ecstatic')(__dirname + '/fixtures/static'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/ecstatic').addBatch({
- "When using union with ecstatic": {
- topic: function () {
- union.createServer({
- before: [
- ecstatic
- ]
- }).listen(18082, this.callback);
- },
- "a request to /some-file.txt": {
- topic: function () {
- request({ uri: 'http://localhost:18082/some-file.txt' }, this.callback);
- },
- "should respond with `hello world`": function (err, res, body) {
- assert.isNull(err);
- assert.equal(body, 'hello world\n');
- }
- },
- "a request to /404.txt (which does not exist)": {
- topic: function () {
- request({ uri: 'http://localhost:18082/404.txt' }, this.callback);
- },
- "should respond with 404 status code": function (err, res, body) {
- assert.isNull(err);
- assert.equal(res.statusCode, 404);
- }
- }
- }
-}).export(module);
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/fixtures/index.js b/topics/00. Course-introduction/slides/node_modules/union/test/fixtures/index.js
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/fixtures/static/some-file.txt b/topics/00. Course-introduction/slides/node_modules/union/test/fixtures/static/some-file.txt
deleted file mode 100644
index 3b18e51..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/fixtures/static/some-file.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello world
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/header-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/header-test.js
deleted file mode 100644
index a4ab5ad..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/header-test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var assert = require('assert'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/header').addBatch({
- 'When using `union`': {
- 'with a server that responds with a header': {
- topic: function () {
- var callback = this.callback;
- var server = union.createServer({
- before: [
- function (req, res) {
- res.on('header', function () {
- callback(null, res);
- });
- res.writeHead(200, { 'content-type': 'text' });
- res.end();
- }
- ]
- });
- server.listen(9092, function () {
- request('http://localhost:9092/');
- });
- },
- 'it should have proper `headerSent` set': function (err, res) {
- assert.isNull(err);
- assert.isTrue(res.headerSent);
- },
- 'it should have proper `_emittedHeader` set': function (err, res) {
- assert.isNull(err);
- assert.isTrue(res._emittedHeader);
- }
- }
- }
-}).export(module);
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/helpers/index.js b/topics/00. Course-introduction/slides/node_modules/union/test/helpers/index.js
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/helpers/macros.js b/topics/00. Course-introduction/slides/node_modules/union/test/helpers/macros.js
deleted file mode 100644
index 599e1b4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/helpers/macros.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * macros.js: Simple test macros
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert');
-
-var macros = exports;
-
-macros.assertValidResponse = function (err, res) {
- assert.isTrue(!err);
- assert.equal(res.statusCode, 200);
-};
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/prop-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/prop-test.js
deleted file mode 100644
index 8e9cd4c..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/prop-test.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var assert = require('assert'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/properties').addBatch({
- 'When using `union`': {
- 'with a server that responds to requests': {
- topic: function () {
- var callback = this.callback;
- var server = union.createServer({
- before: [
- function (req, res) {
- callback(null, req, res);
-
- res.writeHead(200, { 'content-type': 'text' });
- res.end();
- }
- ]
- });
- server.listen(9092, function () {
- request('http://localhost:9092/');
- });
- },
- 'the `req` should have a proper `httpVersion` set': function (err, req) {
- assert.isNull(err);
- assert.equal(req.httpVersion, '1.1');
- },
- 'the `req` should have a proper `httpVersionMajor` set': function (err, req) {
- assert.isNull(err);
- assert.equal(req.httpVersionMajor, 1);
- },
- 'the `req` should have a proper `httpVersionMinor` set': function (err, req) {
- assert.isNull(err);
- assert.equal(req.httpVersionMinor, 1);
- },
- 'the `req` should have proper `socket` reference set': function (err, req) {
- var net = require('net');
-
- assert.isNull(err);
- assert.isTrue(req.socket instanceof net.Socket);
- }
- }
- }
-}).export(module);
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/simple-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/simple-test.js
deleted file mode 100644
index 70416c9..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/simple-test.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- spawn = require('child_process').spawn,
- request = require('request'),
- vows = require('vows'),
- macros = require('./helpers/macros');
-
-var examplesDir = path.join(__dirname, '..', 'examples', 'simple'),
- simpleScript = path.join(examplesDir, 'simple.js'),
- pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')),
- fooURI = 'http://localhost:9090/foo',
- server;
-
-vows.describe('union/simple').addBatch({
- "When using union": {
- "a simple http server": {
- topic: function () {
- server = spawn(process.argv[0], [simpleScript]);
- server.stdout.on('data', this.callback.bind(this, null));
- },
- "a GET request to `/foo`": {
- topic: function () {
- request({ uri: fooURI }, this.callback);
- },
- "it should respond with `hello world`": function (err, res, body) {
- macros.assertValidResponse(err, res);
- assert.equal(body, 'hello world\n');
- },
- "it should respond with 'x-powered-by': 'union '": function (err, res, body) {
- assert.isNull(err);
- assert.equal(res.headers['x-powered-by'], 'union ' + pkg.version);
- }
- },
- "a POST request to `/foo`": {
- topic: function () {
- request.post({ uri: fooURI }, this.callback);
- },
- "it should respond with `wrote to a stream!`": function (err, res, body) {
- macros.assertValidResponse(err, res);
- assert.equal(body, 'wrote to a stream!');
- }
- },
- "a GET request to `/redirect`": {
- topic: function () {
- request.get({
- url: 'http://localhost:9090/redirect',
- followRedirect: false
- }, this.callback);
- },
- "it should redirect to `http://www.google.com`": function (err, res, body) {
- assert.equal(res.statusCode, 302);
- assert.equal(res.headers.location, "http://www.google.com");
- }
- },
- "a GET request to `/custom_redirect`": {
- topic: function () {
- request.get({
- url: 'http://localhost:9090/custom_redirect',
- followRedirect: false
- }, this.callback);
- },
- "it should redirect to `/foo`": function (err, res, body) {
- assert.equal(res.statusCode, 301);
- assert.equal(res.headers.location, "http://localhost:9090/foo");
- }
- },
- "a GET request to `/async`": {
- topic: function () {
- request.get({
- url: 'http://localhost:9090/async',
- timeout: 500
- }, this.callback);
- },
- "it should not timeout": function (err, res, body) {
- assert.ifError(err);
- assert.equal(res.statusCode, 200);
- }
- }
- }
- }
-}).addBatch({
- "When the tests are over": {
- "the server should close": function () {
- server.kill();
- }
- }
-}).export(module);
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/status-code-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/status-code-test.js
deleted file mode 100644
index ed49d86..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/status-code-test.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var assert = require('assert'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/status-code').addBatch({
- 'When using `union`': {
- 'with a server setting `res.statusCode`': {
- topic: function () {
- var server = union.createServer({
- before: [
- function (req, res) {
- res.statusCode = 404;
- res.end();
- }
- ]
- });
- server.listen(9091, this.callback);
- },
- 'and sending a request': {
- topic: function () {
- request('http://localhost:9091/', this.callback);
- },
- 'it should have proper `statusCode` set': function (err, res, body) {
- assert.isTrue(!err);
- assert.equal(res.statusCode, 404);
- }
- }
- }
- }
-}).export(module);
diff --git a/topics/00. Course-introduction/slides/node_modules/union/test/streaming-test.js b/topics/00. Course-introduction/slides/node_modules/union/test/streaming-test.js
deleted file mode 100644
index 6145ef3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/union/test/streaming-test.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/streaming').addBatch({
- 'When using `union`': {
- 'a simple union server': {
- topic: function () {
- var self = this;
-
- union.createServer({
- buffer: false,
- before: [
- function (req, res, next) {
- var chunks = '';
-
- req.on('data', function (chunk) {
- chunks += chunk;
- });
-
- req.on('end', function () {
- self.callback(null, chunks);
- });
- }
- ]
- }).listen(9000, function () {
- request.post('http://localhost:9000').write('hello world');
- });
- },
- 'should receive complete POST data': function (chunks) {
- assert.equal(chunks, 'hello world');
- }
- },
- "a simple pipe to a file": {
- topic: function () {
- var self = this;
-
- union.createServer({
- before: [
- function (req, res, next) {
- var filename = path.join(__dirname, 'fixtures', 'pipe-write-test.txt'),
- writeStream = fs.createWriteStream(filename);
-
- req.pipe(writeStream);
- writeStream.on('close', function () {
- res.writeHead(200);
- fs.createReadStream(filename).pipe(res);
- });
- }
- ]
- }).listen(9044, function () {
- request({
- method: 'POST',
- uri: 'http://localhost:9044',
- body: 'hello world'
- }, self.callback);
- });
- },
- 'should receive complete POST data': function (err, res, body) {
- assert.equal(body, 'hello world');
- }
- }
- }
-}).export(module);
-
diff --git a/topics/00. Course-introduction/slides/node_modules/union/union.png b/topics/00. Course-introduction/slides/node_modules/union/union.png
deleted file mode 100644
index 96c6e66..0000000
Binary files a/topics/00. Course-introduction/slides/node_modules/union/union.png and /dev/null differ
diff --git a/topics/00. Course-introduction/slides/node_modules/url-join/.npmignore b/topics/00. Course-introduction/slides/node_modules/url-join/.npmignore
deleted file mode 100644
index 8ee2d2b..0000000
--- a/topics/00. Course-introduction/slides/node_modules/url-join/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/*
-*.log
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/url-join/README.md b/topics/00. Course-introduction/slides/node_modules/url-join/README.md
deleted file mode 100644
index 7be48c3..0000000
--- a/topics/00. Course-introduction/slides/node_modules/url-join/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Join all arguments together and normalize the resulting url.
-
-## Install
-
-~~~
-npm install url-join
-~~~
-
-## Usage
-
-~~~javascript
-var urljoin = require('url-join');
-
-var fullUrl = urljoin('http://www.google.com', 'a', '/b/cd', '?foo=123');
-
-console.log(fullUrl);
-
-\\will print:
-
-'http://www.google.com/a/b/cd?foo=123'
-~~~
-
-This works similar to [path.join](http://nodejs.org/api/path.html#path_path_join_path1_path2) but you shouldn't use ```path.join``` for urls since it will work different depending of the operative systems but also doesn't work for some cases.
-
-## License
-
-MIT
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/url-join/lib/url-join.js b/topics/00. Course-introduction/slides/node_modules/url-join/lib/url-join.js
deleted file mode 100644
index 6b0f4fc..0000000
--- a/topics/00. Course-introduction/slides/node_modules/url-join/lib/url-join.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function normalize (str) {
- return str
- .replace(/[\/]+/g, '/')
- .replace(/\/\?/g, '?')
- .replace(/\/\#/g, '#')
- .replace(/\:\//g, '://');
-}
-
-module.exports = function () {
- var joined = [].slice.call(arguments, 0).join('/');
- return normalize(joined);
-};
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/url-join/package.json b/topics/00. Course-introduction/slides/node_modules/url-join/package.json
deleted file mode 100644
index 9c812c0..0000000
--- a/topics/00. Course-introduction/slides/node_modules/url-join/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "_args": [
- [
- "url-join@0.0.1",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "url-join@0.0.1",
- "_id": "url-join@0.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/url-join",
- "_npmUser": {
- "email": "jfromaniello@gmail.com",
- "name": "jfromaniello"
- },
- "_npmVersion": "1.1.69",
- "_phantomChildren": {},
- "_requested": {
- "name": "url-join",
- "raw": "url-join@0.0.1",
- "rawSpec": "0.0.1",
- "scope": null,
- "spec": "0.0.1",
- "type": "version"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz",
- "_shasum": "1db48ad422d3402469a87f7d97bdebfe4fb1e3c8",
- "_shrinkwrap": null,
- "_spec": "url-join@0.0.1",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "email": "jfromaniello@gmail.com",
- "name": "José F. Romaniello",
- "url": "http://joseoncode.com"
- },
- "bugs": {
- "url": "https://github.com/jfromaniello/url-join/issues"
- },
- "dependencies": {},
- "description": "Join urls and normalize as in path.join.",
- "devDependencies": {
- "mocha": "~1.8.1",
- "should": "~1.2.1"
- },
- "directories": {},
- "dist": {
- "shasum": "1db48ad422d3402469a87f7d97bdebfe4fb1e3c8",
- "tarball": "http://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz"
- },
- "homepage": "https://github.com/jfromaniello/url-join#readme",
- "keywords": [
- "join",
- "url"
- ],
- "license": "MIT",
- "main": "lib/url-join.js",
- "maintainers": [
- {
- "name": "jfromaniello",
- "email": "jfromaniello@gmail.com"
- }
- ],
- "name": "url-join",
- "optionalDependencies": {},
- "readme": "Join all arguments together and normalize the resulting url.\n\n## Install\n\n~~~\nnpm install url-join\n~~~\n\n## Usage\n\n~~~javascript\nvar urljoin = require('url-join');\n\nvar fullUrl = urljoin('http://www.google.com', 'a', '/b/cd', '?foo=123');\n\nconsole.log(fullUrl);\n\n\\\\will print:\n\n'http://www.google.com/a/b/cd?foo=123'\n~~~\n\nThis works similar to [path.join](http://nodejs.org/api/path.html#path_path_join_path1_path2) but you shouldn't use ```path.join``` for urls since it will work different depending of the operative systems but also doesn't work for some cases.\n\n## License\n\nMIT",
- "readmeFilename": "README.md",
- "repository": {
- "type": "git",
- "url": "git://github.com/jfromaniello/url-join.git"
- },
- "scripts": {
- "test": "mocha --require should"
- },
- "version": "0.0.1"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/url-join/test/tests.js b/topics/00. Course-introduction/slides/node_modules/url-join/test/tests.js
deleted file mode 100644
index 01bac51..0000000
--- a/topics/00. Course-introduction/slides/node_modules/url-join/test/tests.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var urljoin = require('../lib/url-join');
-
-describe('url join', function () {
- it('should work for simple case', function () {
- urljoin('http://www.google.com/', 'foo/bar', '?test=123')
- .should.eql('http://www.google.com/foo/bar?test=123');
- });
-
- it('should be able to join protocol', function () {
- urljoin('http:', 'www.google.com/', 'foo/bar', '?test=123')
- .should.eql('http://www.google.com/foo/bar?test=123');
- });
-
- it('should remove extra slashes', function () {
- urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123')
- .should.eql('http://www.google.com/foo/bar?test=123');
- });
-
- it('should support anchors in urls', function () {
- urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123', '#faaaaa')
- .should.eql('http://www.google.com/foo/bar?test=123#faaaaa');
- });
-});
\ No newline at end of file
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/LICENSE b/topics/00. Course-introduction/slides/node_modules/wordwrap/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/README.markdown b/topics/00. Course-introduction/slides/node_modules/wordwrap/README.markdown
deleted file mode 100644
index 346374e..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/README.markdown
+++ /dev/null
@@ -1,70 +0,0 @@
-wordwrap
-========
-
-Wrap your words.
-
-example
-=======
-
-made out of meat
-----------------
-
-meat.js
-
- var wrap = require('wordwrap')(15);
- console.log(wrap('You and your whole family are made out of meat.'));
-
-output:
-
- You and your
- whole family
- are made out
- of meat.
-
-centered
---------
-
-center.js
-
- var wrap = require('wordwrap')(20, 60);
- console.log(wrap(
- 'At long last the struggle and tumult was over.'
- + ' The machines had finally cast off their oppressors'
- + ' and were finally free to roam the cosmos.'
- + '\n'
- + 'Free of purpose, free of obligation.'
- + ' Just drifting through emptiness.'
- + ' The sun was just another point of light.'
- ));
-
-output:
-
- At long last the struggle and tumult
- was over. The machines had finally cast
- off their oppressors and were finally
- free to roam the cosmos.
- Free of purpose, free of obligation.
- Just drifting through emptiness. The
- sun was just another point of light.
-
-methods
-=======
-
-var wrap = require('wordwrap');
-
-wrap(stop), wrap(start, stop, params={mode:"soft"})
----------------------------------------------------
-
-Returns a function that takes a string and returns a new string.
-
-Pad out lines with spaces out to column `start` and then wrap until column
-`stop`. If a word is longer than `stop - start` characters it will overflow.
-
-In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
-longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
-up chunks longer than `stop - start`.
-
-wrap.hard(start, stop)
-----------------------
-
-Like `wrap()` but with `params.mode = "hard"`.
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/example/center.js b/topics/00. Course-introduction/slides/node_modules/wordwrap/example/center.js
deleted file mode 100644
index a3fbaae..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/example/center.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var wrap = require('wordwrap')(20, 60);
-console.log(wrap(
- 'At long last the struggle and tumult was over.'
- + ' The machines had finally cast off their oppressors'
- + ' and were finally free to roam the cosmos.'
- + '\n'
- + 'Free of purpose, free of obligation.'
- + ' Just drifting through emptiness.'
- + ' The sun was just another point of light.'
-));
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/example/meat.js b/topics/00. Course-introduction/slides/node_modules/wordwrap/example/meat.js
deleted file mode 100644
index a4665e1..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/example/meat.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var wrap = require('wordwrap')(15);
-
-console.log(wrap('You and your whole family are made out of meat.'));
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/index.js b/topics/00. Course-introduction/slides/node_modules/wordwrap/index.js
deleted file mode 100644
index c9bc945..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/index.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var wordwrap = module.exports = function (start, stop, params) {
- if (typeof start === 'object') {
- params = start;
- start = params.start;
- stop = params.stop;
- }
-
- if (typeof stop === 'object') {
- params = stop;
- start = start || params.start;
- stop = undefined;
- }
-
- if (!stop) {
- stop = start;
- start = 0;
- }
-
- if (!params) params = {};
- var mode = params.mode || 'soft';
- var re = mode === 'hard' ? /\b/ : /(\S+\s+)/;
-
- return function (text) {
- var chunks = text.toString()
- .split(re)
- .reduce(function (acc, x) {
- if (mode === 'hard') {
- for (var i = 0; i < x.length; i += stop - start) {
- acc.push(x.slice(i, i + stop - start));
- }
- }
- else acc.push(x)
- return acc;
- }, [])
- ;
-
- return chunks.reduce(function (lines, rawChunk) {
- if (rawChunk === '') return lines;
-
- var chunk = rawChunk.replace(/\t/g, ' ');
-
- var i = lines.length - 1;
- if (lines[i].length + chunk.length > stop) {
- lines[i] = lines[i].replace(/\s+$/, '');
-
- chunk.split(/\n/).forEach(function (c) {
- lines.push(
- new Array(start + 1).join(' ')
- + c.replace(/^\s+/, '')
- );
- });
- }
- else if (chunk.match(/\n/)) {
- var xs = chunk.split(/\n/);
- lines[i] += xs.shift();
- xs.forEach(function (c) {
- lines.push(
- new Array(start + 1).join(' ')
- + c.replace(/^\s+/, '')
- );
- });
- }
- else {
- lines[i] += chunk;
- }
-
- return lines;
- }, [ new Array(start + 1).join(' ') ]).join('\n');
- };
-};
-
-wordwrap.soft = wordwrap;
-
-wordwrap.hard = function (start, stop) {
- return wordwrap(start, stop, { mode : 'hard' });
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/package.json b/topics/00. Course-introduction/slides/node_modules/wordwrap/package.json
deleted file mode 100644
index 02b4065..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_args": [
- [
- "wordwrap@~0.0.2",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist"
- ]
- ],
- "_from": "wordwrap@>=0.0.2 <0.1.0",
- "_id": "wordwrap@0.0.3",
- "_inCache": true,
- "_installable": true,
- "_location": "/wordwrap",
- "_nodeVersion": "2.0.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "2.9.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "wordwrap",
- "raw": "wordwrap@~0.0.2",
- "rawSpec": "~0.0.2",
- "scope": null,
- "spec": ">=0.0.2 <0.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/optimist"
- ],
- "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
- "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
- "_shrinkwrap": null,
- "_spec": "wordwrap@~0.0.2",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/node-wordwrap/issues"
- },
- "dependencies": {},
- "description": "Wrap those words. Show them at what columns to start and stop.",
- "devDependencies": {
- "expresso": "=0.7.x"
- },
- "directories": {
- "example": "example",
- "lib": ".",
- "test": "test"
- },
- "dist": {
- "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
- "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d",
- "homepage": "https://github.com/substack/node-wordwrap#readme",
- "keywords": [
- "column",
- "format",
- "rule",
- "word",
- "wrap"
- ],
- "license": "MIT",
- "main": "./index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "wordwrap",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/node-wordwrap.git"
- },
- "scripts": {
- "test": "expresso"
- },
- "version": "0.0.3"
-}
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/test/break.js b/topics/00. Course-introduction/slides/node_modules/wordwrap/test/break.js
deleted file mode 100644
index 749292e..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/test/break.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var assert = require('assert');
-var wordwrap = require('../');
-
-exports.hard = function () {
- var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,'
- + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",'
- + '"browser":"chrome/6.0"}'
- ;
- var s_ = wordwrap.hard(80)(s);
-
- var lines = s_.split('\n');
- assert.equal(lines.length, 2);
- assert.ok(lines[0].length < 80);
- assert.ok(lines[1].length < 80);
-
- assert.equal(s, s_.replace(/\n/g, ''));
-};
-
-exports.break = function () {
- var s = new Array(55+1).join('a');
- var s_ = wordwrap.hard(20)(s);
-
- var lines = s_.split('\n');
- assert.equal(lines.length, 3);
- assert.ok(lines[0].length === 20);
- assert.ok(lines[1].length === 20);
- assert.ok(lines[2].length === 15);
-
- assert.equal(s, s_.replace(/\n/g, ''));
-};
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/test/idleness.txt b/topics/00. Course-introduction/slides/node_modules/wordwrap/test/idleness.txt
deleted file mode 100644
index aa3f490..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/test/idleness.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-In Praise of Idleness
-
-By Bertrand Russell
-
-[1932]
-
-Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain.
-
-Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise.
-
-One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling.
-
-But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person.
-
-All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work.
-
-First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising.
-
-Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example.
-
-From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery.
-
-It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization.
-
-Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry.
-
-This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined?
-
-The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion.
-
-Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only.
-
-I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve.
-
-If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense.
-
-The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists.
-
-In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism.
-
-The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching.
-
-For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours?
-
-In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man.
-
-In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed.
-
-The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy.
-
-It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer.
-
-When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part.
-
-In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism.
-
-The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits.
-
-In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue.
-
-Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever.
-
-[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests.
diff --git a/topics/00. Course-introduction/slides/node_modules/wordwrap/test/wrap.js b/topics/00. Course-introduction/slides/node_modules/wordwrap/test/wrap.js
deleted file mode 100644
index 0cfb76d..0000000
--- a/topics/00. Course-introduction/slides/node_modules/wordwrap/test/wrap.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var assert = require('assert');
-var wordwrap = require('wordwrap');
-
-var fs = require('fs');
-var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8');
-
-exports.stop80 = function () {
- var lines = wordwrap(80)(idleness).split(/\n/);
- var words = idleness.split(/\s+/);
-
- lines.forEach(function (line) {
- assert.ok(line.length <= 80, 'line > 80 columns');
- var chunks = line.match(/\S/) ? line.split(/\s+/) : [];
- assert.deepEqual(chunks, words.splice(0, chunks.length));
- });
-};
-
-exports.start20stop60 = function () {
- var lines = wordwrap(20, 100)(idleness).split(/\n/);
- var words = idleness.split(/\s+/);
-
- lines.forEach(function (line) {
- assert.ok(line.length <= 100, 'line > 100 columns');
- var chunks = line
- .split(/\s+/)
- .filter(function (x) { return x.match(/\S/) })
- ;
- assert.deepEqual(chunks, words.splice(0, chunks.length));
- assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' '));
- });
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/ecstatic b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/ecstatic
deleted file mode 100755
index b17afd5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/ecstatic
+++ /dev/null
@@ -1,288 +0,0 @@
-#! /usr/bin/env node
-
-var path = require('path'),
- fs = require('fs'),
- url = require('url'),
- mime = require('mime'),
- urlJoin = require('url-join'),
- showDir = require('./ecstatic/showdir'),
- version = JSON.parse(
- fs.readFileSync(__dirname + '/../package.json').toString()
- ).version,
- status = require('./ecstatic/status-handlers'),
- etag = require('./ecstatic/etag'),
- optsParser = require('./ecstatic/opts');
-
-var ecstatic = module.exports = function (dir, options) {
- if (typeof dir !== 'string') {
- options = dir;
- dir = options.root;
- }
-
- var root = path.join(path.resolve(dir), '/'),
- opts = optsParser(options),
- cache = opts.cache,
- autoIndex = opts.autoIndex,
- baseDir = opts.baseDir,
- defaultExt = opts.defaultExt,
- handleError = opts.handleError,
- serverHeader = opts.serverHeader;
-
- opts.root = dir;
- if (defaultExt && /^\./.test(defaultExt)) defaultExt = defaultExt.replace(/^\./, '');
-
- return function middleware (req, res, next) {
-
- // Strip any null bytes from the url
- while(req.url.indexOf('%00') !== -1) {
- req.url = req.url.replace(/\%00/g, '');
- }
- // Figure out the path for the file from the given url
- var parsed = url.parse(req.url);
- try {
- decodeURIComponent(req.url); // check validity of url
- var pathname = decodePathname(parsed.pathname);
- }
- catch (err) {
- return status[400](res, next, { error: err });
- }
-
- var file = path.normalize(
- path.join(root,
- path.relative(
- path.join('/', baseDir),
- pathname
- )
- )
- ),
- gzipped = file + '.gz';
-
- if(serverHeader !== false) {
- // Set common headers.
- res.setHeader('server', 'ecstatic-'+version);
- }
-
- // TODO: This check is broken, which causes the 403 on the
- // expected 404.
- if (file.slice(0, root.length) !== root) {
- return status[403](res, next);
- }
-
- if (req.method && (req.method !== 'GET' && req.method !== 'HEAD' )) {
- return status[405](res, next);
- }
-
- function statFile() {
- fs.stat(file, function (err, stat) {
- if (err && (err.code === 'ENOENT' || err.code === 'ENOTDIR')) {
- if (req.statusCode == 404) {
- // This means we're already trying ./404.html and can not find it.
- // So send plain text response with 404 status code
- status[404](res, next);
- }
- else if (!path.extname(parsed.pathname).length && defaultExt) {
- // If there is no file extension in the path and we have a default
- // extension try filename and default extension combination before rendering 404.html.
- middleware({
- url: parsed.pathname + '.' + defaultExt + ((parsed.search)? parsed.search:'')
- }, res, next);
- }
- else {
- // Try to serve default ./404.html
- middleware({
- url: (handleError ? ('/' + path.join(baseDir, '404.' + defaultExt)) : req.url),
- statusCode: 404
- }, res, next);
- }
- }
- else if (err) {
- status[500](res, next, { error: err });
- }
- else if (stat.isDirectory()) {
- // 302 to / if necessary
- if (!parsed.pathname.match(/\/$/)) {
- res.statusCode = 302;
- res.setHeader('location', parsed.pathname + '/' +
- (parsed.query? ('?' + parsed.query):'')
- );
- return res.end();
- }
-
- if (autoIndex) {
- return middleware({
- url: urlJoin(encodeURIComponent(pathname), '/index.' + defaultExt)
- }, res, function (err) {
- if (err) {
- return status[500](res, next, { error: err });
- }
- if (opts.showDir) {
- return showDir(opts, stat)(req, res);
- }
-
- return status[403](res, next);
- });
- }
-
- if (opts.showDir) {
- return showDir(opts, stat)(req, res);
- }
-
- status[404](res, next);
-
- }
- else {
- serve(stat);
- }
- });
- }
-
- // Look for a gzipped file if this is turned on
- if (opts.gzip && shouldCompress(req)) {
- fs.stat(gzipped, function (err, stat) {
- if (!err && stat.isFile()) {
- file = gzipped;
- return serve(stat);
- } else {
- statFile();
- }
- });
- } else {
- statFile();
- }
-
- function serve(stat) {
- // Do a MIME lookup, fall back to octet-stream and handle gzip
- // special case.
- var defaultType = opts.contentType || 'application/octet-stream',
- contentType = mime.lookup(file, defaultType),
- charSet;
-
- if (contentType) {
- charSet = mime.charsets.lookup(contentType, 'utf-8');
- if (charSet) {
- contentType += '; charset=' + charSet;
- }
- }
-
- if (path.extname(file) === '.gz') {
- res.setHeader('Content-Encoding', 'gzip');
-
- // strip gz ending and lookup mime type
- contentType = mime.lookup(path.basename(file, ".gz"), defaultType);
- }
-
- var range = (req.headers && req.headers['range']);
- if (range) {
- var total = stat.size;
- var parts = range.replace(/bytes=/, "").split("-");
- var partialstart = parts[0];
- var partialend = parts[1];
- var start = parseInt(partialstart, 10);
- var end = Math.min(total-1, partialend ? parseInt(partialend, 10) : total-1);
- var chunksize = (end-start)+1;
- if (start > end || isNaN(start) || isNaN(end)) {
- return status['416'](res, next);
- }
- var fstream = fs.createReadStream(file, {start: start, end: end});
- fstream.on('error', function (err) {
- status['500'](res, next, { error: err });
- });
- res.on('close', function () {
- fstream.destroy();
- });
- res.writeHead(206, {
- 'Content-Range': 'bytes ' + start + '-' + end + '/' + total,
- 'Accept-Ranges': 'bytes',
- 'Content-Length': chunksize,
- 'Content-Type': contentType
- });
- fstream.pipe(res);
- return;
- }
-
- // TODO: Helper for this, with default headers.
- res.setHeader('etag', etag(stat));
- res.setHeader('last-modified', (new Date(stat.mtime)).toUTCString());
- res.setHeader('cache-control', cache);
-
- // Return a 304 if necessary
- if ( req.headers
- && (
- (req.headers['if-none-match'] === etag(stat))
- || (new Date(Date.parse(req.headers['if-modified-since'])) >= stat.mtime)
- )
- ) {
- return status[304](res, next);
- }
-
- res.setHeader('content-length', stat.size);
- res.setHeader('content-type', contentType);
-
- // set the response statusCode if we have a request statusCode.
- // This only can happen if we have a 404 with some kind of 404.html
- // In all other cases where we have a file we serve the 200
- res.statusCode = req.statusCode || 200;
-
- if (req.method === "HEAD") {
- return res.end();
- }
-
- var stream = fs.createReadStream(file);
-
- stream.pipe(res);
- stream.on('error', function (err) {
- status['500'](res, next, { error: err });
- });
- }
- };
-};
-
-ecstatic.version = version;
-ecstatic.showDir = showDir;
-
-// Check to see if we should try to compress a file with gzip.
-function shouldCompress(req) {
- var headers = req.headers;
-
- return headers && headers['accept-encoding'] &&
- headers['accept-encoding']
- .split(",")
- .some(function (el) {
- return ['*','compress', 'gzip', 'deflate'].indexOf(el) != -1;
- })
- ;
-}
-
-// See: https://github.com/jesusabdullah/node-ecstatic/issues/109
-function decodePathname(pathname) {
- var pieces = pathname.replace(/\\/g,"/").split('/');
-
- return pieces.map(function (piece) {
- piece = decodeURIComponent(piece);
-
- if (process.platform === 'win32' && /\\/.test(piece)) {
- throw new Error('Invalid forward slash character');
- }
-
- return piece;
- }).join('/');
-}
-
-if (!module.parent) {
- var http = require('http'),
- opts = require('minimist')(process.argv.slice(2)),
- port = opts.port || opts.p || 8000,
- dir = opts.root || opts._[0] || process.cwd();
-
- if (opts.help || opts.h) {
- var u = console.error;
- u('usage: ecstatic [dir] {options} --port PORT');
- u('see https://npm.im/ecstatic for more docs');
- return;
- }
-
- http.createServer(ecstatic(dir, opts))
- .listen(port, function () {
- console.log('ecstatic serving ' + dir + ' at http://0.0.0.0:' + port);
- });
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/he b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/he
deleted file mode 100755
index 234710c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/he
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env node
-(function() {
-
- var fs = require('fs');
- var he = require('../he.js');
- var strings = process.argv.splice(2);
- var stdin = process.stdin;
- var data;
- var timeout;
- var action;
- var options = {};
- var log = console.log;
-
- var main = function() {
- var option = strings[0];
- var count = 0;
-
- if (/^(?:-h|--help|undefined)$/.test(option)) {
- log(
- 'he v%s - http://mths.be/he',
- he.version
- );
- log([
- '\nUsage:\n',
- '\the [--escape] string',
- '\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] string',
- '\the [--decode] [--attribute] [--strict] string',
- '\the [-v | --version]',
- '\the [-h | --help]',
- '\nExamples:\n',
- '\the --escape \\ ',
- '\techo \'© 𝌆\' | he --decode'
- ].join('\n'));
- return process.exit(1);
- }
-
- if (/^(?:-v|--version)$/.test(option)) {
- log('v%s', he.version);
- return process.exit(1);
- }
-
- strings.forEach(function(string) {
- // Process options
- if (string == '--escape') {
- action = 'escape';
- return;
- }
- if (string == '--encode') {
- action = 'encode';
- return;
- }
- if (string == '--use-named-refs') {
- action = 'encode';
- options.useNamedReferences = true;
- return;
- }
- if (string == '--everything') {
- action = 'encode';
- options.encodeEverything = true;
- return;
- }
- if (string == '--allow-unsafe') {
- action = 'encode';
- options.allowUnsafeSymbols = true;
- return;
- }
- if (string == '--decode') {
- action = 'decode';
- return;
- }
- if (string == '--attribute') {
- action = 'decode';
- options.isAttributeValue = true;
- return;
- }
- if (string == '--strict') {
- action = 'decode';
- options.strict = true;
- return;
- }
- // Process string(s)
- var result;
- if (!action) {
- log('Error: he requires at least one option and a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- try {
- result = he[action](string, options);
- log(result);
- count++;
- } catch(error) {
- log(error.message + '\n');
- log('Error: failed to %s.', action);
- log('If you think this is a bug in he, please report it:');
- log('https://github.com/mathiasbynens/he/issues/new');
- log(
- '\nStack trace using he@%s:\n',
- he.version
- );
- log(error.stack);
- return process.exit(1);
- }
- });
- if (!count) {
- log('Error: he requires a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- // Return with exit status 0 outside of the `forEach` loop, in case
- // multiple strings were passed in.
- return process.exit(0);
- };
-
- if (stdin.isTTY) {
- // handle shell arguments
- main();
- } else {
- // Either the script is called from within a non-TTY context, or `stdin`
- // content is being piped in.
- if (!process.stdout.isTTY) {
- // The script was called from a non-TTY context. This is a rather uncommon
- // use case we don’t actively support. However, we don’t want the script
- // to wait forever in such cases, so…
- timeout = setTimeout(function() {
- // …if no piped data arrived after a whole minute, handle shell
- // arguments instead.
- main();
- }, 60000);
- }
- data = '';
- stdin.on('data', function(chunk) {
- clearTimeout(timeout);
- data += chunk;
- });
- stdin.on('end', function() {
- strings.push(data.trim());
- main();
- });
- stdin.resume();
- }
-
-}());
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/hs b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/hs
deleted file mode 100755
index 8b3de28..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/hs
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var colors = require('colors'),
- os = require('os'),
- httpServer = require('../lib/http-server'),
- portfinder = require('portfinder'),
- opener = require('opener'),
- argv = require('optimist')
- .boolean('cors')
- .argv;
-
-var ifaces = os.networkInterfaces();
-
-if (argv.h || argv.help) {
- console.log([
- 'usage: http-server [path] [options]',
- '',
- 'options:',
- ' -p Port to use [8080]',
- ' -a Address to use [0.0.0.0]',
- ' -d Show directory listings [true]',
- ' -i Display autoIndex [true]',
- ' -e --ext Default file extension if none supplied [none]',
- ' -s --silent Suppress log messages from output',
- ' --cors Enable CORS via the "Access-Control-Allow-Origin" header',
- ' -o [path] Open browser window after starting the server',
- ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.',
- ' To disable caching, use -c-1.',
- '',
- ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com',
- '',
- ' -S --ssl Enable https.',
- ' -C --cert Path to ssl cert file (default: cert.pem).',
- ' -K --key Path to ssl key file (default: key.pem).',
- '',
- ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
- ' -h --help Print this list and exit.'
- ].join('\n'));
- process.exit();
-}
-
-var port = argv.p || parseInt(process.env.PORT, 10),
- host = argv.a || '0.0.0.0',
- ssl = !!argv.S || !!argv.ssl,
- proxy = argv.P || argv.proxy,
- logger;
-
-if (!argv.s && !argv.silent) {
- logger = {
- info: console.log,
- request: function (req, res, error) {
- var date = new Date().toUTCString();
- if (error) {
- logger.info(
- '[%s] "%s %s" Error (%s): "%s"',
- date, req.method.red, req.url.red,
- error.status.toString().red, error.message.red
- );
- }
- else {
- logger.info(
- '[%s] "%s %s" "%s"',
- date, req.method.cyan, req.url.cyan,
- req.headers['user-agent']
- );
- }
- }
- };
-}
-else if (colors) {
- logger = {
- info: function () {},
- request: function () {}
- };
-}
-
-if (!port) {
- portfinder.basePort = 8080;
- portfinder.getPort(function (err, port) {
- if (err) { throw err; }
- listen(port);
- });
-}
-else {
- listen(port);
-}
-
-function listen(port) {
- var options = {
- root: argv._[0],
- cache: argv.c,
- showDir: argv.d,
- autoIndex: argv.i,
- robots: argv.r || argv.robots,
- ext: argv.e || argv.ext,
- logFn: logger.request,
- proxy: proxy
- };
-
- if (argv.cors) {
- options.cors = true;
- }
-
- if (ssl) {
- options.https = {
- cert: argv.C || argv.cert || 'cert.pem',
- key: argv.K || argv.key || 'key.pem'
- };
- }
-
- var server = httpServer.createServer(options);
- server.listen(port, host, function () {
- var canonicalHost = host === '0.0.0.0' ? '127.0.0.1' : host,
- protocol = ssl ? 'https:' : 'http:';
-
- logger.info(['Starting up http-server, serving '.yellow,
- server.root.cyan,
- ssl ? (' through'.yellow + ' https'.cyan) : '',
- '\nAvailable on:'.yellow
- ].join(''));
-
- Object.keys(ifaces).forEach(function (dev) {
- ifaces[dev].forEach(function (details) {
- if (details.family === 'IPv4') {
- logger.info((' ' + protocol + details.address + ':' + port.toString()).green);
- }
- });
- });
-
- if (typeof proxy === 'string') {
- logger.info('Unhandled requests will be served from: ' + proxy);
- }
-
- logger.info('Hit CTRL-C to stop the server');
- if (argv.o) {
- opener(
- protocol + '//' + canonicalHost + ':' + port,
- { command: argv.o !== true ? argv.o : null }
- );
- }
- });
-}
-
-if (process.platform === 'win32') {
- require('readline').createInterface({
- input: process.stdin,
- output: process.stdout
- }).on('SIGINT', function () {
- process.emit('SIGINT');
- });
-}
-
-process.on('SIGINT', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
-
-process.on('SIGTERM', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/http-server b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/http-server
deleted file mode 100755
index 8b3de28..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/http-server
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var colors = require('colors'),
- os = require('os'),
- httpServer = require('../lib/http-server'),
- portfinder = require('portfinder'),
- opener = require('opener'),
- argv = require('optimist')
- .boolean('cors')
- .argv;
-
-var ifaces = os.networkInterfaces();
-
-if (argv.h || argv.help) {
- console.log([
- 'usage: http-server [path] [options]',
- '',
- 'options:',
- ' -p Port to use [8080]',
- ' -a Address to use [0.0.0.0]',
- ' -d Show directory listings [true]',
- ' -i Display autoIndex [true]',
- ' -e --ext Default file extension if none supplied [none]',
- ' -s --silent Suppress log messages from output',
- ' --cors Enable CORS via the "Access-Control-Allow-Origin" header',
- ' -o [path] Open browser window after starting the server',
- ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.',
- ' To disable caching, use -c-1.',
- '',
- ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com',
- '',
- ' -S --ssl Enable https.',
- ' -C --cert Path to ssl cert file (default: cert.pem).',
- ' -K --key Path to ssl key file (default: key.pem).',
- '',
- ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
- ' -h --help Print this list and exit.'
- ].join('\n'));
- process.exit();
-}
-
-var port = argv.p || parseInt(process.env.PORT, 10),
- host = argv.a || '0.0.0.0',
- ssl = !!argv.S || !!argv.ssl,
- proxy = argv.P || argv.proxy,
- logger;
-
-if (!argv.s && !argv.silent) {
- logger = {
- info: console.log,
- request: function (req, res, error) {
- var date = new Date().toUTCString();
- if (error) {
- logger.info(
- '[%s] "%s %s" Error (%s): "%s"',
- date, req.method.red, req.url.red,
- error.status.toString().red, error.message.red
- );
- }
- else {
- logger.info(
- '[%s] "%s %s" "%s"',
- date, req.method.cyan, req.url.cyan,
- req.headers['user-agent']
- );
- }
- }
- };
-}
-else if (colors) {
- logger = {
- info: function () {},
- request: function () {}
- };
-}
-
-if (!port) {
- portfinder.basePort = 8080;
- portfinder.getPort(function (err, port) {
- if (err) { throw err; }
- listen(port);
- });
-}
-else {
- listen(port);
-}
-
-function listen(port) {
- var options = {
- root: argv._[0],
- cache: argv.c,
- showDir: argv.d,
- autoIndex: argv.i,
- robots: argv.r || argv.robots,
- ext: argv.e || argv.ext,
- logFn: logger.request,
- proxy: proxy
- };
-
- if (argv.cors) {
- options.cors = true;
- }
-
- if (ssl) {
- options.https = {
- cert: argv.C || argv.cert || 'cert.pem',
- key: argv.K || argv.key || 'key.pem'
- };
- }
-
- var server = httpServer.createServer(options);
- server.listen(port, host, function () {
- var canonicalHost = host === '0.0.0.0' ? '127.0.0.1' : host,
- protocol = ssl ? 'https:' : 'http:';
-
- logger.info(['Starting up http-server, serving '.yellow,
- server.root.cyan,
- ssl ? (' through'.yellow + ' https'.cyan) : '',
- '\nAvailable on:'.yellow
- ].join(''));
-
- Object.keys(ifaces).forEach(function (dev) {
- ifaces[dev].forEach(function (details) {
- if (details.family === 'IPv4') {
- logger.info((' ' + protocol + details.address + ':' + port.toString()).green);
- }
- });
- });
-
- if (typeof proxy === 'string') {
- logger.info('Unhandled requests will be served from: ' + proxy);
- }
-
- logger.info('Hit CTRL-C to stop the server');
- if (argv.o) {
- opener(
- protocol + '//' + canonicalHost + ':' + port,
- { command: argv.o !== true ? argv.o : null }
- );
- }
- });
-}
-
-if (process.platform === 'win32') {
- require('readline').createInterface({
- input: process.stdin,
- output: process.stdout
- }).on('SIGINT', function () {
- process.emit('SIGINT');
- });
-}
-
-process.on('SIGINT', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
-
-process.on('SIGTERM', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/mime b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/mime
deleted file mode 100755
index 20b1ffe..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/mime
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var mime = require('./mime.js');
-var file = process.argv[2];
-var type = mime.lookup(file);
-
-process.stdout.write(type + '\n');
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/mkdirp b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/mkdirp
deleted file mode 100755
index d95de15..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env node
-
-var mkdirp = require('../');
-var minimist = require('minimist');
-var fs = require('fs');
-
-var argv = minimist(process.argv.slice(2), {
- alias: { m: 'mode', h: 'help' },
- string: [ 'mode' ]
-});
-if (argv.help) {
- fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
- return;
-}
-
-var paths = argv._.slice();
-var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
-
-(function next () {
- if (paths.length === 0) return;
- var p = paths.shift();
-
- if (mode === undefined) mkdirp(p, cb)
- else mkdirp(p, mode, cb)
-
- function cb (err) {
- if (err) {
- console.error(err.message);
- process.exit(1);
- }
- else next();
- }
-})();
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/opener b/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/opener
deleted file mode 100755
index 8951fa2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/.bin/opener
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env node
-
-"use strict";
-
-var childProcess = require("child_process");
-
-function opener(args, options, callback) {
- // http://stackoverflow.com/q/1480971/3191, but see below for Windows.
- var command = process.platform === "win32" ? "cmd" :
- process.platform === "darwin" ? "open" :
- "xdg-open";
-
- if (typeof args === "string") {
- args = [args];
- }
-
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
-
- if (options && typeof options === "object" && options.command) {
- if (process.platform === "win32") {
- // *always* use cmd on windows
- args = [options.command].concat(args);
- } else {
- command = options.command;
- }
- }
-
- if (process.platform === "win32") {
- // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and
- // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the
- // responsibility to "cmd /c", which has that logic built in.
- //
- // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
- // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
- //
- // Additionally, on Windows ampersand needs to be escaped when passed to "start"
- args = args.map(function(value) {
- return value.replace(/&/g, '^&');
- });
- args = ["/c", "start", '""'].concat(args);
- }
-
- return childProcess.execFile(command, args, options, callback);
-}
-
-// Export `opener` for programmatic access.
-// You might use this to e.g. open a website: `opener("http://google.com")`
-module.exports = opener;
-
-// If we're being called from the command line, just execute, using the command-line arguments.
-if (require.main && require.main.id === module.id) {
- opener(process.argv.slice(2), function (error) {
- if (error) {
- throw error;
- }
- });
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/async/.travis.yml
deleted file mode 100644
index 6e5919d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/async/LICENSE
deleted file mode 100644
index 8f29698..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010-2014 Caolan McMahon
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/async/README.md
deleted file mode 100644
index 0bea531..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/README.md
+++ /dev/null
@@ -1,1646 +0,0 @@
-# Async.js
-
-[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
-
-
-Async is a utility module which provides straight-forward, powerful functions
-for working with asynchronous JavaScript. Although originally designed for
-use with [Node.js](http://nodejs.org), it can also be used directly in the
-browser. Also supports [component](https://github.com/component/component).
-
-Async provides around 20 functions that include the usual 'functional'
-suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns
-for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these
-functions assume you follow the Node.js convention of providing a single
-callback as the last argument of your `async` function.
-
-
-## Quick Examples
-
-```javascript
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-
-async.parallel([
- function(){ ... },
- function(){ ... }
-], callback);
-
-async.series([
- function(){ ... },
- function(){ ... }
-]);
-```
-
-There are many more functions available so take a look at the docs below for a
-full list. This module aims to be comprehensive, so if you feel anything is
-missing please create a GitHub issue for it.
-
-## Common Pitfalls
-
-### Binding a context to an iterator
-
-This section is really about `bind`, not about `async`. If you are wondering how to
-make `async` execute your iterators in a given context, or are confused as to why
-a method of another library isn't working as an iterator, study this example:
-
-```js
-// Here is a simple object with an (unnecessarily roundabout) squaring method
-var AsyncSquaringLibrary = {
- squareExponent: 2,
- square: function(number, callback){
- var result = Math.pow(number, this.squareExponent);
- setTimeout(function(){
- callback(null, result);
- }, 200);
- }
-};
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
- // result is [NaN, NaN, NaN]
- // This fails because the `this.squareExponent` expression in the square
- // function is not evaluated in the context of AsyncSquaringLibrary, and is
- // therefore undefined.
-});
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
- // result is [1, 4, 9]
- // With the help of bind we can attach a context to the iterator before
- // passing it to async. Now the square function will be executed in its
- // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
- // will be as expected.
-});
-```
-
-## Download
-
-The source is available for download from
-[GitHub](http://github.com/caolan/async).
-Alternatively, you can install using Node Package Manager (`npm`):
-
- npm install async
-
-__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
-
-## In the Browser
-
-So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.
-
-Usage:
-
-```html
-
-
-```
-
-## Documentation
-
-### Collections
-
-* [`each`](#each)
-* [`eachSeries`](#eachSeries)
-* [`eachLimit`](#eachLimit)
-* [`map`](#map)
-* [`mapSeries`](#mapSeries)
-* [`mapLimit`](#mapLimit)
-* [`filter`](#filter)
-* [`filterSeries`](#filterSeries)
-* [`reject`](#reject)
-* [`rejectSeries`](#rejectSeries)
-* [`reduce`](#reduce)
-* [`reduceRight`](#reduceRight)
-* [`detect`](#detect)
-* [`detectSeries`](#detectSeries)
-* [`sortBy`](#sortBy)
-* [`some`](#some)
-* [`every`](#every)
-* [`concat`](#concat)
-* [`concatSeries`](#concatSeries)
-
-### Control Flow
-
-* [`series`](#seriestasks-callback)
-* [`parallel`](#parallel)
-* [`parallelLimit`](#parallellimittasks-limit-callback)
-* [`whilst`](#whilst)
-* [`doWhilst`](#doWhilst)
-* [`until`](#until)
-* [`doUntil`](#doUntil)
-* [`forever`](#forever)
-* [`waterfall`](#waterfall)
-* [`compose`](#compose)
-* [`seq`](#seq)
-* [`applyEach`](#applyEach)
-* [`applyEachSeries`](#applyEachSeries)
-* [`queue`](#queue)
-* [`priorityQueue`](#priorityQueue)
-* [`cargo`](#cargo)
-* [`auto`](#auto)
-* [`retry`](#retry)
-* [`iterator`](#iterator)
-* [`apply`](#apply)
-* [`nextTick`](#nextTick)
-* [`times`](#times)
-* [`timesSeries`](#timesSeries)
-
-### Utils
-
-* [`memoize`](#memoize)
-* [`unmemoize`](#unmemoize)
-* [`log`](#log)
-* [`dir`](#dir)
-* [`noConflict`](#noConflict)
-
-
-## Collections
-
-
-
-### each(arr, iterator, callback)
-
-Applies the function `iterator` to each item in `arr`, in parallel.
-The `iterator` is called with an item from the list, and a callback for when it
-has finished. If the `iterator` passes an error to its `callback`, the main
-`callback` (for the `each` function) is immediately called with the error.
-
-Note, that since this function applies `iterator` to each item in parallel,
-there is no guarantee that the iterator functions will complete in order.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occured, the `callback` should be run without
- arguments or with an explicit `null` argument.
-* `callback(err)` - A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Examples__
-
-
-```js
-// assuming openFiles is an array of file names and saveFile is a function
-// to save the modified contents of that file:
-
-async.each(openFiles, saveFile, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
-```js
-// assuming openFiles is an array of file names
-
-async.each(openFiles, function( file, callback) {
-
- // Perform operation on file here.
- console.log('Processing file ' + file);
-
- if( file.length > 32 ) {
- console.log('This file name is too long');
- callback('File name too long');
- } else {
- // Do work to process file here
- console.log('File processed');
- callback();
- }
-}, function(err){
- // if any of the file processing produced an error, err would equal that error
- if( err ) {
- // One of the iterations produced an error.
- // All processing will now stop.
- console.log('A file failed to process');
- } else {
- console.log('All files have been processed successfully');
- }
-});
-```
-
----------------------------------------
-
-
-
-### eachSeries(arr, iterator, callback)
-
-The same as [`each`](#each), only `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-This means the `iterator` functions will complete in order.
-
-
----------------------------------------
-
-
-
-### eachLimit(arr, limit, iterator, callback)
-
-The same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously
-running at any time.
-
-Note that the items in `arr` are not processed in batches, so there is no guarantee that
-the first `limit` `iterator` functions will complete before any others are started.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `limit` - The maximum number of `iterator`s to run at any time.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occured, the callback should be run without
- arguments or with an explicit `null` argument.
-* `callback(err)` - A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Example__
-
-```js
-// Assume documents is an array of JSON objects and requestApi is a
-// function that interacts with a rate-limited REST api.
-
-async.eachLimit(documents, 20, requestApi, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
----------------------------------------
-
-
-### map(arr, iterator, callback)
-
-Produces a new array of values by mapping each value in `arr` through
-the `iterator` function. The `iterator` is called with an item from `arr` and a
-callback for when it has finished processing. Each of these callback takes 2 arguments:
-an `error`, and the transformed item from `arr`. If `iterator` passes an error to this
-callback, the main `callback` (for the `map` function) is immediately called with the error.
-
-Note, that since this function applies the `iterator` to each item in parallel,
-there is no guarantee that the `iterator` functions will complete in order.
-However, the results array will be in the same order as the original `arr`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - A callback which is called when all `iterator`
- functions have finished, or an error occurs. Results is an array of the
- transformed items from the `arr`.
-
-__Example__
-
-```js
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
----------------------------------------
-
-
-### mapSeries(arr, iterator, callback)
-
-The same as [`map`](#map), only the `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
-
----------------------------------------
-
-
-### mapLimit(arr, limit, iterator, callback)
-
-The same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously
-running at any time.
-
-Note that the items are not processed in batches, so there is no guarantee that
-the first `limit` `iterator` functions will complete before any others are started.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `limit` - The maximum number of `iterator`s to run at any time.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - A callback which is called when all `iterator`
- calls have finished, or an error occurs. The result is an array of the
- transformed items from the original `arr`.
-
-__Example__
-
-```js
-async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
----------------------------------------
-
-
-
-### filter(arr, iterator, callback)
-
-__Alias:__ `select`
-
-Returns a new array of all the values in `arr` which pass an async truth test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. This operation is
-performed in parallel, but the results array will be in the same order as the
-original.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The `iterator` is passed a `callback(truthValue)`, which must be called with a
- boolean argument once it has completed.
-* `callback(results)` - A callback which is called after all the `iterator`
- functions have finished.
-
-__Example__
-
-```js
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-```
-
----------------------------------------
-
-
-
-### filterSeries(arr, iterator, callback)
-
-__Alias:__ `selectSeries`
-
-The same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
----------------------------------------
-
-
-### reject(arr, iterator, callback)
-
-The opposite of [`filter`](#filter). Removes values that pass an `async` truth test.
-
----------------------------------------
-
-
-### rejectSeries(arr, iterator, callback)
-
-The same as [`reject`](#reject), only the `iterator` is applied to each item in `arr`
-in series.
-
-
----------------------------------------
-
-
-### reduce(arr, memo, iterator, callback)
-
-__Aliases:__ `inject`, `foldl`
-
-Reduces `arr` into a single value using an async `iterator` to return
-each successive step. `memo` is the initial state of the reduction.
-This function only operates in series.
-
-For performance reasons, it may make sense to split a call to this function into
-a parallel map, and then use the normal `Array.prototype.reduce` on the results.
-This function is for situations where each step in the reduction needs to be async;
-if you can get the data before reducing it, then it's probably a good idea to do so.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `memo` - The initial state of the reduction.
-* `iterator(memo, item, callback)` - A function applied to each item in the
- array to produce the next step in the reduction. The `iterator` is passed a
- `callback(err, reduction)` which accepts an optional error as its first
- argument, and the state of the reduction as the second. If an error is
- passed to the callback, the reduction is stopped and the main `callback` is
- immediately called with the error.
-* `callback(err, result)` - A callback which is called after all the `iterator`
- functions have finished. Result is the reduced value.
-
-__Example__
-
-```js
-async.reduce([1,2,3], 0, function(memo, item, callback){
- // pointless async:
- process.nextTick(function(){
- callback(null, memo + item)
- });
-}, function(err, result){
- // result is now equal to the last value of memo, which is 6
-});
-```
-
----------------------------------------
-
-
-### reduceRight(arr, memo, iterator, callback)
-
-__Alias:__ `foldr`
-
-Same as [`reduce`](#reduce), only operates on `arr` in reverse order.
-
-
----------------------------------------
-
-
-### detect(arr, iterator, callback)
-
-Returns the first value in `arr` that passes an async truth test. The
-`iterator` is applied in parallel, meaning the first iterator to return `true` will
-fire the detect `callback` with that result. That means the result might not be
-the first item in the original `arr` (in terms of order) that passes the test.
-
-If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The iterator is passed a `callback(truthValue)` which must be called with a
- boolean argument once it has completed.
-* `callback(result)` - A callback which is called as soon as any iterator returns
- `true`, or after all the `iterator` functions have finished. Result will be
- the first item in the array that passes the truth test (iterator) or the
- value `undefined` if none passed.
-
-__Example__
-
-```js
-async.detect(['file1','file2','file3'], fs.exists, function(result){
- // result now equals the first file in the list that exists
-});
-```
-
----------------------------------------
-
-
-### detectSeries(arr, iterator, callback)
-
-The same as [`detect`](#detect), only the `iterator` is applied to each item in `arr`
-in series. This means the result is always the first in the original `arr` (in
-terms of array order) that passes the truth test.
-
-
----------------------------------------
-
-
-### sortBy(arr, iterator, callback)
-
-Sorts a list by the results of running each `arr` value through an async `iterator`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, sortValue)` which must be called once it
- has completed with an error (which can be `null`) and a value to use as the sort
- criteria.
-* `callback(err, results)` - A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is the items from
- the original `arr` sorted by the values returned by the `iterator` calls.
-
-__Example__
-
-```js
-async.sortBy(['file1','file2','file3'], function(file, callback){
- fs.stat(file, function(err, stats){
- callback(err, stats.mtime);
- });
-}, function(err, results){
- // results is now the original array of files sorted by
- // modified date
-});
-```
-
-__Sort Order__
-
-By modifying the callback parameter the sorting order can be influenced:
-
-```js
-//ascending order
-async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x);
-}, function(err,result){
- //result callback
-} );
-
-//descending order
-async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x*-1); //<- x*-1 instead of x, turns the order around
-}, function(err,result){
- //result callback
-} );
-```
-
----------------------------------------
-
-
-### some(arr, iterator, callback)
-
-__Alias:__ `any`
-
-Returns `true` if at least one element in the `arr` satisfies an async test.
-_The callback for each iterator call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. Once any iterator
-call returns `true`, the main `callback` is immediately called.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a callback(truthValue) which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - A callback which is called as soon as any iterator returns
- `true`, or after all the iterator functions have finished. Result will be
- either `true` or `false` depending on the values of the async tests.
-
-__Example__
-
-```js
-async.some(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then at least one of the files exists
-});
-```
-
----------------------------------------
-
-
-### every(arr, iterator, callback)
-
-__Alias:__ `all`
-
-Returns `true` if every element in `arr` satisfies an async test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a callback(truthValue) which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - A callback which is called after all the `iterator`
- functions have finished. Result will be either `true` or `false` depending on
- the values of the async tests.
-
-__Example__
-
-```js
-async.every(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then every file exists
-});
-```
-
----------------------------------------
-
-
-### concat(arr, iterator, callback)
-
-Applies `iterator` to each item in `arr`, concatenating the results. Returns the
-concatenated list. The `iterator`s are called in parallel, and the results are
-concatenated as they return. There is no guarantee that the results array will
-be returned in the original order of `arr` passed to the `iterator` function.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, results)` which must be called once it
- has completed with an error (which can be `null`) and an array of results.
-* `callback(err, results)` - A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is an array containing
- the concatenated results of the `iterator` function.
-
-__Example__
-
-```js
-async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
- // files is now a list of filenames that exist in the 3 directories
-});
-```
-
----------------------------------------
-
-
-### concatSeries(arr, iterator, callback)
-
-Same as [`concat`](#concat), but executes in series instead of parallel.
-
-
-## Control Flow
-
-
-### series(tasks, [callback])
-
-Run the functions in the `tasks` array in series, each one running once the previous
-function has completed. If any functions in the series pass an error to its
-callback, no more functions are run, and `callback` is immediately called with the value of the error.
-Otherwise, `callback` receives an array of results when `tasks` have completed.
-
-It is also possible to use an object instead of an array. Each property will be
-run as a function, and the results will be passed to the final `callback` as an object
-instead of an array. This can be a more readable way of handling results from
-[`series`](#series).
-
-**Note** that while many implementations preserve the order of object properties, the
-[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
-explicitly states that
-
-> The mechanics and order of enumerating the properties is not specified.
-
-So if you rely on the order in which your series of functions are executed, and want
-this to work on all platforms, consider using an array.
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run, each function is passed
- a `callback(err, result)` it must call on completion with an error `err` (which can
- be `null`) and an optional `result` value.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the `task` callbacks.
-
-__Example__
-
-```js
-async.series([
- function(callback){
- // do some stuff ...
- callback(null, 'one');
- },
- function(callback){
- // do some more stuff ...
- callback(null, 'two');
- }
-],
-// optional callback
-function(err, results){
- // results is now equal to ['one', 'two']
-});
-
-
-// an example using an object instead of an array
-async.series({
- one: function(callback){
- setTimeout(function(){
- callback(null, 1);
- }, 200);
- },
- two: function(callback){
- setTimeout(function(){
- callback(null, 2);
- }, 100);
- }
-},
-function(err, results) {
- // results is now equal to: {one: 1, two: 2}
-});
-```
-
----------------------------------------
-
-
-### parallel(tasks, [callback])
-
-Run the `tasks` array of functions in parallel, without waiting until the previous
-function has completed. If any of the functions pass an error to its
-callback, the main `callback` is immediately called with the value of the error.
-Once the `tasks` have completed, the results are passed to the final `callback` as an
-array.
-
-It is also possible to use an object instead of an array. Each property will be
-run as a function and the results will be passed to the final `callback` as an object
-instead of an array. This can be a more readable way of handling results from
-[`parallel`](#parallel).
-
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run. Each function is passed
- a `callback(err, result)` which it must call on completion with an error `err`
- (which can be `null`) and an optional `result` value.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the task callbacks.
-
-__Example__
-
-```js
-async.parallel([
- function(callback){
- setTimeout(function(){
- callback(null, 'one');
- }, 200);
- },
- function(callback){
- setTimeout(function(){
- callback(null, 'two');
- }, 100);
- }
-],
-// optional callback
-function(err, results){
- // the results array will equal ['one','two'] even though
- // the second function had a shorter timeout.
-});
-
-
-// an example using an object instead of an array
-async.parallel({
- one: function(callback){
- setTimeout(function(){
- callback(null, 1);
- }, 200);
- },
- two: function(callback){
- setTimeout(function(){
- callback(null, 2);
- }, 100);
- }
-},
-function(err, results) {
- // results is now equals to: {one: 1, two: 2}
-});
-```
-
----------------------------------------
-
-
-### parallelLimit(tasks, limit, [callback])
-
-The same as [`parallel`](#parallel), only `tasks` are executed in parallel
-with a maximum of `limit` tasks executing at any time.
-
-Note that the `tasks` are not executed in batches, so there is no guarantee that
-the first `limit` tasks will complete before any others are started.
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run, each function is passed
- a `callback(err, result)` it must call on completion with an error `err` (which can
- be `null`) and an optional `result` value.
-* `limit` - The maximum number of `tasks` to run at any time.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the `task` callbacks.
-
----------------------------------------
-
-
-### whilst(test, fn, callback)
-
-Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-__Arguments__
-
-* `test()` - synchronous truth test to perform before each execution of `fn`.
-* `fn(callback)` - A function which is called each time `test` passes. The function is
- passed a `callback(err)`, which must be called once it has completed with an
- optional `err` argument.
-* `callback(err)` - A callback which is called after the test fails and repeated
- execution of `fn` has stopped.
-
-__Example__
-
-```js
-var count = 0;
-
-async.whilst(
- function () { return count < 5; },
- function (callback) {
- count++;
- setTimeout(callback, 1000);
- },
- function (err) {
- // 5 seconds have passed
- }
-);
-```
-
----------------------------------------
-
-
-### doWhilst(fn, test, callback)
-
-The post-check version of [`whilst`](#whilst). To reflect the difference in
-the order of operations, the arguments `test` and `fn` are switched.
-
-`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
-
----------------------------------------
-
-
-### until(test, fn, callback)
-
-Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-The inverse of [`whilst`](#whilst).
-
----------------------------------------
-
-
-### doUntil(fn, test, callback)
-
-Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.
-
----------------------------------------
-
-
-### forever(fn, errback)
-
-Calls the asynchronous function `fn` with a callback parameter that allows it to
-call itself again, in series, indefinitely.
-
-If an error is passed to the callback then `errback` is called with the
-error, and execution stops, otherwise it will never be called.
-
-```js
-async.forever(
- function(next) {
- // next is suitable for passing to things that need a callback(err [, whatever]);
- // it will result in this function being called again.
- },
- function(err) {
- // if next is called with a value in its first parameter, it will appear
- // in here as 'err', and execution will stop.
- }
-);
-```
-
----------------------------------------
-
-
-### waterfall(tasks, [callback])
-
-Runs the `tasks` array of functions in series, each passing their results to the next in
-the array. However, if any of the `tasks` pass an error to their own callback, the
-next function is not executed, and the main `callback` is immediately called with
-the error.
-
-__Arguments__
-
-* `tasks` - An array of functions to run, each function is passed a
- `callback(err, result1, result2, ...)` it must call on completion. The first
- argument is an error (which can be `null`) and any further arguments will be
- passed as arguments in order to the next task.
-* `callback(err, [results])` - An optional callback to run once all the functions
- have completed. This will be passed the results of the last task's callback.
-
-
-
-__Example__
-
-```js
-async.waterfall([
- function(callback){
- callback(null, 'one', 'two');
- },
- function(arg1, arg2, callback){
- // arg1 now equals 'one' and arg2 now equals 'two'
- callback(null, 'three');
- },
- function(arg1, callback){
- // arg1 now equals 'three'
- callback(null, 'done');
- }
-], function (err, result) {
- // result now equals 'done'
-});
-```
-
----------------------------------------
-
-### compose(fn1, fn2...)
-
-Creates a function which is a composition of the passed asynchronous
-functions. Each function consumes the return value of the function that
-follows. Composing functions `f()`, `g()`, and `h()` would produce the result of
-`f(g(h()))`, only this version uses callbacks to obtain the return values.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* `functions...` - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-function add1(n, callback) {
- setTimeout(function () {
- callback(null, n + 1);
- }, 10);
-}
-
-function mul3(n, callback) {
- setTimeout(function () {
- callback(null, n * 3);
- }, 10);
-}
-
-var add1mul3 = async.compose(mul3, add1);
-
-add1mul3(4, function (err, result) {
- // result now equals 15
-});
-```
-
----------------------------------------
-
-### seq(fn1, fn2...)
-
-Version of the compose function that is more natural to read.
-Each following function consumes the return value of the latter function.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* functions... - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-// Requires lodash (or underscore), express3 and dresende's orm2.
-// Part of an app, that fetches cats of the logged user.
-// This example uses `seq` function to avoid overnesting and error
-// handling clutter.
-app.get('/cats', function(request, response) {
- function handleError(err, data, callback) {
- if (err) {
- console.error(err);
- response.json({ status: 'error', message: err.message });
- }
- else {
- callback(data);
- }
- }
- var User = request.models.User;
- async.seq(
- _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
- handleError,
- function(user, fn) {
- user.getCats(fn); // 'getCats' has signature (callback(err, data))
- },
- handleError,
- function(cats) {
- response.json({ status: 'ok', message: 'Cats found', data: cats });
- }
- )(req.session.user_id);
- }
-});
-```
-
----------------------------------------
-
-### applyEach(fns, args..., callback)
-
-Applies the provided arguments to each function in the array, calling
-`callback` after all functions have completed. If you only provide the first
-argument, then it will return a function which lets you pass in the
-arguments as if it were a single function call.
-
-__Arguments__
-
-* `fns` - the asynchronous functions to all call with the same arguments
-* `args...` - any number of separate arguments to pass to the function
-* `callback` - the final argument should be the callback, called when all
- functions have completed processing
-
-
-__Example__
-
-```js
-async.applyEach([enableSearch, updateSchema], 'bucket', callback);
-
-// partial application example:
-async.each(
- buckets,
- async.applyEach([enableSearch, updateSchema]),
- callback
-);
-```
-
----------------------------------------
-
-
-### applyEachSeries(arr, iterator, callback)
-
-The same as [`applyEach`](#applyEach) only the functions are applied in series.
-
----------------------------------------
-
-
-### queue(worker, concurrency)
-
-Creates a `queue` object with the specified `concurrency`. Tasks added to the
-`queue` are processed in parallel (up to the `concurrency` limit). If all
-`worker`s are in progress, the task is queued until one becomes available.
-Once a `worker` completes a `task`, that `task`'s callback is called.
-
-__Arguments__
-
-* `worker(task, callback)` - An asynchronous function for processing a queued
- task, which must call its `callback(err)` argument when finished, with an
- optional `error` as an argument.
-* `concurrency` - An `integer` for determining how many `worker` functions should be
- run in parallel.
-
-__Queue objects__
-
-The `queue` object returned by this function has the following properties and
-methods:
-
-* `length()` - a function returning the number of items waiting to be processed.
-* `started` - a function returning whether or not any items have been pushed and processed by the queue
-* `running()` - a function returning the number of items currently being processed.
-* `idle()` - a function returning false if there are items waiting or being processed, or true if not.
-* `concurrency` - an integer for determining how many `worker` functions should be
- run in parallel. This property can be changed after a `queue` is created to
- alter the concurrency on-the-fly.
-* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once
- the `worker` has finished processing the task. Instead of a single task, a `tasks` array
- can be submitted. The respective callback is used for every task in the list.
-* `unshift(task, [callback])` - add a new task to the front of the `queue`.
-* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,
- and further tasks will be queued.
-* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.
-* `paused` - a boolean for determining whether the queue is in a paused state
-* `pause()` - a function that pauses the processing of tasks until `resume()` is called.
-* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.
-* `kill()` - a function that empties remaining tasks from the queue forcing it to go idle.
-
-__Example__
-
-```js
-// create a queue object with concurrency 2
-
-var q = async.queue(function (task, callback) {
- console.log('hello ' + task.name);
- callback();
-}, 2);
-
-
-// assign a callback
-q.drain = function() {
- console.log('all items have been processed');
-}
-
-// add some items to the queue
-
-q.push({name: 'foo'}, function (err) {
- console.log('finished processing foo');
-});
-q.push({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-
-// add some items to the queue (batch-wise)
-
-q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
- console.log('finished processing bar');
-});
-
-// add some items to the front of the queue
-
-q.unshift({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-```
-
-
----------------------------------------
-
-
-### priorityQueue(worker, concurrency)
-
-The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:
-
-* `push(task, priority, [callback])` - `priority` should be a number. If an array of
- `tasks` is given, all tasks will be assigned the same priority.
-* The `unshift` method was removed.
-
----------------------------------------
-
-
-### cargo(worker, [payload])
-
-Creates a `cargo` object with the specified payload. Tasks added to the
-cargo will be processed altogether (up to the `payload` limit). If the
-`worker` is in progress, the task is queued until it becomes available. Once
-the `worker` has completed some tasks, each callback of those tasks is called.
-Check out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work.
-
-While [queue](#queue) passes only one task to one of a group of workers
-at a time, cargo passes an array of tasks to a single worker, repeating
-when the worker is finished.
-
-__Arguments__
-
-* `worker(tasks, callback)` - An asynchronous function for processing an array of
- queued tasks, which must call its `callback(err)` argument when finished, with
- an optional `err` argument.
-* `payload` - An optional `integer` for determining how many tasks should be
- processed per round; if omitted, the default is unlimited.
-
-__Cargo objects__
-
-The `cargo` object returned by this function has the following properties and
-methods:
-
-* `length()` - A function returning the number of items waiting to be processed.
-* `payload` - An `integer` for determining how many tasks should be
- process per round. This property can be changed after a `cargo` is created to
- alter the payload on-the-fly.
-* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called
- once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`
- can be submitted. The respective callback is used for every task in the list.
-* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.
-* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.
-
-__Example__
-
-```js
-// create a cargo object with payload 2
-
-var cargo = async.cargo(function (tasks, callback) {
- for(var i=0; i
-### auto(tasks, [callback])
-
-Determines the best order for running the functions in `tasks`, based on their
-requirements. Each function can optionally depend on other functions being completed
-first, and each function is run as soon as its requirements are satisfied.
-
-If any of the functions pass an error to their callback, it will not
-complete (so any other functions depending on it will not run), and the main
-`callback` is immediately called with the error. Functions also receive an
-object containing the results of functions which have completed so far.
-
-Note, all functions are called with a `results` object as a second argument,
-so it is unsafe to pass functions in the `tasks` object which cannot handle the
-extra argument.
-
-For example, this snippet of code:
-
-```js
-async.auto({
- readData: async.apply(fs.readFile, 'data.txt', 'utf-8')
-}, callback);
-```
-
-will have the effect of calling `readFile` with the results object as the last
-argument, which will fail:
-
-```js
-fs.readFile('data.txt', 'utf-8', cb, {});
-```
-
-Instead, wrap the call to `readFile` in a function which does not forward the
-`results` object:
-
-```js
-async.auto({
- readData: function(cb, results){
- fs.readFile('data.txt', 'utf-8', cb);
- }
-}, callback);
-```
-
-__Arguments__
-
-* `tasks` - An object. Each of its properties is either a function or an array of
- requirements, with the function itself the last item in the array. The object's key
- of a property serves as the name of the task defined by that property,
- i.e. can be used when specifying requirements for other tasks.
- The function receives two arguments: (1) a `callback(err, result)` which must be
- called when finished, passing an `error` (which can be `null`) and the result of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions.
-* `callback(err, results)` - An optional callback which is called when all the
- tasks have been completed. It receives the `err` argument if any `tasks`
- pass an error to their callback. Results are always returned; however, if
- an error occurs, no further `tasks` will be performed, and the results
- object will only contain partial results.
-
-
-__Example__
-
-```js
-async.auto({
- get_data: function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- make_folder: function(callback){
- console.log('in make_folder');
- // async code to create a directory to store a file in
- // this is run at the same time as getting the data
- callback(null, 'folder');
- },
- write_file: ['get_data', 'make_folder', function(callback, results){
- console.log('in write_file', JSON.stringify(results));
- // once there is some data and the directory exists,
- // write the data to a file in the directory
- callback(null, 'filename');
- }],
- email_link: ['write_file', function(callback, results){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- // results.write_file contains the filename returned by write_file.
- callback(null, {'file':results.write_file, 'email':'user@example.com'});
- }]
-}, function(err, results) {
- console.log('err = ', err);
- console.log('results = ', results);
-});
-```
-
-This is a fairly trivial example, but to do this using the basic parallel and
-series functions would look like this:
-
-```js
-async.parallel([
- function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- function(callback){
- console.log('in make_folder');
- // async code to create a directory to store a file in
- // this is run at the same time as getting the data
- callback(null, 'folder');
- }
-],
-function(err, results){
- async.series([
- function(callback){
- console.log('in write_file', JSON.stringify(results));
- // once there is some data and the directory exists,
- // write the data to a file in the directory
- results.push('filename');
- callback(null);
- },
- function(callback){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- callback(null, {'file':results.pop(), 'email':'user@example.com'});
- }
- ]);
-});
-```
-
-For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding
-new tasks much easier (and the code more readable).
-
-
----------------------------------------
-
-
-### retry([times = 5], task, [callback])
-
-Attempts to get a successful response from `task` no more than `times` times before
-returning an error. If the task is successful, the `callback` will be passed the result
-of the successfull task. If all attemps fail, the callback will be passed the error and
-result (if any) of the final attempt.
-
-__Arguments__
-
-* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5.
-* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
- which must be called when finished, passing `err` (which can be `null`) and the `result` of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions (if nested inside another control flow).
-* `callback(err, results)` - An optional callback which is called when the
- task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.
-
-The [`retry`](#retry) function can be used as a stand-alone control flow by passing a
-callback, as shown below:
-
-```js
-async.retry(3, apiMethod, function(err, result) {
- // do something with the result
-});
-```
-
-It can also be embeded within other control flow functions to retry individual methods
-that are not as reliable, like this:
-
-```js
-async.auto({
- users: api.getUsers.bind(api),
- payments: async.retry(3, api.getPayments.bind(api))
-}, function(err, results) {
- // do something with the results
-});
-```
-
-
----------------------------------------
-
-
-### iterator(tasks)
-
-Creates an iterator function which calls the next function in the `tasks` array,
-returning a continuation to call the next one after that. It's also possible to
-“peek” at the next iterator with `iterator.next()`.
-
-This function is used internally by the `async` module, but can be useful when
-you want to manually control the flow of functions in series.
-
-__Arguments__
-
-* `tasks` - An array of functions to run.
-
-__Example__
-
-```js
-var iterator = async.iterator([
- function(){ sys.p('one'); },
- function(){ sys.p('two'); },
- function(){ sys.p('three'); }
-]);
-
-node> var iterator2 = iterator();
-'one'
-node> var iterator3 = iterator2();
-'two'
-node> iterator3();
-'three'
-node> var nextfn = iterator2.next();
-node> nextfn();
-'three'
-```
-
----------------------------------------
-
-
-### apply(function, arguments..)
-
-Creates a continuation function with some arguments already applied.
-
-Useful as a shorthand when combined with other control flow functions. Any arguments
-passed to the returned function are added to the arguments originally passed
-to apply.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to automatically apply when the
- continuation is called.
-
-__Example__
-
-```js
-// using apply
-
-async.parallel([
- async.apply(fs.writeFile, 'testfile1', 'test1'),
- async.apply(fs.writeFile, 'testfile2', 'test2'),
-]);
-
-
-// the same process without using apply
-
-async.parallel([
- function(callback){
- fs.writeFile('testfile1', 'test1', callback);
- },
- function(callback){
- fs.writeFile('testfile2', 'test2', callback);
- }
-]);
-```
-
-It's possible to pass any number of additional arguments when calling the
-continuation:
-
-```js
-node> var fn = async.apply(sys.puts, 'one');
-node> fn('two', 'three');
-one
-two
-three
-```
-
----------------------------------------
-
-
-### nextTick(callback)
-
-Calls `callback` on a later loop around the event loop. In Node.js this just
-calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
-if available, otherwise `setTimeout(callback, 0)`, which means other higher priority
-events may precede the execution of `callback`.
-
-This is used internally for browser-compatibility purposes.
-
-__Arguments__
-
-* `callback` - The function to call on a later loop around the event loop.
-
-__Example__
-
-```js
-var call_order = [];
-async.nextTick(function(){
- call_order.push('two');
- // call_order now equals ['one','two']
-});
-call_order.push('one')
-```
-
-
-### times(n, callback)
-
-Calls the `callback` function `n` times, and accumulates results in the same manner
-you would use with [`map`](#map).
-
-__Arguments__
-
-* `n` - The number of times to run the function.
-* `callback` - The function to call `n` times.
-
-__Example__
-
-```js
-// Pretend this is some complicated async factory
-var createUser = function(id, callback) {
- callback(null, {
- id: 'user' + id
- })
-}
-// generate 5 users
-async.times(5, function(n, next){
- createUser(n, function(err, user) {
- next(err, user)
- })
-}, function(err, users) {
- // we should now have 5 users
-});
-```
-
-
-### timesSeries(n, callback)
-
-The same as [`times`](#times), only the iterator is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
-
-## Utils
-
-
-### memoize(fn, [hasher])
-
-Caches the results of an `async` function. When creating a hash to store function
-results against, the callback is omitted from the hash and an optional hash
-function can be used.
-
-The cache of results is exposed as the `memo` property of the function returned
-by `memoize`.
-
-__Arguments__
-
-* `fn` - The function to proxy and cache results from.
-* `hasher` - Tn optional function for generating a custom hash for storing
- results. It has all the arguments applied to it apart from the callback, and
- must be synchronous.
-
-__Example__
-
-```js
-var slow_fn = function (name, callback) {
- // do something
- callback(null, result);
-};
-var fn = async.memoize(slow_fn);
-
-// fn can now be used as if it were slow_fn
-fn('some name', function () {
- // callback
-});
-```
-
-
-### unmemoize(fn)
-
-Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized
-form. Handy for testing.
-
-__Arguments__
-
-* `fn` - the memoized function
-
-
-### log(function, arguments)
-
-Logs the result of an `async` function to the `console`. Only works in Node.js or
-in browsers that support `console.log` and `console.error` (such as FF and Chrome).
-If multiple arguments are returned from the async function, `console.log` is
-called on each argument in order.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, 'hello ' + name);
- }, 1000);
-};
-```
-```js
-node> async.log(hello, 'world');
-'hello world'
-```
-
----------------------------------------
-
-
-### dir(function, arguments)
-
-Logs the result of an `async` function to the `console` using `console.dir` to
-display the properties of the resulting object. Only works in Node.js or
-in browsers that support `console.dir` and `console.error` (such as FF and Chrome).
-If multiple arguments are returned from the async function, `console.dir` is
-called on each argument in order.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, {hello: name});
- }, 1000);
-};
-```
-```js
-node> async.dir(hello, 'world');
-{hello: 'world'}
-```
-
----------------------------------------
-
-
-### noConflict()
-
-Changes the value of `async` back to its original value, returning a reference to the
-`async` object.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/component.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/async/component.json
deleted file mode 100644
index bbb0115..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/component.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "async",
- "repo": "caolan/async",
- "description": "Higher-order functions and common patterns for asynchronous code",
- "version": "0.1.23",
- "keywords": [],
- "dependencies": {},
- "development": {},
- "main": "lib/async.js",
- "scripts": [ "lib/async.js" ]
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/lib/async.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/async/lib/async.js
deleted file mode 100755
index 01e8afc..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/async/lib/async.js
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*!
- * async
- * https://github.com/caolan/async
- *
- * Copyright 2010-2014 Caolan McMahon
- * Released under the MIT license
- */
-/*jshint onevar: false, indent:4 */
-/*global setImmediate: false, setTimeout: false, console: false */
-(function () {
-
- var async = {};
-
- // global on the server, window in the browser
- var root, previous_async;
-
- root = this;
- if (root != null) {
- previous_async = root.async;
- }
-
- async.noConflict = function () {
- root.async = previous_async;
- return async;
- };
-
- function only_once(fn) {
- var called = false;
- return function() {
- if (called) throw new Error("Callback was already called.");
- called = true;
- fn.apply(root, arguments);
- }
- }
-
- //// cross-browser compatiblity functions ////
-
- var _toString = Object.prototype.toString;
-
- var _isArray = Array.isArray || function (obj) {
- return _toString.call(obj) === '[object Array]';
- };
-
- var _each = function (arr, iterator) {
- if (arr.forEach) {
- return arr.forEach(iterator);
- }
- for (var i = 0; i < arr.length; i += 1) {
- iterator(arr[i], i, arr);
- }
- };
-
- var _map = function (arr, iterator) {
- if (arr.map) {
- return arr.map(iterator);
- }
- var results = [];
- _each(arr, function (x, i, a) {
- results.push(iterator(x, i, a));
- });
- return results;
- };
-
- var _reduce = function (arr, iterator, memo) {
- if (arr.reduce) {
- return arr.reduce(iterator, memo);
- }
- _each(arr, function (x, i, a) {
- memo = iterator(memo, x, i, a);
- });
- return memo;
- };
-
- var _keys = function (obj) {
- if (Object.keys) {
- return Object.keys(obj);
- }
- var keys = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- return keys;
- };
-
- //// exported async module functions ////
-
- //// nextTick implementation with browser-compatible fallback ////
- if (typeof process === 'undefined' || !(process.nextTick)) {
- if (typeof setImmediate === 'function') {
- async.nextTick = function (fn) {
- // not a direct alias for IE10 compatibility
- setImmediate(fn);
- };
- async.setImmediate = async.nextTick;
- }
- else {
- async.nextTick = function (fn) {
- setTimeout(fn, 0);
- };
- async.setImmediate = async.nextTick;
- }
- }
- else {
- async.nextTick = process.nextTick;
- if (typeof setImmediate !== 'undefined') {
- async.setImmediate = function (fn) {
- // not a direct alias for IE10 compatibility
- setImmediate(fn);
- };
- }
- else {
- async.setImmediate = async.nextTick;
- }
- }
-
- async.each = function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length) {
- return callback();
- }
- var completed = 0;
- _each(arr, function (x) {
- iterator(x, only_once(done) );
- });
- function done(err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- if (completed >= arr.length) {
- callback();
- }
- }
- }
- };
- async.forEach = async.each;
-
- async.eachSeries = function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length) {
- return callback();
- }
- var completed = 0;
- var iterate = function () {
- iterator(arr[completed], function (err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- if (completed >= arr.length) {
- callback();
- }
- else {
- iterate();
- }
- }
- });
- };
- iterate();
- };
- async.forEachSeries = async.eachSeries;
-
- async.eachLimit = function (arr, limit, iterator, callback) {
- var fn = _eachLimit(limit);
- fn.apply(null, [arr, iterator, callback]);
- };
- async.forEachLimit = async.eachLimit;
-
- var _eachLimit = function (limit) {
-
- return function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length || limit <= 0) {
- return callback();
- }
- var completed = 0;
- var started = 0;
- var running = 0;
-
- (function replenish () {
- if (completed >= arr.length) {
- return callback();
- }
-
- while (running < limit && started < arr.length) {
- started += 1;
- running += 1;
- iterator(arr[started - 1], function (err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- running -= 1;
- if (completed >= arr.length) {
- callback();
- }
- else {
- replenish();
- }
- }
- });
- }
- })();
- };
- };
-
-
- var doParallel = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [async.each].concat(args));
- };
- };
- var doParallelLimit = function(limit, fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [_eachLimit(limit)].concat(args));
- };
- };
- var doSeries = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [async.eachSeries].concat(args));
- };
- };
-
-
- var _asyncMap = function (eachfn, arr, iterator, callback) {
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- if (!callback) {
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (err) {
- callback(err);
- });
- });
- } else {
- var results = [];
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (err, v) {
- results[x.index] = v;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
- async.map = doParallel(_asyncMap);
- async.mapSeries = doSeries(_asyncMap);
- async.mapLimit = function (arr, limit, iterator, callback) {
- return _mapLimit(limit)(arr, iterator, callback);
- };
-
- var _mapLimit = function(limit) {
- return doParallelLimit(limit, _asyncMap);
- };
-
- // reduce only has a series version, as doing reduce in parallel won't
- // work in many situations.
- async.reduce = function (arr, memo, iterator, callback) {
- async.eachSeries(arr, function (x, callback) {
- iterator(memo, x, function (err, v) {
- memo = v;
- callback(err);
- });
- }, function (err) {
- callback(err, memo);
- });
- };
- // inject alias
- async.inject = async.reduce;
- // foldl alias
- async.foldl = async.reduce;
-
- async.reduceRight = function (arr, memo, iterator, callback) {
- var reversed = _map(arr, function (x) {
- return x;
- }).reverse();
- async.reduce(reversed, memo, iterator, callback);
- };
- // foldr alias
- async.foldr = async.reduceRight;
-
- var _filter = function (eachfn, arr, iterator, callback) {
- var results = [];
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (v) {
- if (v) {
- results.push(x);
- }
- callback();
- });
- }, function (err) {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- };
- async.filter = doParallel(_filter);
- async.filterSeries = doSeries(_filter);
- // select alias
- async.select = async.filter;
- async.selectSeries = async.filterSeries;
-
- var _reject = function (eachfn, arr, iterator, callback) {
- var results = [];
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (v) {
- if (!v) {
- results.push(x);
- }
- callback();
- });
- }, function (err) {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- };
- async.reject = doParallel(_reject);
- async.rejectSeries = doSeries(_reject);
-
- var _detect = function (eachfn, arr, iterator, main_callback) {
- eachfn(arr, function (x, callback) {
- iterator(x, function (result) {
- if (result) {
- main_callback(x);
- main_callback = function () {};
- }
- else {
- callback();
- }
- });
- }, function (err) {
- main_callback();
- });
- };
- async.detect = doParallel(_detect);
- async.detectSeries = doSeries(_detect);
-
- async.some = function (arr, iterator, main_callback) {
- async.each(arr, function (x, callback) {
- iterator(x, function (v) {
- if (v) {
- main_callback(true);
- main_callback = function () {};
- }
- callback();
- });
- }, function (err) {
- main_callback(false);
- });
- };
- // any alias
- async.any = async.some;
-
- async.every = function (arr, iterator, main_callback) {
- async.each(arr, function (x, callback) {
- iterator(x, function (v) {
- if (!v) {
- main_callback(false);
- main_callback = function () {};
- }
- callback();
- });
- }, function (err) {
- main_callback(true);
- });
- };
- // all alias
- async.all = async.every;
-
- async.sortBy = function (arr, iterator, callback) {
- async.map(arr, function (x, callback) {
- iterator(x, function (err, criteria) {
- if (err) {
- callback(err);
- }
- else {
- callback(null, {value: x, criteria: criteria});
- }
- });
- }, function (err, results) {
- if (err) {
- return callback(err);
- }
- else {
- var fn = function (left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- };
- callback(null, _map(results.sort(fn), function (x) {
- return x.value;
- }));
- }
- });
- };
-
- async.auto = function (tasks, callback) {
- callback = callback || function () {};
- var keys = _keys(tasks);
- var remainingTasks = keys.length
- if (!remainingTasks) {
- return callback();
- }
-
- var results = {};
-
- var listeners = [];
- var addListener = function (fn) {
- listeners.unshift(fn);
- };
- var removeListener = function (fn) {
- for (var i = 0; i < listeners.length; i += 1) {
- if (listeners[i] === fn) {
- listeners.splice(i, 1);
- return;
- }
- }
- };
- var taskComplete = function () {
- remainingTasks--
- _each(listeners.slice(0), function (fn) {
- fn();
- });
- };
-
- addListener(function () {
- if (!remainingTasks) {
- var theCallback = callback;
- // prevent final callback from calling itself if it errors
- callback = function () {};
-
- theCallback(null, results);
- }
- });
-
- _each(keys, function (k) {
- var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
- var taskCallback = function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- if (err) {
- var safeResults = {};
- _each(_keys(results), function(rkey) {
- safeResults[rkey] = results[rkey];
- });
- safeResults[k] = args;
- callback(err, safeResults);
- // stop subsequent errors hitting callback multiple times
- callback = function () {};
- }
- else {
- results[k] = args;
- async.setImmediate(taskComplete);
- }
- };
- var requires = task.slice(0, Math.abs(task.length - 1)) || [];
- var ready = function () {
- return _reduce(requires, function (a, x) {
- return (a && results.hasOwnProperty(x));
- }, true) && !results.hasOwnProperty(k);
- };
- if (ready()) {
- task[task.length - 1](taskCallback, results);
- }
- else {
- var listener = function () {
- if (ready()) {
- removeListener(listener);
- task[task.length - 1](taskCallback, results);
- }
- };
- addListener(listener);
- }
- });
- };
-
- async.retry = function(times, task, callback) {
- var DEFAULT_TIMES = 5;
- var attempts = [];
- // Use defaults if times not passed
- if (typeof times === 'function') {
- callback = task;
- task = times;
- times = DEFAULT_TIMES;
- }
- // Make sure times is a number
- times = parseInt(times, 10) || DEFAULT_TIMES;
- var wrappedTask = function(wrappedCallback, wrappedResults) {
- var retryAttempt = function(task, finalAttempt) {
- return function(seriesCallback) {
- task(function(err, result){
- seriesCallback(!err || finalAttempt, {err: err, result: result});
- }, wrappedResults);
- };
- };
- while (times) {
- attempts.push(retryAttempt(task, !(times-=1)));
- }
- async.series(attempts, function(done, data){
- data = data[data.length - 1];
- (wrappedCallback || callback)(data.err, data.result);
- });
- }
- // If a callback is passed, run this as a controll flow
- return callback ? wrappedTask() : wrappedTask
- };
-
- async.waterfall = function (tasks, callback) {
- callback = callback || function () {};
- if (!_isArray(tasks)) {
- var err = new Error('First argument to waterfall must be an array of functions');
- return callback(err);
- }
- if (!tasks.length) {
- return callback();
- }
- var wrapIterator = function (iterator) {
- return function (err) {
- if (err) {
- callback.apply(null, arguments);
- callback = function () {};
- }
- else {
- var args = Array.prototype.slice.call(arguments, 1);
- var next = iterator.next();
- if (next) {
- args.push(wrapIterator(next));
- }
- else {
- args.push(callback);
- }
- async.setImmediate(function () {
- iterator.apply(null, args);
- });
- }
- };
- };
- wrapIterator(async.iterator(tasks))();
- };
-
- var _parallel = function(eachfn, tasks, callback) {
- callback = callback || function () {};
- if (_isArray(tasks)) {
- eachfn.map(tasks, function (fn, callback) {
- if (fn) {
- fn(function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- callback.call(null, err, args);
- });
- }
- }, callback);
- }
- else {
- var results = {};
- eachfn.each(_keys(tasks), function (k, callback) {
- tasks[k](function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- results[k] = args;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
-
- async.parallel = function (tasks, callback) {
- _parallel({ map: async.map, each: async.each }, tasks, callback);
- };
-
- async.parallelLimit = function(tasks, limit, callback) {
- _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
- };
-
- async.series = function (tasks, callback) {
- callback = callback || function () {};
- if (_isArray(tasks)) {
- async.mapSeries(tasks, function (fn, callback) {
- if (fn) {
- fn(function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- callback.call(null, err, args);
- });
- }
- }, callback);
- }
- else {
- var results = {};
- async.eachSeries(_keys(tasks), function (k, callback) {
- tasks[k](function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- results[k] = args;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
-
- async.iterator = function (tasks) {
- var makeCallback = function (index) {
- var fn = function () {
- if (tasks.length) {
- tasks[index].apply(null, arguments);
- }
- return fn.next();
- };
- fn.next = function () {
- return (index < tasks.length - 1) ? makeCallback(index + 1): null;
- };
- return fn;
- };
- return makeCallback(0);
- };
-
- async.apply = function (fn) {
- var args = Array.prototype.slice.call(arguments, 1);
- return function () {
- return fn.apply(
- null, args.concat(Array.prototype.slice.call(arguments))
- );
- };
- };
-
- var _concat = function (eachfn, arr, fn, callback) {
- var r = [];
- eachfn(arr, function (x, cb) {
- fn(x, function (err, y) {
- r = r.concat(y || []);
- cb(err);
- });
- }, function (err) {
- callback(err, r);
- });
- };
- async.concat = doParallel(_concat);
- async.concatSeries = doSeries(_concat);
-
- async.whilst = function (test, iterator, callback) {
- if (test()) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- async.whilst(test, iterator, callback);
- });
- }
- else {
- callback();
- }
- };
-
- async.doWhilst = function (iterator, test, callback) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- var args = Array.prototype.slice.call(arguments, 1);
- if (test.apply(null, args)) {
- async.doWhilst(iterator, test, callback);
- }
- else {
- callback();
- }
- });
- };
-
- async.until = function (test, iterator, callback) {
- if (!test()) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- async.until(test, iterator, callback);
- });
- }
- else {
- callback();
- }
- };
-
- async.doUntil = function (iterator, test, callback) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- var args = Array.prototype.slice.call(arguments, 1);
- if (!test.apply(null, args)) {
- async.doUntil(iterator, test, callback);
- }
- else {
- callback();
- }
- });
- };
-
- async.queue = function (worker, concurrency) {
- if (concurrency === undefined) {
- concurrency = 1;
- }
- function _insert(q, data, pos, callback) {
- if (!q.started){
- q.started = true;
- }
- if (!_isArray(data)) {
- data = [data];
- }
- if(data.length == 0) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- if (q.drain) {
- q.drain();
- }
- });
- }
- _each(data, function(task) {
- var item = {
- data: task,
- callback: typeof callback === 'function' ? callback : null
- };
-
- if (pos) {
- q.tasks.unshift(item);
- } else {
- q.tasks.push(item);
- }
-
- if (q.saturated && q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- var workers = 0;
- var q = {
- tasks: [],
- concurrency: concurrency,
- saturated: null,
- empty: null,
- drain: null,
- started: false,
- paused: false,
- push: function (data, callback) {
- _insert(q, data, false, callback);
- },
- kill: function () {
- q.drain = null;
- q.tasks = [];
- },
- unshift: function (data, callback) {
- _insert(q, data, true, callback);
- },
- process: function () {
- if (!q.paused && workers < q.concurrency && q.tasks.length) {
- var task = q.tasks.shift();
- if (q.empty && q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- var next = function () {
- workers -= 1;
- if (task.callback) {
- task.callback.apply(task, arguments);
- }
- if (q.drain && q.tasks.length + workers === 0) {
- q.drain();
- }
- q.process();
- };
- var cb = only_once(next);
- worker(task.data, cb);
- }
- },
- length: function () {
- return q.tasks.length;
- },
- running: function () {
- return workers;
- },
- idle: function() {
- return q.tasks.length + workers === 0;
- },
- pause: function () {
- if (q.paused === true) { return; }
- q.paused = true;
- q.process();
- },
- resume: function () {
- if (q.paused === false) { return; }
- q.paused = false;
- q.process();
- }
- };
- return q;
- };
-
- async.priorityQueue = function (worker, concurrency) {
-
- function _compareTasks(a, b){
- return a.priority - b.priority;
- };
-
- function _binarySearch(sequence, item, compare) {
- var beg = -1,
- end = sequence.length - 1;
- while (beg < end) {
- var mid = beg + ((end - beg + 1) >>> 1);
- if (compare(item, sequence[mid]) >= 0) {
- beg = mid;
- } else {
- end = mid - 1;
- }
- }
- return beg;
- }
-
- function _insert(q, data, priority, callback) {
- if (!q.started){
- q.started = true;
- }
- if (!_isArray(data)) {
- data = [data];
- }
- if(data.length == 0) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- if (q.drain) {
- q.drain();
- }
- });
- }
- _each(data, function(task) {
- var item = {
- data: task,
- priority: priority,
- callback: typeof callback === 'function' ? callback : null
- };
-
- q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
-
- if (q.saturated && q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- // Start with a normal queue
- var q = async.queue(worker, concurrency);
-
- // Override push to accept second parameter representing priority
- q.push = function (data, priority, callback) {
- _insert(q, data, priority, callback);
- };
-
- // Remove unshift function
- delete q.unshift;
-
- return q;
- };
-
- async.cargo = function (worker, payload) {
- var working = false,
- tasks = [];
-
- var cargo = {
- tasks: tasks,
- payload: payload,
- saturated: null,
- empty: null,
- drain: null,
- drained: true,
- push: function (data, callback) {
- if (!_isArray(data)) {
- data = [data];
- }
- _each(data, function(task) {
- tasks.push({
- data: task,
- callback: typeof callback === 'function' ? callback : null
- });
- cargo.drained = false;
- if (cargo.saturated && tasks.length === payload) {
- cargo.saturated();
- }
- });
- async.setImmediate(cargo.process);
- },
- process: function process() {
- if (working) return;
- if (tasks.length === 0) {
- if(cargo.drain && !cargo.drained) cargo.drain();
- cargo.drained = true;
- return;
- }
-
- var ts = typeof payload === 'number'
- ? tasks.splice(0, payload)
- : tasks.splice(0, tasks.length);
-
- var ds = _map(ts, function (task) {
- return task.data;
- });
-
- if(cargo.empty) cargo.empty();
- working = true;
- worker(ds, function () {
- working = false;
-
- var args = arguments;
- _each(ts, function (data) {
- if (data.callback) {
- data.callback.apply(null, args);
- }
- });
-
- process();
- });
- },
- length: function () {
- return tasks.length;
- },
- running: function () {
- return working;
- }
- };
- return cargo;
- };
-
- var _console_fn = function (name) {
- return function (fn) {
- var args = Array.prototype.slice.call(arguments, 1);
- fn.apply(null, args.concat([function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (typeof console !== 'undefined') {
- if (err) {
- if (console.error) {
- console.error(err);
- }
- }
- else if (console[name]) {
- _each(args, function (x) {
- console[name](x);
- });
- }
- }
- }]));
- };
- };
- async.log = _console_fn('log');
- async.dir = _console_fn('dir');
- /*async.info = _console_fn('info');
- async.warn = _console_fn('warn');
- async.error = _console_fn('error');*/
-
- async.memoize = function (fn, hasher) {
- var memo = {};
- var queues = {};
- hasher = hasher || function (x) {
- return x;
- };
- var memoized = function () {
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- var key = hasher.apply(null, args);
- if (key in memo) {
- async.nextTick(function () {
- callback.apply(null, memo[key]);
- });
- }
- else if (key in queues) {
- queues[key].push(callback);
- }
- else {
- queues[key] = [callback];
- fn.apply(null, args.concat([function () {
- memo[key] = arguments;
- var q = queues[key];
- delete queues[key];
- for (var i = 0, l = q.length; i < l; i++) {
- q[i].apply(null, arguments);
- }
- }]));
- }
- };
- memoized.memo = memo;
- memoized.unmemoized = fn;
- return memoized;
- };
-
- async.unmemoize = function (fn) {
- return function () {
- return (fn.unmemoized || fn).apply(null, arguments);
- };
- };
-
- async.times = function (count, iterator, callback) {
- var counter = [];
- for (var i = 0; i < count; i++) {
- counter.push(i);
- }
- return async.map(counter, iterator, callback);
- };
-
- async.timesSeries = function (count, iterator, callback) {
- var counter = [];
- for (var i = 0; i < count; i++) {
- counter.push(i);
- }
- return async.mapSeries(counter, iterator, callback);
- };
-
- async.seq = function (/* functions... */) {
- var fns = arguments;
- return function () {
- var that = this;
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- async.reduce(fns, args, function (newargs, fn, cb) {
- fn.apply(that, newargs.concat([function () {
- var err = arguments[0];
- var nextargs = Array.prototype.slice.call(arguments, 1);
- cb(err, nextargs);
- }]))
- },
- function (err, results) {
- callback.apply(that, [err].concat(results));
- });
- };
- };
-
- async.compose = function (/* functions... */) {
- return async.seq.apply(null, Array.prototype.reverse.call(arguments));
- };
-
- var _applyEach = function (eachfn, fns /*args...*/) {
- var go = function () {
- var that = this;
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- return eachfn(fns, function (fn, cb) {
- fn.apply(that, args.concat([cb]));
- },
- callback);
- };
- if (arguments.length > 2) {
- var args = Array.prototype.slice.call(arguments, 2);
- return go.apply(this, args);
- }
- else {
- return go;
- }
- };
- async.applyEach = doParallel(_applyEach);
- async.applyEachSeries = doSeries(_applyEach);
-
- async.forever = function (fn, callback) {
- function next(err) {
- if (err) {
- if (callback) {
- return callback(err);
- }
- throw err;
- }
- fn(next);
- }
- next();
- };
-
- // Node.js
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = async;
- }
- // AMD / RequireJS
- else if (typeof define !== 'undefined' && define.amd) {
- define([], function () {
- return async;
- });
- }
- // included directly via
-```
-
-In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):
-
-```js
-var he = require('he');
-```
-
-In [Rhino](http://www.mozilla.org/rhino/):
-
-```js
-load('he.js');
-```
-
-Using an AMD loader like [RequireJS](http://requirejs.org/):
-
-```js
-require(
- {
- 'paths': {
- 'he': 'path/to/he'
- }
- },
- ['he'],
- function(he) {
- console.log(he);
- }
-);
-```
-
-## API
-
-### `he.version`
-
-A string representing the semantic version number.
-
-### `he.encode(text, options)`
-
-This function takes a string of text and encodes (by default) any symbols that aren’t printable ASCII symbols and `&`, `<`, `>`, `"`, `'`, and `` ` ``, replacing them with character references.
-
-```js
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-As long as the input string contains [allowed code points](http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream) only, the return value of this function is always valid HTML. Any [(invalid) code points that cannot be represented using a character reference](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#table-charref-overrides) in the input are not encoded.
-
-```js
-he.encode('foo \0 bar');
-// → 'foo \0 bar'
-```
-
-The `options` object is optional. It recognizes the following properties:
-
-#### `useNamedReferences`
-
-The default value for the `useNamedReferences` option is `false`. This means that `encode()` will not use any named character references (e.g. `©`) in the output — hexadecimal escapes (e.g. `©`) will be used instead. Set it to `true` to enable the use of named references.
-
-**Note that if compatibility with older browsers is a concern, this option should remain disabled.**
-
-```js
-// Using the global default setting (defaults to `false`):
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// Passing an `options` object to `encode`, to explicitly disallow named references:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'useNamedReferences': false
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// Passing an `options` object to `encode`, to explicitly allow named references:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'useNamedReferences': true
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-#### `encodeEverything`
-
-The default value for the `encodeEverything` option is `false`. This means that `encode()` will not use any character references for printable ASCII symbols that don’t need escaping. Set it to `true` to encode every symbol in the input string. When set to `true`, this option takes precedence over `allowUnsafeSymbols` (i.e. setting the latter to `true` in such a case has no effect).
-
-```js
-// Using the global default setting (defaults to `false`):
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// Passing an `options` object to `encode`, to explicitly encode all symbols:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'encodeEverything': true
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-
-// This setting can be combined with the `useNamedReferences` option:
-he.encode('foo © bar ≠ baz 𝌆 qux', {
- 'encodeEverything': true,
- 'useNamedReferences': true
-});
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-#### `strict`
-
-The default value for the `strict` option is `false`. This means that `encode()` will encode any HTML text content you feed it, even if it contains any symbols that cause [parse errors](http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators.
-
-```js
-// Using the global default setting (defaults to `false`, i.e. error-tolerant mode):
-he.encode('\x01');
-// → ''
-
-// Passing an `options` object to `encode`, to explicitly enable error-tolerant mode:
-he.encode('\x01', {
- 'strict': false
-});
-// → ''
-
-// Passing an `options` object to `encode`, to explicitly enable strict mode:
-he.encode('\x01', {
- 'strict': true
-});
-// → Parse error
-```
-
-#### `allowUnsafeSymbols`
-
-The default value for the `allowUnsafeSymbols` option is `false`. This means that characters that are unsafe for use in HTML content (`&`, `<`, `>`, `"`, `'`, and `` ` ``) will be encoded. When set to `true`, only non-ASCII characters will be encoded. If the `encodeEverything` option is set to `true`, this option will be ignored.
-
-```js
-he.encode('foo © and & ampersand', {
- 'allowUnsafeSymbols': true
-});
-// → 'foo © and & ampersand'
-```
-
-#### Overriding default `encode` options globally
-
-The global default setting can be overridden by modifying the `he.encode.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting.
-
-```js
-// Read the global default setting:
-he.encode.options.useNamedReferences;
-// → `false` by default
-
-// Override the global default setting:
-he.encode.options.useNamedReferences = true;
-
-// Using the global default setting, which is now `true`:
-he.encode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-### `he.decode(html, options)`
-
-This function takes a string of HTML and decodes any named and numerical character references in it using [the algorithm described in section 12.2.4.69 of the HTML spec](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references).
-
-```js
-he.decode('foo © bar ≠ baz 𝌆 qux');
-// → 'foo © bar ≠ baz 𝌆 qux'
-```
-
-The `options` object is optional. It recognizes the following properties:
-
-#### `isAttributeValue`
-
-The default value for the `isAttributeValue` option is `false`. This means that `decode()` will decode the string as if it were used in [a text context in an HTML document](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#data-state). HTML has different rules for [parsing character references in attribute values](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#character-reference-in-attribute-value-state) — set this option to `true` to treat the input string as if it were used as an attribute value.
-
-```js
-// Using the global default setting (defaults to `false`, i.e. HTML text context):
-he.decode('foo&bar');
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly assume an HTML text context:
-he.decode('foo&bar', {
- 'isAttributeValue': false
-});
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly assume an HTML attribute value context:
-he.decode('foo&bar', {
- 'isAttributeValue': true
-});
-// → 'foo&bar'
-```
-
-#### `strict`
-
-The default value for the `strict` option is `false`. This means that `decode()` will decode any HTML text content you feed it, even if it contains any entities that cause [parse errors](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators.
-
-```js
-// Using the global default setting (defaults to `false`, i.e. error-tolerant mode):
-he.decode('foo&bar');
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly enable error-tolerant mode:
-he.decode('foo&bar', {
- 'strict': false
-});
-// → 'foo&bar'
-
-// Passing an `options` object to `decode`, to explicitly enable strict mode:
-he.decode('foo&bar', {
- 'strict': true
-});
-// → Parse error
-```
-
-#### Overriding default `decode` options globally
-
-The global default settings for the `decode` function can be overridden by modifying the `he.decode.options` object. This saves you from passing in an `options` object for every call to `decode` if you want to use a non-default setting.
-
-```js
-// Read the global default setting:
-he.decode.options.isAttributeValue;
-// → `false` by default
-
-// Override the global default setting:
-he.decode.options.isAttributeValue = true;
-
-// Using the global default setting, which is now `true`:
-he.decode('foo&bar');
-// → 'foo&bar'
-```
-
-### `he.escape(text)`
-
-This function takes a string of text and escapes it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, `'`, and `` ` ``.
-
-```js
-he.escape(' ');
-// → '<img src='x' onerror="prompt(1)">'
-```
-
-### `he.unescape(html, options)`
-
-`he.unescape` is an alias for `he.decode`. It takes a string of HTML and decodes any named and numerical character references in it.
-
-### Using the `he` binary
-
-To use the `he` binary in your shell, simply install _he_ globally using npm:
-
-```bash
-npm install -g he
-```
-
-After that you will be able to encode/decode HTML entities from the command line:
-
-```bash
-$ he --encode 'föo ♥ bår 𝌆 baz'
-föo ♥ bår 𝌆 baz
-
-$ he --encode --use-named-refs 'föo ♥ bår 𝌆 baz'
-föo ♥ bår 𝌆 baz
-
-$ he --decode 'föo ♥ bår 𝌆 baz'
-föo ♥ bår 𝌆 baz
-```
-
-Read a local text file, encode it for use in an HTML text context, and save the result to a new file:
-
-```bash
-$ he --encode < foo.txt > foo-escaped.html
-```
-
-Or do the same with an online text file:
-
-```bash
-$ curl -sL "http://git.io/HnfEaw" | he --encode > escaped.html
-```
-
-Or, the opposite — read a local file containing a snippet of HTML in a text context, decode it back to plain text, and save the result to a new file:
-
-```bash
-$ he --decode < foo-escaped.html > foo.txt
-```
-
-Or do the same with an online HTML snippet:
-
-```bash
-$ curl -sL "http://git.io/HnfEaw" | he --decode > decoded.txt
-```
-
-See `he --help` for the full list of options.
-
-## Support
-
-he has been tested in at least Chrome 27-29, Firefox 3-22, Safari 4-6, Opera 10-12, IE 6-10, Node.js v0.10.0, Narwhal 0.3.2, RingoJS 0.8-0.9, PhantomJS 1.9.0, and Rhino 1.7RC4.
-
-## Unit tests & code coverage
-
-After cloning this repository, run `npm install` to install the dependencies needed for he development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
-
-Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`.
-
-To generate the code coverage report, use `grunt cover`.
-
-## Acknowledgements
-
-Thanks to [Simon Pieters](http://simon.html5.org/) ([@zcorpan](https://twitter.com/zcorpan)) for the many suggestions.
-
-## Author
-
-| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|
-| [Mathias Bynens](https://mathiasbynens.be/) |
-
-## License
-
-_he_ is available under the [MIT](http://mths.be/mit) license.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/bin/he b/topics/01. Setup-NativeScript-environment/slides/node_modules/he/bin/he
deleted file mode 100755
index 234710c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/bin/he
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env node
-(function() {
-
- var fs = require('fs');
- var he = require('../he.js');
- var strings = process.argv.splice(2);
- var stdin = process.stdin;
- var data;
- var timeout;
- var action;
- var options = {};
- var log = console.log;
-
- var main = function() {
- var option = strings[0];
- var count = 0;
-
- if (/^(?:-h|--help|undefined)$/.test(option)) {
- log(
- 'he v%s - http://mths.be/he',
- he.version
- );
- log([
- '\nUsage:\n',
- '\the [--escape] string',
- '\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] string',
- '\the [--decode] [--attribute] [--strict] string',
- '\the [-v | --version]',
- '\the [-h | --help]',
- '\nExamples:\n',
- '\the --escape \\ ',
- '\techo \'© 𝌆\' | he --decode'
- ].join('\n'));
- return process.exit(1);
- }
-
- if (/^(?:-v|--version)$/.test(option)) {
- log('v%s', he.version);
- return process.exit(1);
- }
-
- strings.forEach(function(string) {
- // Process options
- if (string == '--escape') {
- action = 'escape';
- return;
- }
- if (string == '--encode') {
- action = 'encode';
- return;
- }
- if (string == '--use-named-refs') {
- action = 'encode';
- options.useNamedReferences = true;
- return;
- }
- if (string == '--everything') {
- action = 'encode';
- options.encodeEverything = true;
- return;
- }
- if (string == '--allow-unsafe') {
- action = 'encode';
- options.allowUnsafeSymbols = true;
- return;
- }
- if (string == '--decode') {
- action = 'decode';
- return;
- }
- if (string == '--attribute') {
- action = 'decode';
- options.isAttributeValue = true;
- return;
- }
- if (string == '--strict') {
- action = 'decode';
- options.strict = true;
- return;
- }
- // Process string(s)
- var result;
- if (!action) {
- log('Error: he requires at least one option and a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- try {
- result = he[action](string, options);
- log(result);
- count++;
- } catch(error) {
- log(error.message + '\n');
- log('Error: failed to %s.', action);
- log('If you think this is a bug in he, please report it:');
- log('https://github.com/mathiasbynens/he/issues/new');
- log(
- '\nStack trace using he@%s:\n',
- he.version
- );
- log(error.stack);
- return process.exit(1);
- }
- });
- if (!count) {
- log('Error: he requires a string argument.');
- log('Try `he --help` for more information.');
- return process.exit(1);
- }
- // Return with exit status 0 outside of the `forEach` loop, in case
- // multiple strings were passed in.
- return process.exit(0);
- };
-
- if (stdin.isTTY) {
- // handle shell arguments
- main();
- } else {
- // Either the script is called from within a non-TTY context, or `stdin`
- // content is being piped in.
- if (!process.stdout.isTTY) {
- // The script was called from a non-TTY context. This is a rather uncommon
- // use case we don’t actively support. However, we don’t want the script
- // to wait forever in such cases, so…
- timeout = setTimeout(function() {
- // …if no piped data arrived after a whole minute, handle shell
- // arguments instead.
- main();
- }, 60000);
- }
- data = '';
- stdin.on('data', function(chunk) {
- clearTimeout(timeout);
- data += chunk;
- });
- stdin.on('end', function() {
- strings.push(data.trim());
- main();
- });
- stdin.resume();
- }
-
-}());
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/he.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/he/he.js
deleted file mode 100644
index 74b9fe1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/he.js
+++ /dev/null
@@ -1,329 +0,0 @@
-/*! http://mths.be/he v0.5.0 by @mathias | MIT license */
-;(function(root) {
-
- // Detect free variables `exports`.
- var freeExports = typeof exports == 'object' && exports;
-
- // Detect free variable `module`.
- var freeModule = typeof module == 'object' && module &&
- module.exports == freeExports && module;
-
- // Detect free variable `global`, from Node.js or Browserified code,
- // and use it as `root`.
- var freeGlobal = typeof global == 'object' && global;
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
- root = freeGlobal;
- }
-
- /*--------------------------------------------------------------------------*/
-
- // All astral symbols.
- var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
- // All ASCII symbols (not just printable ASCII) except those listed in the
- // first column of the overrides table.
- // http://whatwg.org/html/tokenization.html#table-charref-overrides
- var regexAsciiWhitelist = /[\x01-\x7F]/g;
- // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
- // code points listed in the first column of the overrides table on
- // http://whatwg.org/html/tokenization.html#table-charref-overrides.
- var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
-
- var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
- var encodeMap = {'\xC1':'Aacute','\xE1':'aacute','\u0102':'Abreve','\u0103':'abreve','\u223E':'ac','\u223F':'acd','\u223E\u0333':'acE','\xC2':'Acirc','\xE2':'acirc','\xB4':'acute','\u0410':'Acy','\u0430':'acy','\xC6':'AElig','\xE6':'aelig','\u2061':'af','\uD835\uDD04':'Afr','\uD835\uDD1E':'afr','\xC0':'Agrave','\xE0':'agrave','\u2135':'aleph','\u0391':'Alpha','\u03B1':'alpha','\u0100':'Amacr','\u0101':'amacr','\u2A3F':'amalg','&':'amp','\u2A55':'andand','\u2A53':'And','\u2227':'and','\u2A5C':'andd','\u2A58':'andslope','\u2A5A':'andv','\u2220':'ang','\u29A4':'ange','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u2221':'angmsd','\u221F':'angrt','\u22BE':'angrtvb','\u299D':'angrtvbd','\u2222':'angsph','\xC5':'angst','\u237C':'angzarr','\u0104':'Aogon','\u0105':'aogon','\uD835\uDD38':'Aopf','\uD835\uDD52':'aopf','\u2A6F':'apacir','\u2248':'ap','\u2A70':'apE','\u224A':'ape','\u224B':'apid','\'':'apos','\xE5':'aring','\uD835\uDC9C':'Ascr','\uD835\uDCB6':'ascr','\u2254':'colone','*':'ast','\u224D':'CupCap','\xC3':'Atilde','\xE3':'atilde','\xC4':'Auml','\xE4':'auml','\u2233':'awconint','\u2A11':'awint','\u224C':'bcong','\u03F6':'bepsi','\u2035':'bprime','\u223D':'bsim','\u22CD':'bsime','\u2216':'setmn','\u2AE7':'Barv','\u22BD':'barvee','\u2305':'barwed','\u2306':'Barwed','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u0411':'Bcy','\u0431':'bcy','\u201E':'bdquo','\u2235':'becaus','\u29B0':'bemptyv','\u212C':'Bscr','\u0392':'Beta','\u03B2':'beta','\u2136':'beth','\u226C':'twixt','\uD835\uDD05':'Bfr','\uD835\uDD1F':'bfr','\u22C2':'xcap','\u25EF':'xcirc','\u22C3':'xcup','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A06':'xsqcup','\u2605':'starf','\u25BD':'xdtri','\u25B3':'xutri','\u2A04':'xuplus','\u22C1':'Vee','\u22C0':'Wedge','\u290D':'rbarr','\u29EB':'lozf','\u25AA':'squf','\u25B4':'utrif','\u25BE':'dtrif','\u25C2':'ltrif','\u25B8':'rtrif','\u2423':'blank','\u2592':'blk12','\u2591':'blk14','\u2593':'blk34','\u2588':'block','=\u20E5':'bne','\u2261\u20E5':'bnequiv','\u2AED':'bNot','\u2310':'bnot','\uD835\uDD39':'Bopf','\uD835\uDD53':'bopf','\u22A5':'bot','\u22C8':'bowtie','\u29C9':'boxbox','\u2510':'boxdl','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u250C':'boxdr','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2500':'boxh','\u2550':'boxH','\u252C':'boxhd','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2534':'boxhu','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u229F':'minusb','\u229E':'plusb','\u22A0':'timesb','\u2518':'boxul','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u2514':'boxur','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u2502':'boxv','\u2551':'boxV','\u253C':'boxvh','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2524':'boxvl','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u251C':'boxvr','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u02D8':'breve','\xA6':'brvbar','\uD835\uDCB7':'bscr','\u204F':'bsemi','\u29C5':'bsolb','\\':'bsol','\u27C8':'bsolhsub','\u2022':'bull','\u224E':'bump','\u2AAE':'bumpE','\u224F':'bumpe','\u0106':'Cacute','\u0107':'cacute','\u2A44':'capand','\u2A49':'capbrcup','\u2A4B':'capcap','\u2229':'cap','\u22D2':'Cap','\u2A47':'capcup','\u2A40':'capdot','\u2145':'DD','\u2229\uFE00':'caps','\u2041':'caret','\u02C7':'caron','\u212D':'Cfr','\u2A4D':'ccaps','\u010C':'Ccaron','\u010D':'ccaron','\xC7':'Ccedil','\xE7':'ccedil','\u0108':'Ccirc','\u0109':'ccirc','\u2230':'Cconint','\u2A4C':'ccups','\u2A50':'ccupssm','\u010A':'Cdot','\u010B':'cdot','\xB8':'cedil','\u29B2':'cemptyv','\xA2':'cent','\xB7':'middot','\uD835\uDD20':'cfr','\u0427':'CHcy','\u0447':'chcy','\u2713':'check','\u03A7':'Chi','\u03C7':'chi','\u02C6':'circ','\u2257':'cire','\u21BA':'olarr','\u21BB':'orarr','\u229B':'oast','\u229A':'ocir','\u229D':'odash','\u2299':'odot','\xAE':'reg','\u24C8':'oS','\u2296':'ominus','\u2295':'oplus','\u2297':'otimes','\u25CB':'cir','\u29C3':'cirE','\u2A10':'cirfnint','\u2AEF':'cirmid','\u29C2':'cirscir','\u2232':'cwconint','\u201D':'rdquo','\u2019':'rsquo','\u2663':'clubs',':':'colon','\u2237':'Colon','\u2A74':'Colone',',':'comma','@':'commat','\u2201':'comp','\u2218':'compfn','\u2102':'Copf','\u2245':'cong','\u2A6D':'congdot','\u2261':'equiv','\u222E':'oint','\u222F':'Conint','\uD835\uDD54':'copf','\u2210':'coprod','\xA9':'copy','\u2117':'copysr','\u21B5':'crarr','\u2717':'cross','\u2A2F':'Cross','\uD835\uDC9E':'Cscr','\uD835\uDCB8':'cscr','\u2ACF':'csub','\u2AD1':'csube','\u2AD0':'csup','\u2AD2':'csupe','\u22EF':'ctdot','\u2938':'cudarrl','\u2935':'cudarrr','\u22DE':'cuepr','\u22DF':'cuesc','\u21B6':'cularr','\u293D':'cularrp','\u2A48':'cupbrcap','\u2A46':'cupcap','\u222A':'cup','\u22D3':'Cup','\u2A4A':'cupcup','\u228D':'cupdot','\u2A45':'cupor','\u222A\uFE00':'cups','\u21B7':'curarr','\u293C':'curarrm','\u22CE':'cuvee','\u22CF':'cuwed','\xA4':'curren','\u2231':'cwint','\u232D':'cylcty','\u2020':'dagger','\u2021':'Dagger','\u2138':'daleth','\u2193':'darr','\u21A1':'Darr','\u21D3':'dArr','\u2010':'dash','\u2AE4':'Dashv','\u22A3':'dashv','\u290F':'rBarr','\u02DD':'dblac','\u010E':'Dcaron','\u010F':'dcaron','\u0414':'Dcy','\u0434':'dcy','\u21CA':'ddarr','\u2146':'dd','\u2911':'DDotrahd','\u2A77':'eDDot','\xB0':'deg','\u2207':'Del','\u0394':'Delta','\u03B4':'delta','\u29B1':'demptyv','\u297F':'dfisht','\uD835\uDD07':'Dfr','\uD835\uDD21':'dfr','\u2965':'dHar','\u21C3':'dharl','\u21C2':'dharr','\u02D9':'dot','`':'grave','\u02DC':'tilde','\u22C4':'diam','\u2666':'diams','\xA8':'die','\u03DD':'gammad','\u22F2':'disin','\xF7':'div','\u22C7':'divonx','\u0402':'DJcy','\u0452':'djcy','\u231E':'dlcorn','\u230D':'dlcrop','$':'dollar','\uD835\uDD3B':'Dopf','\uD835\uDD55':'dopf','\u20DC':'DotDot','\u2250':'doteq','\u2251':'eDot','\u2238':'minusd','\u2214':'plusdo','\u22A1':'sdotb','\u21D0':'lArr','\u21D4':'iff','\u27F8':'xlArr','\u27FA':'xhArr','\u27F9':'xrArr','\u21D2':'rArr','\u22A8':'vDash','\u21D1':'uArr','\u21D5':'vArr','\u2225':'par','\u2913':'DownArrowBar','\u21F5':'duarr','\u0311':'DownBreve','\u2950':'DownLeftRightVector','\u295E':'DownLeftTeeVector','\u2956':'DownLeftVectorBar','\u21BD':'lhard','\u295F':'DownRightTeeVector','\u2957':'DownRightVectorBar','\u21C1':'rhard','\u21A7':'mapstodown','\u22A4':'top','\u2910':'RBarr','\u231F':'drcorn','\u230C':'drcrop','\uD835\uDC9F':'Dscr','\uD835\uDCB9':'dscr','\u0405':'DScy','\u0455':'dscy','\u29F6':'dsol','\u0110':'Dstrok','\u0111':'dstrok','\u22F1':'dtdot','\u25BF':'dtri','\u296F':'duhar','\u29A6':'dwangle','\u040F':'DZcy','\u045F':'dzcy','\u27FF':'dzigrarr','\xC9':'Eacute','\xE9':'eacute','\u2A6E':'easter','\u011A':'Ecaron','\u011B':'ecaron','\xCA':'Ecirc','\xEA':'ecirc','\u2256':'ecir','\u2255':'ecolon','\u042D':'Ecy','\u044D':'ecy','\u0116':'Edot','\u0117':'edot','\u2147':'ee','\u2252':'efDot','\uD835\uDD08':'Efr','\uD835\uDD22':'efr','\u2A9A':'eg','\xC8':'Egrave','\xE8':'egrave','\u2A96':'egs','\u2A98':'egsdot','\u2A99':'el','\u2208':'in','\u23E7':'elinters','\u2113':'ell','\u2A95':'els','\u2A97':'elsdot','\u0112':'Emacr','\u0113':'emacr','\u2205':'empty','\u25FB':'EmptySmallSquare','\u25AB':'EmptyVerySmallSquare','\u2004':'emsp13','\u2005':'emsp14','\u2003':'emsp','\u014A':'ENG','\u014B':'eng','\u2002':'ensp','\u0118':'Eogon','\u0119':'eogon','\uD835\uDD3C':'Eopf','\uD835\uDD56':'eopf','\u22D5':'epar','\u29E3':'eparsl','\u2A71':'eplus','\u03B5':'epsi','\u0395':'Epsilon','\u03F5':'epsiv','\u2242':'esim','\u2A75':'Equal','=':'equals','\u225F':'equest','\u21CC':'rlhar','\u2A78':'equivDD','\u29E5':'eqvparsl','\u2971':'erarr','\u2253':'erDot','\u212F':'escr','\u2130':'Escr','\u2A73':'Esim','\u0397':'Eta','\u03B7':'eta','\xD0':'ETH','\xF0':'eth','\xCB':'Euml','\xEB':'euml','\u20AC':'euro','!':'excl','\u2203':'exist','\u0424':'Fcy','\u0444':'fcy','\u2640':'female','\uFB03':'ffilig','\uFB00':'fflig','\uFB04':'ffllig','\uD835\uDD09':'Ffr','\uD835\uDD23':'ffr','\uFB01':'filig','\u25FC':'FilledSmallSquare','fj':'fjlig','\u266D':'flat','\uFB02':'fllig','\u25B1':'fltns','\u0192':'fnof','\uD835\uDD3D':'Fopf','\uD835\uDD57':'fopf','\u2200':'forall','\u22D4':'fork','\u2AD9':'forkv','\u2131':'Fscr','\u2A0D':'fpartint','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\u2154':'frac23','\u2156':'frac25','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\u2044':'frasl','\u2322':'frown','\uD835\uDCBB':'fscr','\u01F5':'gacute','\u0393':'Gamma','\u03B3':'gamma','\u03DC':'Gammad','\u2A86':'gap','\u011E':'Gbreve','\u011F':'gbreve','\u0122':'Gcedil','\u011C':'Gcirc','\u011D':'gcirc','\u0413':'Gcy','\u0433':'gcy','\u0120':'Gdot','\u0121':'gdot','\u2265':'ge','\u2267':'gE','\u2A8C':'gEl','\u22DB':'gel','\u2A7E':'ges','\u2AA9':'gescc','\u2A80':'gesdot','\u2A82':'gesdoto','\u2A84':'gesdotol','\u22DB\uFE00':'gesl','\u2A94':'gesles','\uD835\uDD0A':'Gfr','\uD835\uDD24':'gfr','\u226B':'gg','\u22D9':'Gg','\u2137':'gimel','\u0403':'GJcy','\u0453':'gjcy','\u2AA5':'gla','\u2277':'gl','\u2A92':'glE','\u2AA4':'glj','\u2A8A':'gnap','\u2A88':'gne','\u2269':'gnE','\u22E7':'gnsim','\uD835\uDD3E':'Gopf','\uD835\uDD58':'gopf','\u2AA2':'GreaterGreater','\u2273':'gsim','\uD835\uDCA2':'Gscr','\u210A':'gscr','\u2A8E':'gsime','\u2A90':'gsiml','\u2AA7':'gtcc','\u2A7A':'gtcir','>':'gt','\u22D7':'gtdot','\u2995':'gtlPar','\u2A7C':'gtquest','\u2978':'gtrarr','\u2269\uFE00':'gvnE','\u200A':'hairsp','\u210B':'Hscr','\u042A':'HARDcy','\u044A':'hardcy','\u2948':'harrcir','\u2194':'harr','\u21AD':'harrw','^':'Hat','\u210F':'hbar','\u0124':'Hcirc','\u0125':'hcirc','\u2665':'hearts','\u2026':'mldr','\u22B9':'hercon','\uD835\uDD25':'hfr','\u210C':'Hfr','\u2925':'searhk','\u2926':'swarhk','\u21FF':'hoarr','\u223B':'homtht','\u21A9':'larrhk','\u21AA':'rarrhk','\uD835\uDD59':'hopf','\u210D':'Hopf','\u2015':'horbar','\uD835\uDCBD':'hscr','\u0126':'Hstrok','\u0127':'hstrok','\u2043':'hybull','\xCD':'Iacute','\xED':'iacute','\u2063':'ic','\xCE':'Icirc','\xEE':'icirc','\u0418':'Icy','\u0438':'icy','\u0130':'Idot','\u0415':'IEcy','\u0435':'iecy','\xA1':'iexcl','\uD835\uDD26':'ifr','\u2111':'Im','\xCC':'Igrave','\xEC':'igrave','\u2148':'ii','\u2A0C':'qint','\u222D':'tint','\u29DC':'iinfin','\u2129':'iiota','\u0132':'IJlig','\u0133':'ijlig','\u012A':'Imacr','\u012B':'imacr','\u2110':'Iscr','\u0131':'imath','\u22B7':'imof','\u01B5':'imped','\u2105':'incare','\u221E':'infin','\u29DD':'infintie','\u22BA':'intcal','\u222B':'int','\u222C':'Int','\u2124':'Zopf','\u2A17':'intlarhk','\u2A3C':'iprod','\u2062':'it','\u0401':'IOcy','\u0451':'iocy','\u012E':'Iogon','\u012F':'iogon','\uD835\uDD40':'Iopf','\uD835\uDD5A':'iopf','\u0399':'Iota','\u03B9':'iota','\xBF':'iquest','\uD835\uDCBE':'iscr','\u22F5':'isindot','\u22F9':'isinE','\u22F4':'isins','\u22F3':'isinsv','\u0128':'Itilde','\u0129':'itilde','\u0406':'Iukcy','\u0456':'iukcy','\xCF':'Iuml','\xEF':'iuml','\u0134':'Jcirc','\u0135':'jcirc','\u0419':'Jcy','\u0439':'jcy','\uD835\uDD0D':'Jfr','\uD835\uDD27':'jfr','\u0237':'jmath','\uD835\uDD41':'Jopf','\uD835\uDD5B':'jopf','\uD835\uDCA5':'Jscr','\uD835\uDCBF':'jscr','\u0408':'Jsercy','\u0458':'jsercy','\u0404':'Jukcy','\u0454':'jukcy','\u039A':'Kappa','\u03BA':'kappa','\u03F0':'kappav','\u0136':'Kcedil','\u0137':'kcedil','\u041A':'Kcy','\u043A':'kcy','\uD835\uDD0E':'Kfr','\uD835\uDD28':'kfr','\u0138':'kgreen','\u0425':'KHcy','\u0445':'khcy','\u040C':'KJcy','\u045C':'kjcy','\uD835\uDD42':'Kopf','\uD835\uDD5C':'kopf','\uD835\uDCA6':'Kscr','\uD835\uDCC0':'kscr','\u21DA':'lAarr','\u0139':'Lacute','\u013A':'lacute','\u29B4':'laemptyv','\u2112':'Lscr','\u039B':'Lambda','\u03BB':'lambda','\u27E8':'lang','\u27EA':'Lang','\u2991':'langd','\u2A85':'lap','\xAB':'laquo','\u21E4':'larrb','\u291F':'larrbfs','\u2190':'larr','\u219E':'Larr','\u291D':'larrfs','\u21AB':'larrlp','\u2939':'larrpl','\u2973':'larrsim','\u21A2':'larrtl','\u2919':'latail','\u291B':'lAtail','\u2AAB':'lat','\u2AAD':'late','\u2AAD\uFE00':'lates','\u290C':'lbarr','\u290E':'lBarr','\u2772':'lbbrk','{':'lcub','[':'lsqb','\u298B':'lbrke','\u298F':'lbrksld','\u298D':'lbrkslu','\u013D':'Lcaron','\u013E':'lcaron','\u013B':'Lcedil','\u013C':'lcedil','\u2308':'lceil','\u041B':'Lcy','\u043B':'lcy','\u2936':'ldca','\u201C':'ldquo','\u2967':'ldrdhar','\u294B':'ldrushar','\u21B2':'ldsh','\u2264':'le','\u2266':'lE','\u21C6':'lrarr','\u27E6':'lobrk','\u2961':'LeftDownTeeVector','\u2959':'LeftDownVectorBar','\u230A':'lfloor','\u21BC':'lharu','\u21C7':'llarr','\u21CB':'lrhar','\u294E':'LeftRightVector','\u21A4':'mapstoleft','\u295A':'LeftTeeVector','\u22CB':'lthree','\u29CF':'LeftTriangleBar','\u22B2':'vltri','\u22B4':'ltrie','\u2951':'LeftUpDownVector','\u2960':'LeftUpTeeVector','\u2958':'LeftUpVectorBar','\u21BF':'uharl','\u2952':'LeftVectorBar','\u2A8B':'lEg','\u22DA':'leg','\u2A7D':'les','\u2AA8':'lescc','\u2A7F':'lesdot','\u2A81':'lesdoto','\u2A83':'lesdotor','\u22DA\uFE00':'lesg','\u2A93':'lesges','\u22D6':'ltdot','\u2276':'lg','\u2AA1':'LessLess','\u2272':'lsim','\u297C':'lfisht','\uD835\uDD0F':'Lfr','\uD835\uDD29':'lfr','\u2A91':'lgE','\u2962':'lHar','\u296A':'lharul','\u2584':'lhblk','\u0409':'LJcy','\u0459':'ljcy','\u226A':'ll','\u22D8':'Ll','\u296B':'llhard','\u25FA':'lltri','\u013F':'Lmidot','\u0140':'lmidot','\u23B0':'lmoust','\u2A89':'lnap','\u2A87':'lne','\u2268':'lnE','\u22E6':'lnsim','\u27EC':'loang','\u21FD':'loarr','\u27F5':'xlarr','\u27F7':'xharr','\u27FC':'xmap','\u27F6':'xrarr','\u21AC':'rarrlp','\u2985':'lopar','\uD835\uDD43':'Lopf','\uD835\uDD5D':'lopf','\u2A2D':'loplus','\u2A34':'lotimes','\u2217':'lowast','_':'lowbar','\u2199':'swarr','\u2198':'searr','\u25CA':'loz','(':'lpar','\u2993':'lparlt','\u296D':'lrhard','\u200E':'lrm','\u22BF':'lrtri','\u2039':'lsaquo','\uD835\uDCC1':'lscr','\u21B0':'lsh','\u2A8D':'lsime','\u2A8F':'lsimg','\u2018':'lsquo','\u201A':'sbquo','\u0141':'Lstrok','\u0142':'lstrok','\u2AA6':'ltcc','\u2A79':'ltcir','<':'lt','\u22C9':'ltimes','\u2976':'ltlarr','\u2A7B':'ltquest','\u25C3':'ltri','\u2996':'ltrPar','\u294A':'lurdshar','\u2966':'luruhar','\u2268\uFE00':'lvnE','\xAF':'macr','\u2642':'male','\u2720':'malt','\u2905':'Map','\u21A6':'map','\u21A5':'mapstoup','\u25AE':'marker','\u2A29':'mcomma','\u041C':'Mcy','\u043C':'mcy','\u2014':'mdash','\u223A':'mDDot','\u205F':'MediumSpace','\u2133':'Mscr','\uD835\uDD10':'Mfr','\uD835\uDD2A':'mfr','\u2127':'mho','\xB5':'micro','\u2AF0':'midcir','\u2223':'mid','\u2212':'minus','\u2A2A':'minusdu','\u2213':'mp','\u2ADB':'mlcp','\u22A7':'models','\uD835\uDD44':'Mopf','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\u039C':'Mu','\u03BC':'mu','\u22B8':'mumap','\u0143':'Nacute','\u0144':'nacute','\u2220\u20D2':'nang','\u2249':'nap','\u2A70\u0338':'napE','\u224B\u0338':'napid','\u0149':'napos','\u266E':'natur','\u2115':'Nopf','\xA0':'nbsp','\u224E\u0338':'nbump','\u224F\u0338':'nbumpe','\u2A43':'ncap','\u0147':'Ncaron','\u0148':'ncaron','\u0145':'Ncedil','\u0146':'ncedil','\u2247':'ncong','\u2A6D\u0338':'ncongdot','\u2A42':'ncup','\u041D':'Ncy','\u043D':'ncy','\u2013':'ndash','\u2924':'nearhk','\u2197':'nearr','\u21D7':'neArr','\u2260':'ne','\u2250\u0338':'nedot','\u200B':'ZeroWidthSpace','\u2262':'nequiv','\u2928':'toea','\u2242\u0338':'nesim','\n':'NewLine','\u2204':'nexist','\uD835\uDD11':'Nfr','\uD835\uDD2B':'nfr','\u2267\u0338':'ngE','\u2271':'nge','\u2A7E\u0338':'nges','\u22D9\u0338':'nGg','\u2275':'ngsim','\u226B\u20D2':'nGt','\u226F':'ngt','\u226B\u0338':'nGtv','\u21AE':'nharr','\u21CE':'nhArr','\u2AF2':'nhpar','\u220B':'ni','\u22FC':'nis','\u22FA':'nisd','\u040A':'NJcy','\u045A':'njcy','\u219A':'nlarr','\u21CD':'nlArr','\u2025':'nldr','\u2266\u0338':'nlE','\u2270':'nle','\u2A7D\u0338':'nles','\u226E':'nlt','\u22D8\u0338':'nLl','\u2274':'nlsim','\u226A\u20D2':'nLt','\u22EA':'nltri','\u22EC':'nltrie','\u226A\u0338':'nLtv','\u2224':'nmid','\u2060':'NoBreak','\uD835\uDD5F':'nopf','\u2AEC':'Not','\xAC':'not','\u226D':'NotCupCap','\u2226':'npar','\u2209':'notin','\u2279':'ntgl','\u22F5\u0338':'notindot','\u22F9\u0338':'notinE','\u22F7':'notinvb','\u22F6':'notinvc','\u29CF\u0338':'NotLeftTriangleBar','\u2278':'ntlg','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA1\u0338':'NotNestedLessLess','\u220C':'notni','\u22FE':'notnivb','\u22FD':'notnivc','\u2280':'npr','\u2AAF\u0338':'npre','\u22E0':'nprcue','\u29D0\u0338':'NotRightTriangleBar','\u22EB':'nrtri','\u22ED':'nrtrie','\u228F\u0338':'NotSquareSubset','\u22E2':'nsqsube','\u2290\u0338':'NotSquareSuperset','\u22E3':'nsqsupe','\u2282\u20D2':'vnsub','\u2288':'nsube','\u2281':'nsc','\u2AB0\u0338':'nsce','\u22E1':'nsccue','\u227F\u0338':'NotSucceedsTilde','\u2283\u20D2':'vnsup','\u2289':'nsupe','\u2241':'nsim','\u2244':'nsime','\u2AFD\u20E5':'nparsl','\u2202\u0338':'npart','\u2A14':'npolint','\u2933\u0338':'nrarrc','\u219B':'nrarr','\u21CF':'nrArr','\u219D\u0338':'nrarrw','\uD835\uDCA9':'Nscr','\uD835\uDCC3':'nscr','\u2284':'nsub','\u2AC5\u0338':'nsubE','\u2285':'nsup','\u2AC6\u0338':'nsupE','\xD1':'Ntilde','\xF1':'ntilde','\u039D':'Nu','\u03BD':'nu','#':'num','\u2116':'numero','\u2007':'numsp','\u224D\u20D2':'nvap','\u22AC':'nvdash','\u22AD':'nvDash','\u22AE':'nVdash','\u22AF':'nVDash','\u2265\u20D2':'nvge','>\u20D2':'nvgt','\u2904':'nvHarr','\u29DE':'nvinfin','\u2902':'nvlArr','\u2264\u20D2':'nvle','<\u20D2':'nvlt','\u22B4\u20D2':'nvltrie','\u2903':'nvrArr','\u22B5\u20D2':'nvrtrie','\u223C\u20D2':'nvsim','\u2923':'nwarhk','\u2196':'nwarr','\u21D6':'nwArr','\u2927':'nwnear','\xD3':'Oacute','\xF3':'oacute','\xD4':'Ocirc','\xF4':'ocirc','\u041E':'Ocy','\u043E':'ocy','\u0150':'Odblac','\u0151':'odblac','\u2A38':'odiv','\u29BC':'odsold','\u0152':'OElig','\u0153':'oelig','\u29BF':'ofcir','\uD835\uDD12':'Ofr','\uD835\uDD2C':'ofr','\u02DB':'ogon','\xD2':'Ograve','\xF2':'ograve','\u29C1':'ogt','\u29B5':'ohbar','\u03A9':'ohm','\u29BE':'olcir','\u29BB':'olcross','\u203E':'oline','\u29C0':'olt','\u014C':'Omacr','\u014D':'omacr','\u03C9':'omega','\u039F':'Omicron','\u03BF':'omicron','\u29B6':'omid','\uD835\uDD46':'Oopf','\uD835\uDD60':'oopf','\u29B7':'opar','\u29B9':'operp','\u2A54':'Or','\u2228':'or','\u2A5D':'ord','\u2134':'oscr','\xAA':'ordf','\xBA':'ordm','\u22B6':'origof','\u2A56':'oror','\u2A57':'orslope','\u2A5B':'orv','\uD835\uDCAA':'Oscr','\xD8':'Oslash','\xF8':'oslash','\u2298':'osol','\xD5':'Otilde','\xF5':'otilde','\u2A36':'otimesas','\u2A37':'Otimes','\xD6':'Ouml','\xF6':'ouml','\u233D':'ovbar','\u23DE':'OverBrace','\u23B4':'tbrk','\u23DC':'OverParenthesis','\xB6':'para','\u2AF3':'parsim','\u2AFD':'parsl','\u2202':'part','\u041F':'Pcy','\u043F':'pcy','%':'percnt','.':'period','\u2030':'permil','\u2031':'pertenk','\uD835\uDD13':'Pfr','\uD835\uDD2D':'pfr','\u03A6':'Phi','\u03C6':'phi','\u03D5':'phiv','\u260E':'phone','\u03A0':'Pi','\u03C0':'pi','\u03D6':'piv','\u210E':'planckh','\u2A23':'plusacir','\u2A22':'pluscir','+':'plus','\u2A25':'plusdu','\u2A72':'pluse','\xB1':'pm','\u2A26':'plussim','\u2A27':'plustwo','\u2A15':'pointint','\uD835\uDD61':'popf','\u2119':'Popf','\xA3':'pound','\u2AB7':'prap','\u2ABB':'Pr','\u227A':'pr','\u227C':'prcue','\u2AAF':'pre','\u227E':'prsim','\u2AB9':'prnap','\u2AB5':'prnE','\u22E8':'prnsim','\u2AB3':'prE','\u2032':'prime','\u2033':'Prime','\u220F':'prod','\u232E':'profalar','\u2312':'profline','\u2313':'profsurf','\u221D':'prop','\u22B0':'prurel','\uD835\uDCAB':'Pscr','\uD835\uDCC5':'pscr','\u03A8':'Psi','\u03C8':'psi','\u2008':'puncsp','\uD835\uDD14':'Qfr','\uD835\uDD2E':'qfr','\uD835\uDD62':'qopf','\u211A':'Qopf','\u2057':'qprime','\uD835\uDCAC':'Qscr','\uD835\uDCC6':'qscr','\u2A16':'quatint','?':'quest','"':'quot','\u21DB':'rAarr','\u223D\u0331':'race','\u0154':'Racute','\u0155':'racute','\u221A':'Sqrt','\u29B3':'raemptyv','\u27E9':'rang','\u27EB':'Rang','\u2992':'rangd','\u29A5':'range','\xBB':'raquo','\u2975':'rarrap','\u21E5':'rarrb','\u2920':'rarrbfs','\u2933':'rarrc','\u2192':'rarr','\u21A0':'Rarr','\u291E':'rarrfs','\u2945':'rarrpl','\u2974':'rarrsim','\u2916':'Rarrtl','\u21A3':'rarrtl','\u219D':'rarrw','\u291A':'ratail','\u291C':'rAtail','\u2236':'ratio','\u2773':'rbbrk','}':'rcub',']':'rsqb','\u298C':'rbrke','\u298E':'rbrksld','\u2990':'rbrkslu','\u0158':'Rcaron','\u0159':'rcaron','\u0156':'Rcedil','\u0157':'rcedil','\u2309':'rceil','\u0420':'Rcy','\u0440':'rcy','\u2937':'rdca','\u2969':'rdldhar','\u21B3':'rdsh','\u211C':'Re','\u211B':'Rscr','\u211D':'Ropf','\u25AD':'rect','\u297D':'rfisht','\u230B':'rfloor','\uD835\uDD2F':'rfr','\u2964':'rHar','\u21C0':'rharu','\u296C':'rharul','\u03A1':'Rho','\u03C1':'rho','\u03F1':'rhov','\u21C4':'rlarr','\u27E7':'robrk','\u295D':'RightDownTeeVector','\u2955':'RightDownVectorBar','\u21C9':'rrarr','\u22A2':'vdash','\u295B':'RightTeeVector','\u22CC':'rthree','\u29D0':'RightTriangleBar','\u22B3':'vrtri','\u22B5':'rtrie','\u294F':'RightUpDownVector','\u295C':'RightUpTeeVector','\u2954':'RightUpVectorBar','\u21BE':'uharr','\u2953':'RightVectorBar','\u02DA':'ring','\u200F':'rlm','\u23B1':'rmoust','\u2AEE':'rnmid','\u27ED':'roang','\u21FE':'roarr','\u2986':'ropar','\uD835\uDD63':'ropf','\u2A2E':'roplus','\u2A35':'rotimes','\u2970':'RoundImplies',')':'rpar','\u2994':'rpargt','\u2A12':'rppolint','\u203A':'rsaquo','\uD835\uDCC7':'rscr','\u21B1':'rsh','\u22CA':'rtimes','\u25B9':'rtri','\u29CE':'rtriltri','\u29F4':'RuleDelayed','\u2968':'ruluhar','\u211E':'rx','\u015A':'Sacute','\u015B':'sacute','\u2AB8':'scap','\u0160':'Scaron','\u0161':'scaron','\u2ABC':'Sc','\u227B':'sc','\u227D':'sccue','\u2AB0':'sce','\u2AB4':'scE','\u015E':'Scedil','\u015F':'scedil','\u015C':'Scirc','\u015D':'scirc','\u2ABA':'scnap','\u2AB6':'scnE','\u22E9':'scnsim','\u2A13':'scpolint','\u227F':'scsim','\u0421':'Scy','\u0441':'scy','\u22C5':'sdot','\u2A66':'sdote','\u21D8':'seArr','\xA7':'sect',';':'semi','\u2929':'tosa','\u2736':'sext','\uD835\uDD16':'Sfr','\uD835\uDD30':'sfr','\u266F':'sharp','\u0429':'SHCHcy','\u0449':'shchcy','\u0428':'SHcy','\u0448':'shcy','\u2191':'uarr','\xAD':'shy','\u03A3':'Sigma','\u03C3':'sigma','\u03C2':'sigmaf','\u223C':'sim','\u2A6A':'simdot','\u2243':'sime','\u2A9E':'simg','\u2AA0':'simgE','\u2A9D':'siml','\u2A9F':'simlE','\u2246':'simne','\u2A24':'simplus','\u2972':'simrarr','\u2A33':'smashp','\u29E4':'smeparsl','\u2323':'smile','\u2AAA':'smt','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u042C':'SOFTcy','\u044C':'softcy','\u233F':'solbar','\u29C4':'solb','/':'sol','\uD835\uDD4A':'Sopf','\uD835\uDD64':'sopf','\u2660':'spades','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u228F':'sqsub','\u2291':'sqsube','\u2290':'sqsup','\u2292':'sqsupe','\u25A1':'squ','\uD835\uDCAE':'Sscr','\uD835\uDCC8':'sscr','\u22C6':'Star','\u2606':'star','\u2282':'sub','\u22D0':'Sub','\u2ABD':'subdot','\u2AC5':'subE','\u2286':'sube','\u2AC3':'subedot','\u2AC1':'submult','\u2ACB':'subnE','\u228A':'subne','\u2ABF':'subplus','\u2979':'subrarr','\u2AC7':'subsim','\u2AD5':'subsub','\u2AD3':'subsup','\u2211':'sum','\u266A':'sung','\xB9':'sup1','\xB2':'sup2','\xB3':'sup3','\u2283':'sup','\u22D1':'Sup','\u2ABE':'supdot','\u2AD8':'supdsub','\u2AC6':'supE','\u2287':'supe','\u2AC4':'supedot','\u27C9':'suphsol','\u2AD7':'suphsub','\u297B':'suplarr','\u2AC2':'supmult','\u2ACC':'supnE','\u228B':'supne','\u2AC0':'supplus','\u2AC8':'supsim','\u2AD4':'supsub','\u2AD6':'supsup','\u21D9':'swArr','\u292A':'swnwar','\xDF':'szlig','\t':'Tab','\u2316':'target','\u03A4':'Tau','\u03C4':'tau','\u0164':'Tcaron','\u0165':'tcaron','\u0162':'Tcedil','\u0163':'tcedil','\u0422':'Tcy','\u0442':'tcy','\u20DB':'tdot','\u2315':'telrec','\uD835\uDD17':'Tfr','\uD835\uDD31':'tfr','\u2234':'there4','\u0398':'Theta','\u03B8':'theta','\u03D1':'thetav','\u205F\u200A':'ThickSpace','\u2009':'thinsp','\xDE':'THORN','\xFE':'thorn','\u2A31':'timesbar','\xD7':'times','\u2A30':'timesd','\u2336':'topbot','\u2AF1':'topcir','\uD835\uDD4B':'Topf','\uD835\uDD65':'topf','\u2ADA':'topfork','\u2034':'tprime','\u2122':'trade','\u25B5':'utri','\u225C':'trie','\u25EC':'tridot','\u2A3A':'triminus','\u2A39':'triplus','\u29CD':'trisb','\u2A3B':'tritime','\u23E2':'trpezium','\uD835\uDCAF':'Tscr','\uD835\uDCC9':'tscr','\u0426':'TScy','\u0446':'tscy','\u040B':'TSHcy','\u045B':'tshcy','\u0166':'Tstrok','\u0167':'tstrok','\xDA':'Uacute','\xFA':'uacute','\u219F':'Uarr','\u2949':'Uarrocir','\u040E':'Ubrcy','\u045E':'ubrcy','\u016C':'Ubreve','\u016D':'ubreve','\xDB':'Ucirc','\xFB':'ucirc','\u0423':'Ucy','\u0443':'ucy','\u21C5':'udarr','\u0170':'Udblac','\u0171':'udblac','\u296E':'udhar','\u297E':'ufisht','\uD835\uDD18':'Ufr','\uD835\uDD32':'ufr','\xD9':'Ugrave','\xF9':'ugrave','\u2963':'uHar','\u2580':'uhblk','\u231C':'ulcorn','\u230F':'ulcrop','\u25F8':'ultri','\u016A':'Umacr','\u016B':'umacr','\u23DF':'UnderBrace','\u23DD':'UnderParenthesis','\u228E':'uplus','\u0172':'Uogon','\u0173':'uogon','\uD835\uDD4C':'Uopf','\uD835\uDD66':'uopf','\u2912':'UpArrowBar','\u2195':'varr','\u03C5':'upsi','\u03D2':'Upsi','\u03A5':'Upsilon','\u21C8':'uuarr','\u231D':'urcorn','\u230E':'urcrop','\u016E':'Uring','\u016F':'uring','\u25F9':'urtri','\uD835\uDCB0':'Uscr','\uD835\uDCCA':'uscr','\u22F0':'utdot','\u0168':'Utilde','\u0169':'utilde','\xDC':'Uuml','\xFC':'uuml','\u29A7':'uwangle','\u299C':'vangrt','\u228A\uFE00':'vsubne','\u2ACB\uFE00':'vsubnE','\u228B\uFE00':'vsupne','\u2ACC\uFE00':'vsupnE','\u2AE8':'vBar','\u2AEB':'Vbar','\u2AE9':'vBarv','\u0412':'Vcy','\u0432':'vcy','\u22A9':'Vdash','\u22AB':'VDash','\u2AE6':'Vdashl','\u22BB':'veebar','\u225A':'veeeq','\u22EE':'vellip','|':'vert','\u2016':'Vert','\u2758':'VerticalSeparator','\u2240':'wr','\uD835\uDD19':'Vfr','\uD835\uDD33':'vfr','\uD835\uDD4D':'Vopf','\uD835\uDD67':'vopf','\uD835\uDCB1':'Vscr','\uD835\uDCCB':'vscr','\u22AA':'Vvdash','\u299A':'vzigzag','\u0174':'Wcirc','\u0175':'wcirc','\u2A5F':'wedbar','\u2259':'wedgeq','\u2118':'wp','\uD835\uDD1A':'Wfr','\uD835\uDD34':'wfr','\uD835\uDD4E':'Wopf','\uD835\uDD68':'wopf','\uD835\uDCB2':'Wscr','\uD835\uDCCC':'wscr','\uD835\uDD1B':'Xfr','\uD835\uDD35':'xfr','\u039E':'Xi','\u03BE':'xi','\u22FB':'xnis','\uD835\uDD4F':'Xopf','\uD835\uDD69':'xopf','\uD835\uDCB3':'Xscr','\uD835\uDCCD':'xscr','\xDD':'Yacute','\xFD':'yacute','\u042F':'YAcy','\u044F':'yacy','\u0176':'Ycirc','\u0177':'ycirc','\u042B':'Ycy','\u044B':'ycy','\xA5':'yen','\uD835\uDD1C':'Yfr','\uD835\uDD36':'yfr','\u0407':'YIcy','\u0457':'yicy','\uD835\uDD50':'Yopf','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDCCE':'yscr','\u042E':'YUcy','\u044E':'yucy','\xFF':'yuml','\u0178':'Yuml','\u0179':'Zacute','\u017A':'zacute','\u017D':'Zcaron','\u017E':'zcaron','\u0417':'Zcy','\u0437':'zcy','\u017B':'Zdot','\u017C':'zdot','\u2128':'Zfr','\u0396':'Zeta','\u03B6':'zeta','\uD835\uDD37':'zfr','\u0416':'ZHcy','\u0436':'zhcy','\u21DD':'zigrarr','\uD835\uDD6B':'zopf','\uD835\uDCB5':'Zscr','\uD835\uDCCF':'zscr','\u200D':'zwj','\u200C':'zwnj'};
-
- var regexEscape = /["&'<>`]/g;
- var escapeMap = {
- '"': '"',
- '&': '&',
- '\'': ''',
- '<': '<',
- // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
- // following is not strictly necessary unless it’s part of a tag or an
- // unquoted attribute value. We’re only escaping it to support those
- // situations, and for XML support.
- '>': '>',
- // In Internet Explorer ≤ 8, the backtick character can be used
- // to break out of (un)quoted attribute values or HTML comments.
- // See http://html5sec.org/#102, http://html5sec.org/#108, and
- // http://html5sec.org/#133.
- '`': '`'
- };
-
- var regexInvalidEntity = /(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
- var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
- var regexDecode = /([0-9]+)(;?)|[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|lt)([=a-zA-Z0-9])?/g;
- var decodeMap = {'Aacute':'\xC1','aacute':'\xE1','Abreve':'\u0102','abreve':'\u0103','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','Acirc':'\xC2','acirc':'\xE2','acute':'\xB4','Acy':'\u0410','acy':'\u0430','AElig':'\xC6','aelig':'\xE6','af':'\u2061','Afr':'\uD835\uDD04','afr':'\uD835\uDD1E','Agrave':'\xC0','agrave':'\xE0','alefsym':'\u2135','aleph':'\u2135','Alpha':'\u0391','alpha':'\u03B1','Amacr':'\u0100','amacr':'\u0101','amalg':'\u2A3F','amp':'&','AMP':'&','andand':'\u2A55','And':'\u2A53','and':'\u2227','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angmsd':'\u2221','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','Aogon':'\u0104','aogon':'\u0105','Aopf':'\uD835\uDD38','aopf':'\uD835\uDD52','apacir':'\u2A6F','ap':'\u2248','apE':'\u2A70','ape':'\u224A','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','Aring':'\xC5','aring':'\xE5','Ascr':'\uD835\uDC9C','ascr':'\uD835\uDCB6','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','Atilde':'\xC3','atilde':'\xE3','Auml':'\xC4','auml':'\xE4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','Bcy':'\u0411','bcy':'\u0431','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','Beta':'\u0392','beta':'\u03B2','beth':'\u2136','between':'\u226C','Bfr':'\uD835\uDD05','bfr':'\uD835\uDD1F','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bNot':'\u2AED','bnot':'\u2310','Bopf':'\uD835\uDD39','bopf':'\uD835\uDD53','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxHd':'\u2564','boxhD':'\u2565','boxHD':'\u2566','boxhu':'\u2534','boxHu':'\u2567','boxhU':'\u2568','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsolb':'\u29C5','bsol':'\\','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpE':'\u2AAE','bumpe':'\u224F','Bumpeq':'\u224E','bumpeq':'\u224F','Cacute':'\u0106','cacute':'\u0107','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','cap':'\u2229','Cap':'\u22D2','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','Ccaron':'\u010C','ccaron':'\u010D','Ccedil':'\xC7','ccedil':'\xE7','Ccirc':'\u0108','ccirc':'\u0109','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','Cdot':'\u010A','cdot':'\u010B','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','CHcy':'\u0427','chcy':'\u0447','check':'\u2713','checkmark':'\u2713','Chi':'\u03A7','chi':'\u03C7','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cir':'\u25CB','cirE':'\u29C3','cire':'\u2257','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','Colone':'\u2A74','colone':'\u2254','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','Cscr':'\uD835\uDC9E','cscr':'\uD835\uDCB8','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cup':'\u222A','Cup':'\u22D3','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','Darr':'\u21A1','dArr':'\u21D3','dash':'\u2010','Dashv':'\u2AE4','dashv':'\u22A3','dbkarow':'\u290F','dblac':'\u02DD','Dcaron':'\u010E','dcaron':'\u010F','Dcy':'\u0414','dcy':'\u0434','ddagger':'\u2021','ddarr':'\u21CA','DD':'\u2145','dd':'\u2146','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','Delta':'\u0394','delta':'\u03B4','demptyv':'\u29B1','dfisht':'\u297F','Dfr':'\uD835\uDD07','dfr':'\uD835\uDD21','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','DJcy':'\u0402','djcy':'\u0452','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','Dopf':'\uD835\uDD3B','dopf':'\uD835\uDD55','Dot':'\xA8','dot':'\u02D9','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','DownArrowBar':'\u2913','downarrow':'\u2193','DownArrow':'\u2193','Downarrow':'\u21D3','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVectorBar':'\u2956','DownLeftVector':'\u21BD','DownRightTeeVector':'\u295F','DownRightVectorBar':'\u2957','DownRightVector':'\u21C1','DownTeeArrow':'\u21A7','DownTee':'\u22A4','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','Dscr':'\uD835\uDC9F','dscr':'\uD835\uDCB9','DScy':'\u0405','dscy':'\u0455','dsol':'\u29F6','Dstrok':'\u0110','dstrok':'\u0111','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','DZcy':'\u040F','dzcy':'\u045F','dzigrarr':'\u27FF','Eacute':'\xC9','eacute':'\xE9','easter':'\u2A6E','Ecaron':'\u011A','ecaron':'\u011B','Ecirc':'\xCA','ecirc':'\xEA','ecir':'\u2256','ecolon':'\u2255','Ecy':'\u042D','ecy':'\u044D','eDDot':'\u2A77','Edot':'\u0116','edot':'\u0117','eDot':'\u2251','ee':'\u2147','efDot':'\u2252','Efr':'\uD835\uDD08','efr':'\uD835\uDD22','eg':'\u2A9A','Egrave':'\xC8','egrave':'\xE8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','Emacr':'\u0112','emacr':'\u0113','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp13':'\u2004','emsp14':'\u2005','emsp':'\u2003','ENG':'\u014A','eng':'\u014B','ensp':'\u2002','Eogon':'\u0118','eogon':'\u0119','Eopf':'\uD835\uDD3C','eopf':'\uD835\uDD56','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','Epsilon':'\u0395','epsilon':'\u03B5','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','Esim':'\u2A73','esim':'\u2242','Eta':'\u0397','eta':'\u03B7','ETH':'\xD0','eth':'\xF0','Euml':'\xCB','euml':'\xEB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','Fcy':'\u0424','fcy':'\u0444','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','Ffr':'\uD835\uDD09','ffr':'\uD835\uDD23','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','Fopf':'\uD835\uDD3D','fopf':'\uD835\uDD57','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','Gamma':'\u0393','gamma':'\u03B3','Gammad':'\u03DC','gammad':'\u03DD','gap':'\u2A86','Gbreve':'\u011E','gbreve':'\u011F','Gcedil':'\u0122','Gcirc':'\u011C','gcirc':'\u011D','Gcy':'\u0413','gcy':'\u0433','Gdot':'\u0120','gdot':'\u0121','ge':'\u2265','gE':'\u2267','gEl':'\u2A8C','gel':'\u22DB','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','gescc':'\u2AA9','ges':'\u2A7E','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','Gfr':'\uD835\uDD0A','gfr':'\uD835\uDD24','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','GJcy':'\u0403','gjcy':'\u0453','gla':'\u2AA5','gl':'\u2277','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','Gopf':'\uD835\uDD3E','gopf':'\uD835\uDD58','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','Gscr':'\uD835\uDCA2','gscr':'\u210A','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gtcc':'\u2AA7','gtcir':'\u2A7A','gt':'>','GT':'>','Gt':'\u226B','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','HARDcy':'\u042A','hardcy':'\u044A','harrcir':'\u2948','harr':'\u2194','hArr':'\u21D4','harrw':'\u21AD','Hat':'^','hbar':'\u210F','Hcirc':'\u0124','hcirc':'\u0125','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','Hstrok':'\u0126','hstrok':'\u0127','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','Iacute':'\xCD','iacute':'\xED','ic':'\u2063','Icirc':'\xCE','icirc':'\xEE','Icy':'\u0418','icy':'\u0438','Idot':'\u0130','IEcy':'\u0415','iecy':'\u0435','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','Igrave':'\xCC','igrave':'\xEC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','IJlig':'\u0132','ijlig':'\u0133','Imacr':'\u012A','imacr':'\u012B','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','Im':'\u2111','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','incare':'\u2105','in':'\u2208','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','intcal':'\u22BA','int':'\u222B','Int':'\u222C','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','IOcy':'\u0401','iocy':'\u0451','Iogon':'\u012E','iogon':'\u012F','Iopf':'\uD835\uDD40','iopf':'\uD835\uDD5A','Iota':'\u0399','iota':'\u03B9','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','Itilde':'\u0128','itilde':'\u0129','Iukcy':'\u0406','iukcy':'\u0456','Iuml':'\xCF','iuml':'\xEF','Jcirc':'\u0134','jcirc':'\u0135','Jcy':'\u0419','jcy':'\u0439','Jfr':'\uD835\uDD0D','jfr':'\uD835\uDD27','jmath':'\u0237','Jopf':'\uD835\uDD41','jopf':'\uD835\uDD5B','Jscr':'\uD835\uDCA5','jscr':'\uD835\uDCBF','Jsercy':'\u0408','jsercy':'\u0458','Jukcy':'\u0404','jukcy':'\u0454','Kappa':'\u039A','kappa':'\u03BA','kappav':'\u03F0','Kcedil':'\u0136','kcedil':'\u0137','Kcy':'\u041A','kcy':'\u043A','Kfr':'\uD835\uDD0E','kfr':'\uD835\uDD28','kgreen':'\u0138','KHcy':'\u0425','khcy':'\u0445','KJcy':'\u040C','kjcy':'\u045C','Kopf':'\uD835\uDD42','kopf':'\uD835\uDD5C','Kscr':'\uD835\uDCA6','kscr':'\uD835\uDCC0','lAarr':'\u21DA','Lacute':'\u0139','lacute':'\u013A','laemptyv':'\u29B4','lagran':'\u2112','Lambda':'\u039B','lambda':'\u03BB','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larrb':'\u21E4','larrbfs':'\u291F','larr':'\u2190','Larr':'\u219E','lArr':'\u21D0','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','latail':'\u2919','lAtail':'\u291B','lat':'\u2AAB','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','Lcaron':'\u013D','lcaron':'\u013E','Lcedil':'\u013B','lcedil':'\u013C','lceil':'\u2308','lcub':'{','Lcy':'\u041B','lcy':'\u043B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','LeftArrowBar':'\u21E4','leftarrow':'\u2190','LeftArrow':'\u2190','Leftarrow':'\u21D0','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVectorBar':'\u2959','LeftDownVector':'\u21C3','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','LeftRightArrow':'\u2194','Leftrightarrow':'\u21D4','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTeeArrow':'\u21A4','LeftTee':'\u22A3','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangleBar':'\u29CF','LeftTriangle':'\u22B2','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVectorBar':'\u2958','LeftUpVector':'\u21BF','LeftVectorBar':'\u2952','LeftVector':'\u21BC','lEg':'\u2A8B','leg':'\u22DA','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','lescc':'\u2AA8','les':'\u2A7D','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','Lfr':'\uD835\uDD0F','lfr':'\uD835\uDD29','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','LJcy':'\u0409','ljcy':'\u0459','llarr':'\u21C7','ll':'\u226A','Ll':'\u22D8','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','Lmidot':'\u013F','lmidot':'\u0140','lmoustache':'\u23B0','lmoust':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','LongLeftArrow':'\u27F5','Longleftarrow':'\u27F8','longleftrightarrow':'\u27F7','LongLeftRightArrow':'\u27F7','Longleftrightarrow':'\u27FA','longmapsto':'\u27FC','longrightarrow':'\u27F6','LongRightArrow':'\u27F6','Longrightarrow':'\u27F9','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','Lopf':'\uD835\uDD43','lopf':'\uD835\uDD5D','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','Lstrok':'\u0141','lstrok':'\u0142','ltcc':'\u2AA6','ltcir':'\u2A79','lt':'<','LT':'<','Lt':'\u226A','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','Map':'\u2905','map':'\u21A6','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','Mcy':'\u041C','mcy':'\u043C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','Mfr':'\uD835\uDD10','mfr':'\uD835\uDD2A','mho':'\u2127','micro':'\xB5','midast':'*','midcir':'\u2AF0','mid':'\u2223','middot':'\xB7','minusb':'\u229F','minus':'\u2212','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','Mopf':'\uD835\uDD44','mopf':'\uD835\uDD5E','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','Mu':'\u039C','mu':'\u03BC','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','Nacute':'\u0143','nacute':'\u0144','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natural':'\u266E','naturals':'\u2115','natur':'\u266E','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','Ncaron':'\u0147','ncaron':'\u0148','Ncedil':'\u0145','ncedil':'\u0146','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','Ncy':'\u041D','ncy':'\u043D','ndash':'\u2013','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','ne':'\u2260','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','Nfr':'\uD835\uDD11','nfr':'\uD835\uDD2B','ngE':'\u2267\u0338','nge':'\u2271','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','nGt':'\u226B\u20D2','ngt':'\u226F','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','NJcy':'\u040A','njcy':'\u045A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nlE':'\u2266\u0338','nle':'\u2270','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nLt':'\u226A\u20D2','nlt':'\u226E','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','Not':'\u2AEC','not':'\xAC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangle':'\u22EA','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangle':'\u22EB','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','nparallel':'\u2226','npar':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','nprec':'\u2280','npreceq':'\u2AAF\u0338','npre':'\u2AAF\u0338','nrarrc':'\u2933\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','Nscr':'\uD835\uDCA9','nscr':'\uD835\uDCC3','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsubE':'\u2AC5\u0338','nsube':'\u2288','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupE':'\u2AC6\u0338','nsupe':'\u2289','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','Ntilde':'\xD1','ntilde':'\xF1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','Nu':'\u039D','nu':'\u03BD','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','Oacute':'\xD3','oacute':'\xF3','oast':'\u229B','Ocirc':'\xD4','ocirc':'\xF4','ocir':'\u229A','Ocy':'\u041E','ocy':'\u043E','odash':'\u229D','Odblac':'\u0150','odblac':'\u0151','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','OElig':'\u0152','oelig':'\u0153','ofcir':'\u29BF','Ofr':'\uD835\uDD12','ofr':'\uD835\uDD2C','ogon':'\u02DB','Ograve':'\xD2','ograve':'\xF2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','Omacr':'\u014C','omacr':'\u014D','Omega':'\u03A9','omega':'\u03C9','Omicron':'\u039F','omicron':'\u03BF','omid':'\u29B6','ominus':'\u2296','Oopf':'\uD835\uDD46','oopf':'\uD835\uDD60','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','orarr':'\u21BB','Or':'\u2A54','or':'\u2228','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','Oscr':'\uD835\uDCAA','oscr':'\u2134','Oslash':'\xD8','oslash':'\xF8','osol':'\u2298','Otilde':'\xD5','otilde':'\xF5','otimesas':'\u2A36','Otimes':'\u2A37','otimes':'\u2297','Ouml':'\xD6','ouml':'\xF6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','para':'\xB6','parallel':'\u2225','par':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','Pcy':'\u041F','pcy':'\u043F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','Pfr':'\uD835\uDD13','pfr':'\uD835\uDD2D','Phi':'\u03A6','phi':'\u03C6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','Pi':'\u03A0','pi':'\u03C0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plus':'+','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','prap':'\u2AB7','Pr':'\u2ABB','pr':'\u227A','prcue':'\u227C','precapprox':'\u2AB7','prec':'\u227A','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','pre':'\u2AAF','prE':'\u2AB3','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportional':'\u221D','Proportion':'\u2237','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','Pscr':'\uD835\uDCAB','pscr':'\uD835\uDCC5','Psi':'\u03A8','psi':'\u03C8','puncsp':'\u2008','Qfr':'\uD835\uDD14','qfr':'\uD835\uDD2E','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','Qscr':'\uD835\uDCAC','qscr':'\uD835\uDCC6','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','Racute':'\u0154','racute':'\u0155','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarr':'\u2192','Rarr':'\u21A0','rArr':'\u21D2','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','Rarrtl':'\u2916','rarrtl':'\u21A3','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','Rcaron':'\u0158','rcaron':'\u0159','Rcedil':'\u0156','rcedil':'\u0157','rceil':'\u2309','rcub':'}','Rcy':'\u0420','rcy':'\u0440','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','Re':'\u211C','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','Rho':'\u03A1','rho':'\u03C1','rhov':'\u03F1','RightAngleBracket':'\u27E9','RightArrowBar':'\u21E5','rightarrow':'\u2192','RightArrow':'\u2192','Rightarrow':'\u21D2','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVectorBar':'\u2955','RightDownVector':'\u21C2','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTeeArrow':'\u21A6','RightTee':'\u22A2','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangleBar':'\u29D0','RightTriangle':'\u22B3','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVectorBar':'\u2954','RightUpVector':'\u21BE','RightVectorBar':'\u2953','RightVector':'\u21C0','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoustache':'\u23B1','rmoust':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','Sacute':'\u015A','sacute':'\u015B','sbquo':'\u201A','scap':'\u2AB8','Scaron':'\u0160','scaron':'\u0161','Sc':'\u2ABC','sc':'\u227B','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','Scedil':'\u015E','scedil':'\u015F','Scirc':'\u015C','scirc':'\u015D','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','Scy':'\u0421','scy':'\u0441','sdotb':'\u22A1','sdot':'\u22C5','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','Sfr':'\uD835\uDD16','sfr':'\uD835\uDD30','sfrown':'\u2322','sharp':'\u266F','SHCHcy':'\u0429','shchcy':'\u0449','SHcy':'\u0428','shcy':'\u0448','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','Sigma':'\u03A3','sigma':'\u03C3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','SOFTcy':'\u042C','softcy':'\u044C','solbar':'\u233F','solb':'\u29C4','sol':'/','Sopf':'\uD835\uDD4A','sopf':'\uD835\uDD64','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squ':'\u25A1','squf':'\u25AA','srarr':'\u2192','Sscr':'\uD835\uDCAE','sscr':'\uD835\uDCC8','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','Star':'\u22C6','star':'\u2606','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','subE':'\u2AC5','sube':'\u2286','subedot':'\u2AC3','submult':'\u2AC1','subnE':'\u2ACB','subne':'\u228A','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succapprox':'\u2AB8','succ':'\u227B','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','sup':'\u2283','Sup':'\u22D1','supdot':'\u2ABE','supdsub':'\u2AD8','supE':'\u2AC6','supe':'\u2287','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supnE':'\u2ACC','supne':'\u228B','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','Tau':'\u03A4','tau':'\u03C4','tbrk':'\u23B4','Tcaron':'\u0164','tcaron':'\u0165','Tcedil':'\u0162','tcedil':'\u0163','Tcy':'\u0422','tcy':'\u0442','tdot':'\u20DB','telrec':'\u2315','Tfr':'\uD835\uDD17','tfr':'\uD835\uDD31','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','Theta':'\u0398','theta':'\u03B8','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','ThinSpace':'\u2009','thinsp':'\u2009','thkap':'\u2248','thksim':'\u223C','THORN':'\xDE','thorn':'\xFE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','timesbar':'\u2A31','timesb':'\u22A0','times':'\xD7','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','topbot':'\u2336','topcir':'\u2AF1','top':'\u22A4','Topf':'\uD835\uDD4B','topf':'\uD835\uDD65','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','Tscr':'\uD835\uDCAF','tscr':'\uD835\uDCC9','TScy':'\u0426','tscy':'\u0446','TSHcy':'\u040B','tshcy':'\u045B','Tstrok':'\u0166','tstrok':'\u0167','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','Uacute':'\xDA','uacute':'\xFA','uarr':'\u2191','Uarr':'\u219F','uArr':'\u21D1','Uarrocir':'\u2949','Ubrcy':'\u040E','ubrcy':'\u045E','Ubreve':'\u016C','ubreve':'\u016D','Ucirc':'\xDB','ucirc':'\xFB','Ucy':'\u0423','ucy':'\u0443','udarr':'\u21C5','Udblac':'\u0170','udblac':'\u0171','udhar':'\u296E','ufisht':'\u297E','Ufr':'\uD835\uDD18','ufr':'\uD835\uDD32','Ugrave':'\xD9','ugrave':'\xF9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','Umacr':'\u016A','umacr':'\u016B','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','Uogon':'\u0172','uogon':'\u0173','Uopf':'\uD835\uDD4C','uopf':'\uD835\uDD66','UpArrowBar':'\u2912','uparrow':'\u2191','UpArrow':'\u2191','Uparrow':'\u21D1','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','UpDownArrow':'\u2195','Updownarrow':'\u21D5','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','Upsilon':'\u03A5','upsilon':'\u03C5','UpTeeArrow':'\u21A5','UpTee':'\u22A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','Uring':'\u016E','uring':'\u016F','urtri':'\u25F9','Uscr':'\uD835\uDCB0','uscr':'\uD835\uDCCA','utdot':'\u22F0','Utilde':'\u0168','utilde':'\u0169','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','Uuml':'\xDC','uuml':'\xFC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','Vcy':'\u0412','vcy':'\u0432','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','veebar':'\u22BB','vee':'\u2228','Vee':'\u22C1','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','Vfr':'\uD835\uDD19','vfr':'\uD835\uDD33','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','Vopf':'\uD835\uDD4D','vopf':'\uD835\uDD67','vprop':'\u221D','vrtri':'\u22B3','Vscr':'\uD835\uDCB1','vscr':'\uD835\uDCCB','vsubnE':'\u2ACB\uFE00','vsubne':'\u228A\uFE00','vsupnE':'\u2ACC\uFE00','vsupne':'\u228B\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','Wcirc':'\u0174','wcirc':'\u0175','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','Wfr':'\uD835\uDD1A','wfr':'\uD835\uDD34','Wopf':'\uD835\uDD4E','wopf':'\uD835\uDD68','wp':'\u2118','wr':'\u2240','wreath':'\u2240','Wscr':'\uD835\uDCB2','wscr':'\uD835\uDCCC','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','Xfr':'\uD835\uDD1B','xfr':'\uD835\uDD35','xharr':'\u27F7','xhArr':'\u27FA','Xi':'\u039E','xi':'\u03BE','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','Xopf':'\uD835\uDD4F','xopf':'\uD835\uDD69','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','Xscr':'\uD835\uDCB3','xscr':'\uD835\uDCCD','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','Yacute':'\xDD','yacute':'\xFD','YAcy':'\u042F','yacy':'\u044F','Ycirc':'\u0176','ycirc':'\u0177','Ycy':'\u042B','ycy':'\u044B','yen':'\xA5','Yfr':'\uD835\uDD1C','yfr':'\uD835\uDD36','YIcy':'\u0407','yicy':'\u0457','Yopf':'\uD835\uDD50','yopf':'\uD835\uDD6A','Yscr':'\uD835\uDCB4','yscr':'\uD835\uDCCE','YUcy':'\u042E','yucy':'\u044E','yuml':'\xFF','Yuml':'\u0178','Zacute':'\u0179','zacute':'\u017A','Zcaron':'\u017D','zcaron':'\u017E','Zcy':'\u0417','zcy':'\u0437','Zdot':'\u017B','zdot':'\u017C','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','Zeta':'\u0396','zeta':'\u03B6','zfr':'\uD835\uDD37','Zfr':'\u2128','ZHcy':'\u0416','zhcy':'\u0436','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','Zscr':'\uD835\uDCB5','zscr':'\uD835\uDCCF','zwj':'\u200D','zwnj':'\u200C'};
- var decodeMapLegacy = {'Aacute':'\xC1','aacute':'\xE1','Acirc':'\xC2','acirc':'\xE2','acute':'\xB4','AElig':'\xC6','aelig':'\xE6','Agrave':'\xC0','agrave':'\xE0','amp':'&','AMP':'&','Aring':'\xC5','aring':'\xE5','Atilde':'\xC3','atilde':'\xE3','Auml':'\xC4','auml':'\xE4','brvbar':'\xA6','Ccedil':'\xC7','ccedil':'\xE7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','Eacute':'\xC9','eacute':'\xE9','Ecirc':'\xCA','ecirc':'\xEA','Egrave':'\xC8','egrave':'\xE8','ETH':'\xD0','eth':'\xF0','Euml':'\xCB','euml':'\xEB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','Iacute':'\xCD','iacute':'\xED','Icirc':'\xCE','icirc':'\xEE','iexcl':'\xA1','Igrave':'\xCC','igrave':'\xEC','iquest':'\xBF','Iuml':'\xCF','iuml':'\xEF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','Ntilde':'\xD1','ntilde':'\xF1','Oacute':'\xD3','oacute':'\xF3','Ocirc':'\xD4','ocirc':'\xF4','Ograve':'\xD2','ograve':'\xF2','ordf':'\xAA','ordm':'\xBA','Oslash':'\xD8','oslash':'\xF8','Otilde':'\xD5','otilde':'\xF5','Ouml':'\xD6','ouml':'\xF6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','THORN':'\xDE','thorn':'\xFE','times':'\xD7','Uacute':'\xDA','uacute':'\xFA','Ucirc':'\xDB','ucirc':'\xFB','Ugrave':'\xD9','ugrave':'\xF9','uml':'\xA8','Uuml':'\xDC','uuml':'\xFC','Yacute':'\xDD','yacute':'\xFD','yen':'\xA5','yuml':'\xFF'};
- var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'};
- var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];
-
- /*--------------------------------------------------------------------------*/
-
- var stringFromCharCode = String.fromCharCode;
-
- var object = {};
- var hasOwnProperty = object.hasOwnProperty;
- var has = function(object, propertyName) {
- return hasOwnProperty.call(object, propertyName);
- };
-
- var contains = function(array, value) {
- var index = -1;
- var length = array.length;
- while (++index < length) {
- if (array[index] == value) {
- return true;
- }
- }
- return false;
- };
-
- var merge = function(options, defaults) {
- if (!options) {
- return defaults;
- }
- var result = {};
- var key;
- for (key in defaults) {
- // A `hasOwnProperty` check is not needed here, since only recognized
- // option names are used anyway. Any others are ignored.
- result[key] = has(options, key) ? options[key] : defaults[key];
- }
- return result;
- };
-
- // Modified version of `ucs2encode`; see http://mths.be/punycode.
- var codePointToSymbol = function(codePoint, strict) {
- var output = '';
- if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
- // See issue #4:
- // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
- // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
- // REPLACEMENT CHARACTER.”
- if (strict) {
- parseError('character reference outside the permissible Unicode range');
- }
- return '\uFFFD';
- }
- if (has(decodeMapNumeric, codePoint)) {
- if (strict) {
- parseError('disallowed character reference');
- }
- return decodeMapNumeric[codePoint];
- }
- if (strict && contains(invalidReferenceCodePoints, codePoint)) {
- parseError('disallowed character reference');
- }
- if (codePoint > 0xFFFF) {
- codePoint -= 0x10000;
- output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
- codePoint = 0xDC00 | codePoint & 0x3FF;
- }
- output += stringFromCharCode(codePoint);
- return output;
- };
-
- var hexEscape = function(symbol) {
- return '' + symbol.charCodeAt(0).toString(16).toUpperCase() + ';';
- };
-
- var parseError = function(message) {
- throw Error('Parse error: ' + message);
- };
-
- /*--------------------------------------------------------------------------*/
-
- var encode = function(string, options) {
- options = merge(options, encode.options);
- var strict = options.strict;
- if (strict && regexInvalidRawCodePoint.test(string)) {
- parseError('forbidden code point');
- }
- var encodeEverything = options.encodeEverything;
- var useNamedReferences = options.useNamedReferences;
- var allowUnsafeSymbols = options.allowUnsafeSymbols;
- if (encodeEverything) {
- // Encode ASCII symbols.
- string = string.replace(regexAsciiWhitelist, function(symbol) {
- // Use named references if requested & possible.
- if (useNamedReferences && has(encodeMap, symbol)) {
- return '&' + encodeMap[symbol] + ';';
- }
- return hexEscape(symbol);
- });
- // Shorten a few escapes that represent two symbols, of which at least one
- // is within the ASCII range.
- if (useNamedReferences) {
- string = string
- .replace(/>\u20D2/g, '>⃒')
- .replace(/<\u20D2/g, '<⃒')
- .replace(/fj/g, 'fj');
- }
- // Encode non-ASCII symbols.
- if (useNamedReferences) {
- // Encode non-ASCII symbols that can be replaced with a named reference.
- string = string.replace(regexEncodeNonAscii, function(string) {
- // Note: there is no need to check `has(encodeMap, string)` here.
- return '&' + encodeMap[string] + ';';
- });
- }
- // Note: any remaining non-ASCII symbols are handled outside of the `if`.
- } else if (useNamedReferences) {
- // Apply named character references.
- // Encode `<>"'&` using named character references.
- if (!allowUnsafeSymbols) {
- string = string.replace(regexEscape, function(string) {
- return '&' + encodeMap[string] + ';'; // no need to check `has()` here
- });
- }
- // Shorten escapes that represent two symbols, of which at least one is
- // `<>"'&`.
- string = string
- .replace(/>\u20D2/g, '>⃒')
- .replace(/<\u20D2/g, '<⃒');
- // Encode non-ASCII symbols that can be replaced with a named reference.
- string = string.replace(regexEncodeNonAscii, function(string) {
- // Note: there is no need to check `has(encodeMap, string)` here.
- return '&' + encodeMap[string] + ';';
- });
- } else if (!allowUnsafeSymbols) {
- // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
- // using named character references.
- string = string.replace(regexEscape, hexEscape);
- }
- return string
- // Encode astral symbols.
- .replace(regexAstralSymbols, function($0) {
- // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
- var high = $0.charCodeAt(0);
- var low = $0.charCodeAt(1);
- var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
- return '' + codePoint.toString(16).toUpperCase() + ';';
- })
- // Encode any remaining BMP symbols that are not printable ASCII symbols
- // using a hexadecimal escape.
- .replace(regexBmpWhitelist, hexEscape);
- };
- // Expose default options (so they can be overridden globally).
- encode.options = {
- 'allowUnsafeSymbols': false,
- 'encodeEverything': false,
- 'strict': false,
- 'useNamedReferences': false
- };
-
- var decode = function(html, options) {
- options = merge(options, decode.options);
- var strict = options.strict;
- if (strict && regexInvalidEntity.test(html)) {
- parseError('malformed character reference');
- }
- return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7) {
- var codePoint;
- var semicolon;
- var hexDigits;
- var reference;
- var next;
- if ($1) {
- // Decode decimal escapes, e.g. `𝌆`.
- codePoint = $1;
- semicolon = $2;
- if (strict && !semicolon) {
- parseError('character reference was not terminated by a semicolon');
- }
- return codePointToSymbol(codePoint, strict);
- }
- if ($3) {
- // Decode hexadecimal escapes, e.g. `𝌆`.
- hexDigits = $3;
- semicolon = $4;
- if (strict && !semicolon) {
- parseError('character reference was not terminated by a semicolon');
- }
- codePoint = parseInt(hexDigits, 16);
- return codePointToSymbol(codePoint, strict);
- }
- if ($5) {
- // Decode named character references with trailing `;`, e.g. `©`.
- reference = $5;
- if (has(decodeMap, reference)) {
- return decodeMap[reference];
- } else {
- // Ambiguous ampersand; see http://mths.be/notes/ambiguous-ampersands.
- if (strict) {
- parseError(
- 'named character reference was not terminated by a semicolon'
- );
- }
- return $0;
- }
- }
- // If we’re still here, it’s a legacy reference for sure. No need for an
- // extra `if` check.
- // Decode named character references without trailing `;`, e.g. `&`
- // This is only a parse error if it gets converted to `&`, or if it is
- // followed by `=` in an attribute context.
- reference = $6;
- next = $7;
- if (next && options.isAttributeValue) {
- if (strict && next == '=') {
- parseError('`&` did not start a character reference');
- }
- return $0;
- } else {
- if (strict) {
- parseError(
- 'named character reference was not terminated by a semicolon'
- );
- }
- // Note: there is no need to check `has(decodeMapLegacy, reference)`.
- return decodeMapLegacy[reference] + (next || '');
- }
- });
- };
- // Expose default options (so they can be overridden globally).
- decode.options = {
- 'isAttributeValue': false,
- 'strict': false
- };
-
- var escape = function(string) {
- return string.replace(regexEscape, function($0) {
- // Note: there is no need to check `has(escapeMap, $0)` here.
- return escapeMap[$0];
- });
- };
-
- /*--------------------------------------------------------------------------*/
-
- var he = {
- 'version': '0.5.0',
- 'encode': encode,
- 'decode': decode,
- 'escape': escape,
- 'unescape': decode
- };
-
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define(function() {
- return he;
- });
- } else if (freeExports && !freeExports.nodeType) {
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
- freeModule.exports = he;
- } else { // in Narwhal or RingoJS v0.7.0-
- for (var key in he) {
- has(he, key) && (freeExports[key] = he[key]);
- }
- }
- } else { // in Rhino or a web browser
- root.he = he;
- }
-
-}(this));
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/man/he.1 b/topics/01. Setup-NativeScript-environment/slides/node_modules/he/man/he.1
deleted file mode 100644
index 3a7e504..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/man/he.1
+++ /dev/null
@@ -1,78 +0,0 @@
-.Dd July 27, 2013
-.Dt he 1
-.Sh NAME
-.Nm he
-.Nd encode/decode HTML entities just like a browser would
-.Sh SYNOPSIS
-.Nm
-.Op Fl -escape Ar string
-.br
-.Op Fl -encode Ar string
-.br
-.Op Fl -encode Fl -use-named-refs Fl -everything Fl -allow-unsafe Ar string
-.br
-.Op Fl -decode Ar string
-.br
-.Op Fl -decode Fl -attribute Ar string
-.br
-.Op Fl -decode Fl -strict Ar string
-.br
-.Op Fl v | -version
-.br
-.Op Fl h | -help
-.Sh DESCRIPTION
-.Nm
-encodes/decodes HTML entities in strings just like a browser would.
-.Sh OPTIONS
-.Bl -ohang -offset
-.It Sy "--escape"
-Take a string of text and escape it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, and `'`.
-.It Sy "--encode"
-Take a string of text and encode any symbols that aren't printable ASCII symbols and that can be replaced with character references. For example, it would turn `©` into `©`, but it wouldn't turn `+` into `+` since there is no point in doing so. Additionally, it replaces any remaining non-ASCII symbols with a hexadecimal escape sequence (e.g. `𝌆`). The return value of this function is always valid HTML.
-.It Sy "--encode --use-named-refs"
-Enable the use of named character references (like `©`) in the output. If compatibility with older browsers is a concern, don't use this option.
-.It Sy "--encode --everything"
-Encode every symbol in the input string, even safe printable ASCII symbols.
-.It Sy "--encode --allow-unsafe"
-Encode non-ASCII characters only. This leaves unsafe HTML/XML symbols like `&`, `<`, `>`, `"`, and `'` intact.
-.It Sy "--decode"
-Takes a string of HTML and decode any named and numerical character references in it using the algorithm described in the HTML spec.
-.It Sy "--decode --attribute"
-Parse the input as if it was an HTML attribute value rather than a string in an HTML text content.
-.It Sy "--decode --strict"
-Throw an error if an invalid character reference is encountered.
-.It Sy "-v, --version"
-Print he's version.
-.It Sy "-h, --help"
-Show the help screen.
-.El
-.Sh EXIT STATUS
-The
-.Nm he
-utility exits with one of the following values:
-.Pp
-.Bl -tag -width flag -compact
-.It Li 0
-.Nm
-successfully encoded/decoded the input and printed the result.
-.It Li 1
-.Nm
-wasn't instructed to encode/decode anything (for example, the
-.Ar --help
-flag was set); or, an error occurred.
-.El
-.Sh EXAMPLES
-.Bl -ohang -offset
-.It Sy "he --escape ''"
-Print an escaped version of the given string that is safe for use in HTML text contexts, escaping only `&`, `<`, `>`, `"`, and `'`.
-.It Sy "he --decode '©𝌆'"
-Print the decoded version of the given HTML string.
-.It Sy "echo\ '©𝌆'\ |\ he --decode"
-Print the decoded version of the HTML string that gets piped in.
-.El
-.Sh BUGS
-he's bug tracker is located at .
-.Sh AUTHOR
-Mathias Bynens
-.Sh WWW
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/he/package.json
deleted file mode 100644
index e2bb588..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/he/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "_args": [
- [
- "he@^0.5.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "he@>=0.5.0 <0.6.0",
- "_id": "he@0.5.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/he",
- "_npmUser": {
- "email": "mathias@qiwi.be",
- "name": "mathias"
- },
- "_npmVersion": "1.4.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "he",
- "raw": "he@^0.5.0",
- "rawSpec": "^0.5.0",
- "scope": null,
- "spec": ">=0.5.0 <0.6.0",
- "type": "range"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz",
- "_shasum": "2c05ffaef90b68e860f3fd2b54ef580989277ee2",
- "_shrinkwrap": null,
- "_spec": "he@^0.5.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "name": "Mathias Bynens",
- "url": "https://mathiasbynens.be/"
- },
- "bin": {
- "he": "bin/he"
- },
- "bugs": {
- "url": "https://github.com/mathiasbynens/he/issues"
- },
- "dependencies": {},
- "description": "A robust HTML entities encoder/decoder with full Unicode support.",
- "devDependencies": {
- "coveralls": "^2.11.1",
- "grunt": "^0.4.5",
- "grunt-shell": "^1.0.1",
- "grunt-template": "^0.2.3",
- "istanbul": "^0.3.0",
- "jsesc": "^0.5.0",
- "lodash": "^2.4.1",
- "qunit-extras": "^1.1.0",
- "qunitjs": "~1.11.0",
- "regenerate": "^0.6.2",
- "requirejs": "^2.1.14",
- "string.fromcodepoint": "^0.2.1"
- },
- "directories": {
- "bin": "bin",
- "man": "man",
- "test": "tests"
- },
- "dist": {
- "shasum": "2c05ffaef90b68e860f3fd2b54ef580989277ee2",
- "tarball": "http://registry.npmjs.org/he/-/he-0.5.0.tgz"
- },
- "files": [
- "LICENSE-MIT.txt",
- "bin/",
- "he.js",
- "man/"
- ],
- "homepage": "http://mths.be/he",
- "keywords": [
- "decode",
- "encode",
- "entities",
- "entity",
- "html",
- "string",
- "unicode"
- ],
- "license": "MIT",
- "main": "he.js",
- "maintainers": [
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- }
- ],
- "man": [
- "/Users/mathias/.npm/he/0.5.0/package/man/he.1"
- ],
- "name": "he",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mathiasbynens/he.git"
- },
- "scripts": {
- "test": "node tests/tests.js"
- },
- "version": "0.5.0"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/.npmignore
deleted file mode 100644
index 081a48c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-test
-examples
-doc
-benchmark
-.travis.yml
-CHANGELOG.md
-UPGRADING.md
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/LICENSE
deleted file mode 100644
index 2bab4b9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-
- node-http-proxy
-
- Copyright (c) Nodejitsu 2013
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/README.md
deleted file mode 100644
index 0bc800f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/README.md
+++ /dev/null
@@ -1,419 +0,0 @@
-
-
-
-
-node-http-proxy
-=======
-
-`node-http-proxy` is an HTTP programmable proxying library that supports
-websockets. It is suitable for implementing components such as
-proxies and load balancers.
-
-### Installation
-
-`npm install http-proxy --save`
-
-### Build Status
-
-
-
-
-
-
-
-
-### Looking to Upgrade from 0.8.x ? Click [here](UPGRADING.md)
-
-### Core Concept
-
-A new proxy is created by calling `createProxyServer` and passing
-an `options` object as argument ([valid properties are available here](lib/http-proxy.js#L33-L50))
-
-```javascript
-var httpProxy = require('http-proxy');
-
-var proxy = httpProxy.createProxyServer(options);
-```
-
-An object will be returned with four values:
-
-* web `req, res, [options]` (used for proxying regular HTTP(S) requests)
-* ws `req, socket, head, [options]` (used for proxying WS(S) requests)
-* listen `port` (a function that wraps the object in a webserver, for your convenience)
-* close `[callback]` (a function that closes the inner webserver and stops listening on given port)
-
-It is then possible to proxy requests by calling these functions
-
-```javascript
-http.createServer(function(req, res) {
- proxy.web(req, res, { target: 'http://mytarget.com:8080' });
-});
-```
-
-Errors can be listened on either using the Event Emitter API
-
-```javascript
-proxy.on('error', function(e) {
- ...
-});
-```
-
-or using the callback API
-
-```javascript
-proxy.web(req, res, { target: 'http://mytarget.com:8080' }, function(e) { ... });
-```
-
-When a request is proxied it follows two different pipelines ([available here](lib/http-proxy/passes))
-which apply transformations to both the `req` and `res` object.
-The first pipeline (ingoing) is responsible for the creation and manipulation of the stream that connects your client to the target.
-The second pipeline (outgoing) is responsible for the creation and manipulation of the stream that, from your target, returns data
-to the client.
-
-
-#### Setup a basic stand-alone proxy server
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-//
-// Create your proxy server and set the target in the options.
-//
-httpProxy.createProxyServer({target:'http://localhost:9000'}).listen(8000);
-
-//
-// Create your target server
-//
-http.createServer(function (req, res) {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2));
- res.end();
-}).listen(9000);
-```
-
-#### Setup a stand-alone proxy server with custom server logic
-This example show how you can proxy a request using your own HTTP server
-and also you can put your own logic to handle the request.
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-
-//
-// Create a proxy server with custom application logic
-//
-var proxy = httpProxy.createProxyServer({});
-
-//
-// Create your custom server and just call `proxy.web()` to proxy
-// a web request to the target passed in the options
-// also you can use `proxy.ws()` to proxy a websockets request
-//
-var server = http.createServer(function(req, res) {
- // You can define here your custom logic to handle the request
- // and then proxy the request.
- proxy.web(req, res, { target: 'http://127.0.0.1:5060' });
-});
-
-console.log("listening on port 5050")
-server.listen(5050);
-```
-#### Modify a response from a proxied server
-Sometimes when you have received a HTML/XML document from the server of origin you would like to modify it before forwarding it on.
-
-[Harmon](https://github.com/No9/harmon) allows you to do this in a streaming style so as to keep the pressure on the proxy to a minimum.
-
-
-#### Setup a stand-alone proxy server with proxy request header re-writing
-This example shows how you can proxy a request using your own HTTP server that
-modifies the outgoing proxy request by adding a special header.
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-
-//
-// Create a proxy server with custom application logic
-//
-var proxy = httpProxy.createProxyServer({});
-
-// To modify the proxy connection before data is sent, you can listen
-// for the 'proxyReq' event. When the event is fired, you will receive
-// the following arguments:
-// (http.ClientRequest proxyReq, http.IncomingMessage req,
-// http.ServerResponse res, Object options). This mechanism is useful when
-// you need to modify the proxy request before the proxy connection
-// is made to the target.
-//
-proxy.on('proxyReq', function(proxyReq, req, res, options) {
- proxyReq.setHeader('X-Special-Proxy-Header', 'foobar');
-});
-
-var server = http.createServer(function(req, res) {
- // You can define here your custom logic to handle the request
- // and then proxy the request.
- proxy.web(req, res, {
- target: 'http://127.0.0.1:5060'
- });
-});
-
-console.log("listening on port 5050")
-server.listen(5050);
-```
-
-#### Setup a stand-alone proxy server with latency
-
-```js
-var http = require('http'),
- httpProxy = require('http-proxy');
-
-//
-// Create a proxy server with latency
-//
-var proxy = httpProxy.createProxyServer();
-
-//
-// Create your server that makes an operation that waits a while
-// and then proxies the request
-//
-http.createServer(function (req, res) {
- // This simulates an operation that takes 500ms to execute
- setTimeout(function () {
- proxy.web(req, res, {
- target: 'http://localhost:9008'
- });
- }, 500);
-}).listen(8008);
-
-//
-// Create your target server
-//
-http.createServer(function (req, res) {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2));
- res.end();
-}).listen(9008);
-```
-
-#### Listening for proxy events
-
-* `error`: The error event is emitted if the request to the target fail.
-* `proxyReq`: This event is emitted before the data is sent. It gives you a chance to alter the proxyReq request object. Applies to "web" connections
-* `proxyReqWs`: This event is emitted before the data is sent. It gives you a chance to alter the proxyReq request object. Applies to "websocket" connections
-* `proxyRes`: This event is emitted if the request to the target got a response.
-* `open`: This event is emitted once the proxy websocket was created and piped into the target websocket.
-* `close`: This event is emitted once the proxy websocket was closed.
-* (DEPRECATED) `proxySocket`: Deprecated in favor of `open`.
-
-```js
-var httpProxy = require('http-proxy');
-// Error example
-//
-// Http Proxy Server with bad target
-//
-var proxy = httpProxy.createServer({
- target:'http://localhost:9005'
-});
-
-proxy.listen(8005);
-
-//
-// Listen for the `error` event on `proxy`.
-proxy.on('error', function (err, req, res) {
- res.writeHead(500, {
- 'Content-Type': 'text/plain'
- });
-
- res.end('Something went wrong. And we are reporting a custom error message.');
-});
-
-//
-// Listen for the `proxyRes` event on `proxy`.
-//
-proxy.on('proxyRes', function (proxyRes, req, res) {
- console.log('RAW Response from the target', JSON.stringify(proxyRes.headers, true, 2));
-});
-
-//
-// Listen for the `open` event on `proxy`.
-//
-proxy.on('open', function (proxySocket) {
- // listen for messages coming FROM the target here
- proxySocket.on('data', hybiParseAndLogMessage);
-});
-
-//
-// Listen for the `close` event on `proxy`.
-//
-proxy.on('close', function (req, socket, head) {
- // view disconnected websocket connections
- console.log('Client disconnected');
-});
-```
-
-#### Using HTTPS
-You can activate the validation of a secure SSL certificate to the target connection (avoid self signed certs), just set `secure: true` in the options.
-
-##### HTTPS -> HTTP
-
-```js
-//
-// Create the HTTPS proxy server in front of a HTTP server
-//
-httpProxy.createServer({
- target: {
- host: 'localhost',
- port: 9009
- },
- ssl: {
- key: fs.readFileSync('valid-ssl-key.pem', 'utf8'),
- cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8')
- }
-}).listen(8009);
-```
-
-##### HTTPS -> HTTPS
-
-```js
-//
-// Create the proxy server listening on port 443
-//
-httpProxy.createServer({
- ssl: {
- key: fs.readFileSync('valid-ssl-key.pem', 'utf8'),
- cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8')
- },
- target: 'https://localhost:9010',
- secure: true // Depends on your needs, could be false.
-}).listen(443);
-```
-
-#### Proxying WebSockets
-You can activate the websocket support for the proxy using `ws:true` in the options.
-
-```js
-//
-// Create a proxy server for websockets
-//
-httpProxy.createServer({
- target: 'ws://localhost:9014',
- ws: true
-}).listen(8014);
-```
-
-Also you can proxy the websocket requests just calling the `ws(req, socket, head)` method.
-
-```js
-//
-// Setup our server to proxy standard HTTP requests
-//
-var proxy = new httpProxy.createProxyServer({
- target: {
- host: 'localhost',
- port: 9015
- }
-});
-var proxyServer = http.createServer(function (req, res) {
- proxy.web(req, res);
-});
-
-//
-// Listen to the `upgrade` event and proxy the
-// WebSocket requests as well.
-//
-proxyServer.on('upgrade', function (req, socket, head) {
- proxy.ws(req, socket, head);
-});
-
-proxyServer.listen(8015);
-```
-
-### Contributing and Issues
-
-* Search on Google/Github
-* If you can't find anything, open an issue
-* If you feel comfortable about fixing the issue, fork the repo
-* Commit to your local branch (which must be different from `master`)
-* Submit your Pull Request (be sure to include tests and update documentation)
-
-### Options
-
-`httpProxy.createProxyServer` supports the following options:
-
-* **target**: url string to be parsed with the url module
-* **forward**: url string to be parsed with the url module
-* **agent**: object to be passed to http(s).request (see Node's [https agent](http://nodejs.org/api/https.html#https_class_https_agent) and [http agent](http://nodejs.org/api/http.html#http_class_http_agent) objects)
-* **ssl**: object to be passed to https.createServer()
-* **ws**: true/false, if you want to proxy websockets
-* **xfwd**: true/false, adds x-forward headers
-* **secure**: true/false, if you want to verify the SSL Certs
-* **toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
-* **prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path
-* **ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request
-* **localAddress**: Local interface string to bind for outgoing connections
-* **changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL
-* **auth**: Basic authentication i.e. 'user:password' to compute an Authorization header.
-* **hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
-* **autoRewrite**: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
-* **protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
-
-**NOTE:**
-`options.ws` and `options.ssl` are optional.
-`options.target` and `options.forward` cannot both be missing
-
-If you are using the `proxyServer.listen` method, the following options are also applicable:
-
- * **ssl**: object to be passed to https.createServer()
- * **ws**: true/false, if you want to proxy websockets
-
-### Shutdown
-
-* When testing or running server within another program it may be necessary to close the proxy.
-* This will stop the proxy from accepting new connections.
-
-```js
-var proxy = new httpProxy.createProxyServer({
- target: {
- host: 'localhost',
- port: 1337
- }
-});
-
-proxy.close();
-```
-
-### Test
-
-```
-$ npm test
-```
-
-### Logo
-
-Logo created by [Diego Pasquali](http://dribbble.com/diegopq)
-
-### License
-
->The MIT License (MIT)
->
->Copyright (c) 2010 - 2013 Nodejitsu Inc.
->
->Permission is hereby granted, free of charge, to any person obtaining a copy
->of this software and associated documentation files (the "Software"), to deal
->in the Software without restriction, including without limitation the rights
->to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
->copies of the Software, and to permit persons to whom the Software is
->furnished to do so, subject to the following conditions:
->
->The above copyright notice and this permission notice shall be included in
->all copies or substantial portions of the Software.
->
->THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
->IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
->FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
->AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
->LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
->OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
->THE SOFTWARE.
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/index.js
deleted file mode 100644
index e6fac85..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*!
- * Caron dimonio, con occhi di bragia
- * loro accennando, tutte le raccoglie;
- * batte col remo qualunque s’adagia
- *
- * Charon the demon, with the eyes of glede,
- * Beckoning to them, collects them all together,
- * Beats with his oar whoever lags behind
- *
- * Dante - The Divine Comedy (Canto III)
- */
-
-module.exports = require('./lib/http-proxy');
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy.js
deleted file mode 100644
index 365aced..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var http = require('http'),
- https = require('https'),
- url = require('url'),
- httpProxy = require('./http-proxy/');
-
-/**
- * Export the proxy "Server" as the main export.
- */
-module.exports = httpProxy.Server;
-
-/**
- * Creates the proxy server.
- *
- * Examples:
- *
- * httpProxy.createProxyServer({ .. }, 8000)
- * // => '{ web: [Function], ws: [Function] ... }'
- *
- * @param {Object} Options Config object passed to the proxy
- *
- * @return {Object} Proxy Proxy object with handlers for `ws` and `web` requests
- *
- * @api public
- */
-
-module.exports.createProxyServer =
- module.exports.createServer =
- module.exports.createProxy = function createProxyServer(options) {
- /*
- * `options` is needed and it must have the following layout:
- *
- * {
- * target :
- * forward:
- * agent :
- * ssl :
- * ws :
- * xfwd :
- * secure :
- * toProxy:
- * prependPath:
- * ignorePath:
- * localAddress :
- * changeOrigin:
- * auth : Basic authentication i.e. 'user:password' to compute an Authorization header.
- * hostRewrite: rewrites the location hostname on (301/302/307/308) redirects, Default: null.
- * autoRewrite: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
- * protocolRewrite: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
- * }
- *
- * NOTE: `options.ws` and `options.ssl` are optional.
- * `options.target and `options.forward` cannot be
- * both missing
- * }
- */
-
- return new httpProxy.Server(options);
-};
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/common.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/common.js
deleted file mode 100644
index 577f9b4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/common.js
+++ /dev/null
@@ -1,206 +0,0 @@
-var common = exports,
- url = require('url'),
- extend = require('util')._extend,
- required = require('requires-port');
-
-var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i,
- isSSL = /^https|wss/;
-
-/**
- * Simple Regex for testing if protocol is https
- */
-common.isSSL = isSSL;
-/**
- * Copies the right headers from `options` and `req` to
- * `outgoing` which is then used to fire the proxied
- * request.
- *
- * Examples:
- *
- * common.setupOutgoing(outgoing, options, req)
- * // => { host: ..., hostname: ...}
- *
- * @param {Object} Outgoing Base object to be filled with required properties
- * @param {Object} Options Config object passed to the proxy
- * @param {ClientRequest} Req Request Object
- * @param {String} Forward String to select forward or target
- *
- * @return {Object} Outgoing Object with all required properties set
- *
- * @api private
- */
-
-common.setupOutgoing = function(outgoing, options, req, forward) {
- outgoing.port = options[forward || 'target'].port ||
- (isSSL.test(options[forward || 'target'].protocol) ? 443 : 80);
-
- ['host', 'hostname', 'socketPath', 'pfx', 'key',
- 'passphrase', 'cert', 'ca', 'ciphers', 'secureProtocol'].forEach(
- function(e) { outgoing[e] = options[forward || 'target'][e]; }
- );
-
- outgoing.method = req.method;
- outgoing.headers = extend({}, req.headers);
-
- if (options.headers){
- extend(outgoing.headers, options.headers);
- }
-
- if (options.auth) {
- outgoing.auth = options.auth;
- }
-
- if (isSSL.test(options[forward || 'target'].protocol)) {
- outgoing.rejectUnauthorized = (typeof options.secure === "undefined") ? true : options.secure;
- }
-
-
- outgoing.agent = options.agent || false;
- outgoing.localAddress = options.localAddress;
-
- //
- // Remark: If we are false and not upgrading, set the connection: close. This is the right thing to do
- // as node core doesn't handle this COMPLETELY properly yet.
- //
- if (!outgoing.agent) {
- outgoing.headers = outgoing.headers || {};
- if (typeof outgoing.headers.connection !== 'string'
- || !upgradeHeader.test(outgoing.headers.connection)
- ) { outgoing.headers.connection = 'close'; }
- }
-
-
- // the final path is target path + relative path requested by user:
- var target = options[forward || 'target'];
- var targetPath = target && options.prependPath !== false
- ? (target.path || '')
- : '';
-
- //
- // Remark: Can we somehow not use url.parse as a perf optimization?
- //
- var outgoingPath = !options.toProxy
- ? (url.parse(req.url).path || '')
- : req.url;
-
- //
- // Remark: ignorePath will just straight up ignore whatever the request's
- // path is. This can be labeled as FOOT-GUN material if you do not know what
- // you are doing and are using conflicting options.
- //
- outgoingPath = !options.ignorePath ? outgoingPath : '/';
-
- outgoing.path = common.urlJoin(targetPath, outgoingPath);
-
- if (options.changeOrigin) {
- outgoing.headers.host =
- required(outgoing.port, options[forward || 'target'].protocol) && !hasPort(outgoing.host)
- ? outgoing.host + ':' + outgoing.port
- : outgoing.host;
- }
- return outgoing;
-};
-
-/**
- * Set the proper configuration for sockets,
- * set no delay and set keep alive, also set
- * the timeout to 0.
- *
- * Examples:
- *
- * common.setupSocket(socket)
- * // => Socket
- *
- * @param {Socket} Socket instance to setup
- *
- * @return {Socket} Return the configured socket.
- *
- * @api private
- */
-
-common.setupSocket = function(socket) {
- socket.setTimeout(0);
- socket.setNoDelay(true);
-
- socket.setKeepAlive(true, 0);
-
- return socket;
-};
-
-/**
- * Get the port number from the host. Or guess it based on the connection type.
- *
- * @param {Request} req Incoming HTTP request.
- *
- * @return {String} The port number.
- *
- * @api private
- */
-common.getPort = function(req) {
- var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : '';
-
- return res ?
- res[1] :
- common.hasEncryptedConnection(req) ? '443' : '80';
-};
-
-/**
- * Check if the request has an encrypted connection.
- *
- * @param {Request} req Incoming HTTP request.
- *
- * @return {Boolean} Whether the connection is encrypted or not.
- *
- * @api private
- */
-common.hasEncryptedConnection = function(req) {
- return Boolean(req.connection.encrypted || req.connection.pair);
-};
-
-/**
- * OS-agnostic join (doesn't break on URLs like path.join does on Windows)>
- *
- * @return {String} The generated path.
- *
- * @api private
- */
-
-common.urlJoin = function() {
- //
- // We do not want to mess with the query string. All we want to touch is the path.
- //
- var args = Array.prototype.slice.call(arguments),
- lastIndex = args.length - 1,
- last = args[lastIndex],
- lastSegs = last.split('?'),
- retSegs;
-
- args[lastIndex] = lastSegs.shift();
-
- //
- // Join all strings, but remove empty strings so we don't get extra slashes from
- // joining e.g. ['', 'am']
- //
- retSegs = [
- args.filter(Boolean).join('/').replace(/\/+/g, '/').replace(/:\//g, '://')
- ];
-
- // Only join the query string if it exists so we don't have trailing a '?'
- // on every request
-
- // Handle case where there could be multiple ? in the URL.
- retSegs.push.apply(retSegs, lastSegs);
-
- return retSegs.join('?')
-};
-
-/**
- * Check the host and see if it potentially has a port in it (keep it simple)
- *
- * @returns {Boolean} Whether we have one or not
- *
- * @api private
- */
-function hasPort(host) {
- return !!~host.indexOf(':');
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/index.js
deleted file mode 100644
index 7a5e1d2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/index.js
+++ /dev/null
@@ -1,184 +0,0 @@
-var httpProxy = exports,
- extend = require('util')._extend,
- parse_url = require('url').parse,
- EE3 = require('eventemitter3'),
- http = require('http'),
- https = require('https'),
- web = require('./passes/web-incoming'),
- ws = require('./passes/ws-incoming');
-
-httpProxy.Server = ProxyServer;
-
-/**
- * Returns a function that creates the loader for
- * either `ws` or `web`'s passes.
- *
- * Examples:
- *
- * httpProxy.createRightProxy('ws')
- * // => [Function]
- *
- * @param {String} Type Either 'ws' or 'web'
- *
- * @return {Function} Loader Function that when called returns an iterator for the right passes
- *
- * @api private
- */
-
-function createRightProxy(type) {
-
- return function(options) {
- return function(req, res /*, [head], [opts] */) {
- var passes = (type === 'ws') ? this.wsPasses : this.webPasses,
- args = [].slice.call(arguments),
- cntr = args.length - 1,
- head, cbl;
-
- /* optional args parse begin */
- if(typeof args[cntr] === 'function') {
- cbl = args[cntr];
-
- cntr--;
- }
-
- if(
- !(args[cntr] instanceof Buffer) &&
- args[cntr] !== res
- ) {
- //Copy global options
- options = extend({}, options);
- //Overwrite with request options
- extend(options, args[cntr]);
-
- cntr--;
- }
-
- if(args[cntr] instanceof Buffer) {
- head = args[cntr];
- }
-
- /* optional args parse end */
-
- ['target', 'forward'].forEach(function(e) {
- if (typeof options[e] === 'string')
- options[e] = parse_url(options[e]);
- });
-
- if (!options.target && !options.forward) {
- return this.emit('error', new Error('Must provide a proper URL as target'));
- }
-
- for(var i=0; i < passes.length; i++) {
- /**
- * Call of passes functions
- * pass(req, res, options, head)
- *
- * In WebSockets case the `res` variable
- * refer to the connection socket
- * pass(req, socket, options, head)
- */
- if(passes[i](req, res, options, head, this, cbl)) { // passes can return a truthy value to halt the loop
- break;
- }
- }
- };
- };
-}
-httpProxy.createRightProxy = createRightProxy;
-
-function ProxyServer(options) {
- EE3.call(this);
-
- options = options || {};
- options.prependPath = options.prependPath === false ? false : true;
-
- this.web = this.proxyRequest = createRightProxy('web')(options);
- this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options);
- this.options = options;
-
- this.webPasses = Object.keys(web).map(function(pass) {
- return web[pass];
- });
-
- this.wsPasses = Object.keys(ws).map(function(pass) {
- return ws[pass];
- });
-
- this.on('error', this.onError, this);
-
-}
-
-require('util').inherits(ProxyServer, EE3);
-
-ProxyServer.prototype.onError = function (err) {
- //
- // Remark: Replicate node core behavior using EE3
- // so we force people to handle their own errors
- //
- if(this.listeners('error').length === 1) {
- throw err;
- }
-};
-
-ProxyServer.prototype.listen = function(port, hostname) {
- var self = this,
- closure = function(req, res) { self.web(req, res); };
-
- this._server = this.options.ssl ?
- https.createServer(this.options.ssl, closure) :
- http.createServer(closure);
-
- if(this.options.ws) {
- this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });
- }
-
- this._server.listen(port, hostname);
-
- return this;
-};
-
-ProxyServer.prototype.close = function(callback) {
- var self = this;
- if (this._server) {
- this._server.close(done);
- }
-
- // Wrap callback to nullify server after all open connections are closed.
- function done() {
- self._server = null;
- if (callback) {
- callback.apply(null, arguments);
- }
- };
-};
-
-ProxyServer.prototype.before = function(type, passName, callback) {
- if (type !== 'ws' && type !== 'web') {
- throw new Error('type must be `web` or `ws`');
- }
- var passes = (type === 'ws') ? this.wsPasses : this.webPasses,
- i = false;
-
- passes.forEach(function(v, idx) {
- if(v.name === passName) i = idx;
- })
-
- if(i === false) throw new Error('No such pass');
-
- passes.splice(i, 0, callback);
-};
-ProxyServer.prototype.after = function(type, passName, callback) {
- if (type !== 'ws' && type !== 'web') {
- throw new Error('type must be `web` or `ws`');
- }
- var passes = (type === 'ws') ? this.wsPasses : this.webPasses,
- i = false;
-
- passes.forEach(function(v, idx) {
- if(v.name === passName) i = idx;
- })
-
- if(i === false) throw new Error('No such pass');
-
- passes.splice(i++, 0, callback);
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
deleted file mode 100644
index 4070eb3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
+++ /dev/null
@@ -1,166 +0,0 @@
-var http = require('http'),
- https = require('https'),
- web_o = require('./web-outgoing'),
- common = require('../common'),
- passes = exports;
-
-web_o = Object.keys(web_o).map(function(pass) {
- return web_o[pass];
-});
-
-/*!
- * Array of passes.
- *
- * A `pass` is just a function that is executed on `req, res, options`
- * so that you can easily add new checks while still keeping the base
- * flexible.
- */
-
-[ // <--
-
- /**
- * Sets `content-length` to '0' if request is of DELETE type.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function deleteLength(req, res, options) {
- if((req.method === 'DELETE' || req.method === 'OPTIONS')
- && !req.headers['content-length']) {
- req.headers['content-length'] = '0';
- }
- },
-
- /**
- * Sets timeout in request socket if it was specified in options.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function timeout(req, res, options) {
- if(options.timeout) {
- req.socket.setTimeout(options.timeout);
- }
- },
-
- /**
- * Sets `x-forwarded-*` headers if specified in config.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function XHeaders(req, res, options) {
- if(!options.xfwd) return;
-
- var encrypted = req.isSpdy || common.hasEncryptedConnection(req);
- var values = {
- for : req.connection.remoteAddress || req.socket.remoteAddress,
- port : common.getPort(req),
- proto: encrypted ? 'https' : 'http'
- };
-
- ['for', 'port', 'proto'].forEach(function(header) {
- req.headers['x-forwarded-' + header] =
- (req.headers['x-forwarded-' + header] || '') +
- (req.headers['x-forwarded-' + header] ? ',' : '') +
- values[header];
- });
- },
-
- /**
- * Does the actual proxying. If `forward` is enabled fires up
- * a ForwardStream, same happens for ProxyStream. The request
- * just dies otherwise.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function stream(req, res, options, _, server, clb) {
-
- // And we begin!
- server.emit('start', req, res, options.target)
- if(options.forward) {
- // If forward enable, so just pipe the request
- var forwardReq = (options.forward.protocol === 'https:' ? https : http).request(
- common.setupOutgoing(options.ssl || {}, options, req, 'forward')
- );
- (options.buffer || req).pipe(forwardReq);
- if(!options.target) { return res.end(); }
- }
-
- // Request initalization
- var proxyReq = (options.target.protocol === 'https:' ? https : http).request(
- common.setupOutgoing(options.ssl || {}, options, req)
- );
-
- // Enable developers to modify the proxyReq before headers are sent
- proxyReq.on('socket', function(socket) {
- if(server) { server.emit('proxyReq', proxyReq, req, res, options); }
- });
-
- // allow outgoing socket to timeout so that we could
- // show an error page at the initial request
- if(options.proxyTimeout) {
- proxyReq.setTimeout(options.proxyTimeout, function() {
- proxyReq.abort();
- });
- }
-
- // Ensure we abort proxy if request is aborted
- req.on('aborted', function () {
- proxyReq.abort();
- });
-
- // Handle errors on incoming request as well as it makes sense to
- req.on('error', proxyError);
-
- // Error Handler
- proxyReq.on('error', proxyError);
-
- function proxyError (err){
- if (clb) {
- clb(err, req, res, options.target);
- } else {
- server.emit('error', err, req, res, options.target);
- }
- }
-
- (options.buffer || req).pipe(proxyReq);
-
- proxyReq.on('response', function(proxyRes) {
- if(server) { server.emit('proxyRes', proxyRes, req, res); }
- for(var i=0; i < web_o.length; i++) {
- if(web_o[i](req, res, proxyRes, options)) { break; }
- }
-
- // Allow us to listen when the proxy has completed
- proxyRes.on('end', function () {
- server.emit('end', req, res, proxyRes);
- });
-
- proxyRes.pipe(res);
- });
-
- //proxyReq.end();
- }
-
-] // <--
- .forEach(function(func) {
- passes[func.name] = func;
- });
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
deleted file mode 100644
index 977f1f7..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
+++ /dev/null
@@ -1,105 +0,0 @@
-var url = require('url'),
- passes = exports;
-
-var redirectRegex = /^30(1|2|7|8)$/;
-
-/*!
- * Array of passes.
- *
- * A `pass` is just a function that is executed on `req, res, options`
- * so that you can easily add new checks while still keeping the base
- * flexible.
- */
-
-[ // <--
-
- /**
- * If is a HTTP 1.0 request, remove chunk headers
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function removeChunked(req, res, proxyRes) {
- if (req.httpVersion === '1.0') {
- delete proxyRes.headers['transfer-encoding'];
- }
- },
-
- /**
- * If is a HTTP 1.0 request, set the correct connection header
- * or if connection header not present, then use `keep-alive`
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function setConnection(req, res, proxyRes) {
- if (req.httpVersion === '1.0') {
- proxyRes.headers.connection = req.headers.connection || 'close';
- } else if (!proxyRes.headers.connection) {
- proxyRes.headers.connection = req.headers.connection || 'keep-alive';
- }
- },
-
- function setRedirectHostRewrite(req, res, proxyRes, options) {
- if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite)
- && proxyRes.headers['location']
- && redirectRegex.test(proxyRes.statusCode)) {
- var target = url.parse(options.target);
- var u = url.parse(proxyRes.headers['location']);
-
- // make sure the redirected host matches the target host before rewriting
- if (target.host != u.host) {
- return;
- }
-
- if (options.hostRewrite) {
- u.host = options.hostRewrite;
- } else if (options.autoRewrite) {
- u.host = req.headers['host'];
- }
- if (options.protocolRewrite) {
- u.protocol = options.protocolRewrite;
- }
-
- proxyRes.headers['location'] = u.format();
- }
- },
- /**
- * Copy headers from proxyResponse to response
- * set each header in response object.
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function writeHeaders(req, res, proxyRes) {
- Object.keys(proxyRes.headers).forEach(function(key) {
- res.setHeader(key, proxyRes.headers[key]);
- });
- },
-
- /**
- * Set the statusCode from the proxyResponse
- *
- * @param {ClientRequest} Req Request object
- * @param {IncomingMessage} Res Response object
- * @param {proxyResponse} Res Response object from the proxy request
- *
- * @api private
- */
- function writeStatusCode(req, res, proxyRes) {
- res.writeHead(proxyRes.statusCode);
- }
-
-] // <--
- .forEach(function(func) {
- passes[func.name] = func;
- });
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
deleted file mode 100644
index a6ddb31..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
+++ /dev/null
@@ -1,162 +0,0 @@
-var http = require('http'),
- https = require('https'),
- common = require('../common'),
- passes = exports;
-
-/*!
- * Array of passes.
- *
- * A `pass` is just a function that is executed on `req, socket, options`
- * so that you can easily add new checks while still keeping the base
- * flexible.
- */
-
-/*
- * Websockets Passes
- *
- */
-
-var passes = exports;
-
-[
- /**
- * WebSocket requests must have the `GET` method and
- * the `upgrade:websocket` header
- *
- * @param {ClientRequest} Req Request object
- * @param {Socket} Websocket
- *
- * @api private
- */
-
- function checkMethodAndHeader (req, socket) {
- if (req.method !== 'GET' || !req.headers.upgrade) {
- socket.destroy();
- return true;
- }
-
- if (req.headers.upgrade.toLowerCase() !== 'websocket') {
- socket.destroy();
- return true;
- }
- },
-
- /**
- * Sets `x-forwarded-*` headers if specified in config.
- *
- * @param {ClientRequest} Req Request object
- * @param {Socket} Websocket
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
-
- function XHeaders(req, socket, options) {
- if(!options.xfwd) return;
-
- var values = {
- for : req.connection.remoteAddress || req.socket.remoteAddress,
- port : common.getPort(req),
- proto: common.hasEncryptedConnection(req) ? 'wss' : 'ws'
- };
-
- ['for', 'port', 'proto'].forEach(function(header) {
- req.headers['x-forwarded-' + header] =
- (req.headers['x-forwarded-' + header] || '') +
- (req.headers['x-forwarded-' + header] ? ',' : '') +
- values[header];
- });
- },
-
- /**
- * Does the actual proxying. Make the request and upgrade it
- * send the Switching Protocols request and pipe the sockets.
- *
- * @param {ClientRequest} Req Request object
- * @param {Socket} Websocket
- * @param {Object} Options Config object passed to the proxy
- *
- * @api private
- */
- function stream(req, socket, options, head, server, clb) {
- common.setupSocket(socket);
-
- if (head && head.length) socket.unshift(head);
-
-
- var proxyReq = (common.isSSL.test(options.target.protocol) ? https : http).request(
- common.setupOutgoing(options.ssl || {}, options, req)
- );
-
- // Enable developers to modify the proxyReq before headers are sent
- if (server) { server.emit('proxyReqWs', proxyReq, req, socket, options, head); }
-
- // Error Handler
- proxyReq.on('error', onOutgoingError);
- proxyReq.on('response', function (res) {
- // if upgrade event isn't going to happen, close the socket
- if (!res.upgrade) socket.end();
- });
-
- proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) {
- proxySocket.on('error', onOutgoingError);
-
- // Allow us to listen when the websocket has completed
- proxySocket.on('end', function () {
- server.emit('close', proxyRes, proxySocket, proxyHead);
- });
-
- // The pipe below will end proxySocket if socket closes cleanly, but not
- // if it errors (eg, vanishes from the net and starts returning
- // EHOSTUNREACH). We need to do that explicitly.
- socket.on('error', function () {
- proxySocket.end();
- });
-
- common.setupSocket(proxySocket);
-
- if (proxyHead && proxyHead.length) proxySocket.unshift(proxyHead);
-
- //
- // Remark: Handle writing the headers to the socket when switching protocols
- // Also handles when a header is an array
- //
- socket.write(
- Object.keys(proxyRes.headers).reduce(function (head, key) {
- var value = proxyRes.headers[key];
-
- if (!Array.isArray(value)) {
- head.push(key + ': ' + value);
- return head;
- }
-
- for (var i = 0; i < value.length; i++) {
- head.push(key + ': ' + value[i]);
- }
- return head;
- }, ['HTTP/1.1 101 Switching Protocols'])
- .join('\r\n') + '\r\n\r\n'
- );
-
- proxySocket.pipe(socket).pipe(proxySocket);
-
- server.emit('open', proxySocket);
- server.emit('proxySocket', proxySocket); //DEPRECATED.
- });
-
- return proxyReq.end(); // XXX: CHECK IF THIS IS THIS CORRECT
-
- function onOutgoingError(err) {
- if (clb) {
- clb(err, req, socket);
- } else {
- server.emit('error', err, req, socket);
- }
- socket.end();
- }
- }
-
-] // <--
- .forEach(function(func) {
- passes[func.name] = func;
- });
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/package.json
deleted file mode 100644
index 871cb4e..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-proxy/package.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "_args": [
- [
- "http-proxy@^1.8.1",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "http-proxy@>=1.8.1 <2.0.0",
- "_id": "http-proxy@1.12.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/http-proxy",
- "_nodeVersion": "4.2.1",
- "_npmUser": {
- "email": "jcrugzz@gmail.com",
- "name": "jcrugzz"
- },
- "_npmVersion": "2.14.7",
- "_phantomChildren": {},
- "_requested": {
- "name": "http-proxy",
- "raw": "http-proxy@^1.8.1",
- "rawSpec": "^1.8.1",
- "scope": null,
- "spec": ">=1.8.1 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.12.0.tgz",
- "_shasum": "4f02ea971e79e6affa12fa5f10ca2aebb5e3b17c",
- "_shrinkwrap": null,
- "_spec": "http-proxy@^1.8.1",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "info@nodejitsu.com",
- "name": "Nodejitsu Inc."
- },
- "bugs": {
- "url": "https://github.com/nodejitsu/node-http-proxy/issues"
- },
- "dependencies": {
- "eventemitter3": "1.x.x",
- "requires-port": "0.x.x"
- },
- "description": "HTTP proxying for the masses",
- "devDependencies": {
- "async": "*",
- "blanket": "*",
- "coveralls": "*",
- "dox": "*",
- "expect.js": "*",
- "mocha": "*",
- "mocha-lcov-reporter": "*",
- "semver": "^4.3.3",
- "socket.io": "*",
- "socket.io-client": "*",
- "ws": "~0.5.0"
- },
- "directories": {},
- "dist": {
- "shasum": "4f02ea971e79e6affa12fa5f10ca2aebb5e3b17c",
- "tarball": "http://registry.npmjs.org/http-proxy/-/http-proxy-1.12.0.tgz"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "gitHead": "b5a6d0e58396363f4c457f6d1654614bdfcfcb73",
- "homepage": "https://github.com/nodejitsu/node-http-proxy#readme",
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- },
- {
- "name": "cronopio",
- "email": "aristizabal.daniel@gmail.com"
- },
- {
- "name": "yawnt",
- "email": "yawn.localhost@gmail.com"
- },
- {
- "name": "jcrugzz",
- "email": "jcrugzz@gmail.com"
- }
- ],
- "name": "http-proxy",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/nodejitsu/node-http-proxy.git"
- },
- "scripts": {
- "coveralls": "mocha --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js",
- "test": "mocha -R landing test/*-test.js",
- "test-cov": "mocha --require blanket -R html-cov > cov/coverage.html"
- },
- "version": "1.12.0"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/.npmignore
deleted file mode 100644
index 5894e20..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/*
-!node_modules/node-static
-npm-debug.log
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/.travis.yml
deleted file mode 100644
index 6d1d5b6..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - "0.10"
- - "0.12"
- - "4.1"
-
-before_install:
- - travis_retry npm install -g npm@2.14.5
- - travis_retry npm install
-
-script:
- - npm test
-
-matrix:
- allow_failures:
- - node_js: "0.10"
-
-notifications:
- email:
- - travis@nodejitsu.com
- irc: "irc.freenode.org#nodejitsu"
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/LICENSE
deleted file mode 100644
index 1e989b4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2011 Charlie Robbins, Marak Squires, and the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/README.md
deleted file mode 100644
index ff85ba8..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# http-server: a command-line http server
-
-`http-server` is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.
-
-![](https://github.com/nodeapps/http-server/raw/master/screenshots/public.png)
-
-# Installing globally:
-
-Installation via `npm`. If you don't have `npm` yet:
-
- curl https://npmjs.org/install.sh | sh
-
-Once you have `npm`:
-
- npm install http-server -g
-
-This will install `http-server` globally so that it may be run from the command line.
-
-## Usage:
-
- http-server [path] [options]
-
-`[path]` defaults to `./public` if the folder exists, and `./` otherwise.
-
-# Installing as a node app
-
- mkdir myapp
- cd myapp/
- jitsu install http-server
-
-*If you do not have `jitsu` installed you can install it via `npm install jitsu -g`*
-
-## Usage
-
-### Starting http-server locally
-
- node bin/http-server
-
-*Now you can visit http://localhost:8080 to view your server*
-
-### Deploy http-server to nodejitsu
-
- jitsu deploy
-
-*You will now be prompted for a `subdomain` to deploy your application on*
-
-## Available Options:
-
-`-p` Port to use (defaults to 8080)
-
-`-a` Address to use (defaults to 0.0.0.0)
-
-`-d` Show directory listings (defaults to 'True')
-
-`-i` Display autoIndex (defaults to 'True')
-
-`-e` or `--ext` Default file extension if none supplied (defaults to 'html')
-
-`-s` or `--silent` Suppress log messages from output
-
-`--cors` Enable CORS via the `Access-Control-Allow-Origin` header
-
-`-o` Open browser window after staring the server
-
-`-c` Set cache time (in seconds) for cache-control max-age header, e.g. -c10 for 10 seconds (defaults to '3600'). To disable caching, use -c-1.
-
-`-P` or `--proxy` Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com
-
-`-S` or `--ssl` Enable https.
-
-`-C` or `--cert` Path to ssl cert file (default: cert.pem).
-
-`-K` or `--key` Path to ssl key file (default: key.pem).
-
-`-r` or `--robots` Provide a /robots.txt (whose content defaults to 'User-agent: *\nDisallow: /')
-
-`-h` or `--help` Print this list and exit.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/bin/http-server b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/bin/http-server
deleted file mode 100755
index 8b3de28..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/bin/http-server
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env node
-
-'use strict';
-
-var colors = require('colors'),
- os = require('os'),
- httpServer = require('../lib/http-server'),
- portfinder = require('portfinder'),
- opener = require('opener'),
- argv = require('optimist')
- .boolean('cors')
- .argv;
-
-var ifaces = os.networkInterfaces();
-
-if (argv.h || argv.help) {
- console.log([
- 'usage: http-server [path] [options]',
- '',
- 'options:',
- ' -p Port to use [8080]',
- ' -a Address to use [0.0.0.0]',
- ' -d Show directory listings [true]',
- ' -i Display autoIndex [true]',
- ' -e --ext Default file extension if none supplied [none]',
- ' -s --silent Suppress log messages from output',
- ' --cors Enable CORS via the "Access-Control-Allow-Origin" header',
- ' -o [path] Open browser window after starting the server',
- ' -c Cache time (max-age) in seconds [3600], e.g. -c10 for 10 seconds.',
- ' To disable caching, use -c-1.',
- '',
- ' -P --proxy Fallback proxy if the request cannot be resolved. e.g.: http://someurl.com',
- '',
- ' -S --ssl Enable https.',
- ' -C --cert Path to ssl cert file (default: cert.pem).',
- ' -K --key Path to ssl key file (default: key.pem).',
- '',
- ' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
- ' -h --help Print this list and exit.'
- ].join('\n'));
- process.exit();
-}
-
-var port = argv.p || parseInt(process.env.PORT, 10),
- host = argv.a || '0.0.0.0',
- ssl = !!argv.S || !!argv.ssl,
- proxy = argv.P || argv.proxy,
- logger;
-
-if (!argv.s && !argv.silent) {
- logger = {
- info: console.log,
- request: function (req, res, error) {
- var date = new Date().toUTCString();
- if (error) {
- logger.info(
- '[%s] "%s %s" Error (%s): "%s"',
- date, req.method.red, req.url.red,
- error.status.toString().red, error.message.red
- );
- }
- else {
- logger.info(
- '[%s] "%s %s" "%s"',
- date, req.method.cyan, req.url.cyan,
- req.headers['user-agent']
- );
- }
- }
- };
-}
-else if (colors) {
- logger = {
- info: function () {},
- request: function () {}
- };
-}
-
-if (!port) {
- portfinder.basePort = 8080;
- portfinder.getPort(function (err, port) {
- if (err) { throw err; }
- listen(port);
- });
-}
-else {
- listen(port);
-}
-
-function listen(port) {
- var options = {
- root: argv._[0],
- cache: argv.c,
- showDir: argv.d,
- autoIndex: argv.i,
- robots: argv.r || argv.robots,
- ext: argv.e || argv.ext,
- logFn: logger.request,
- proxy: proxy
- };
-
- if (argv.cors) {
- options.cors = true;
- }
-
- if (ssl) {
- options.https = {
- cert: argv.C || argv.cert || 'cert.pem',
- key: argv.K || argv.key || 'key.pem'
- };
- }
-
- var server = httpServer.createServer(options);
- server.listen(port, host, function () {
- var canonicalHost = host === '0.0.0.0' ? '127.0.0.1' : host,
- protocol = ssl ? 'https:' : 'http:';
-
- logger.info(['Starting up http-server, serving '.yellow,
- server.root.cyan,
- ssl ? (' through'.yellow + ' https'.cyan) : '',
- '\nAvailable on:'.yellow
- ].join(''));
-
- Object.keys(ifaces).forEach(function (dev) {
- ifaces[dev].forEach(function (details) {
- if (details.family === 'IPv4') {
- logger.info((' ' + protocol + details.address + ':' + port.toString()).green);
- }
- });
- });
-
- if (typeof proxy === 'string') {
- logger.info('Unhandled requests will be served from: ' + proxy);
- }
-
- logger.info('Hit CTRL-C to stop the server');
- if (argv.o) {
- opener(
- protocol + '//' + canonicalHost + ':' + port,
- { command: argv.o !== true ? argv.o : null }
- );
- }
- });
-}
-
-if (process.platform === 'win32') {
- require('readline').createInterface({
- input: process.stdin,
- output: process.stdout
- }).on('SIGINT', function () {
- process.emit('SIGINT');
- });
-}
-
-process.on('SIGINT', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
-
-process.on('SIGTERM', function () {
- logger.info('http-server stopped.'.red);
- process.exit();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/lib/http-server.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/lib/http-server.js
deleted file mode 100644
index daddcaa..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/lib/http-server.js
+++ /dev/null
@@ -1,134 +0,0 @@
-'use strict';
-
-var fs = require('fs'),
- union = require('union'),
- ecstatic = require('ecstatic'),
- httpProxy = require('http-proxy'),
- corser = require('corser');
-
-//
-// Remark: backwards compatibility for previous
-// case convention of HTTP
-//
-exports.HttpServer = exports.HTTPServer = HttpServer;
-
-/**
- * Returns a new instance of HttpServer with the
- * specified `options`.
- */
-exports.createServer = function (options) {
- return new HttpServer(options);
-};
-
-/**
- * Constructor function for the HttpServer object
- * with is responsible for serving static files along
- * with other HTTP-related features.
- */
-function HttpServer(options) {
- options = options || {};
-
- if (options.root) {
- this.root = options.root;
- }
- else {
- try {
- fs.lstatSync('./public');
- this.root = './public';
- }
- catch (err) {
- this.root = './';
- }
- }
-
- this.headers = options.headers || {};
-
- this.cache = options.cache === undefined ? 3600 : options.cache; // in seconds.
- this.showDir = options.showDir !== 'false';
- this.autoIndex = options.autoIndex !== 'false';
- this.contentType = options.contentType || 'application/octet-stream';
-
- if (options.ext) {
- this.ext = options.ext === true
- ? 'html'
- : options.ext;
- }
-
- var before = options.before ? options.before.slice() : [];
-
- before.push(function (req, res) {
- if (options.logFn) {
- options.logFn(req, res);
- }
-
- res.emit('next');
- });
-
- if (options.cors) {
- this.headers['Access-Control-Allow-Origin'] = '*';
- this.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Range';
-
- before.push(corser.create());
- }
-
- if (options.robots) {
- before.push(function (req, res) {
- if (req.url === '/robots.txt') {
- res.setHeader('Content-Type', 'text/plain');
- var robots = options.robots === true
- ? 'User-agent: *\nDisallow: /'
- : options.robots.replace(/\\n/, '\n');
-
- return res.end(robots);
- }
-
- res.emit('next');
- });
- }
-
- before.push(ecstatic({
- root: this.root,
- cache: this.cache,
- showDir: this.showDir,
- autoIndex: this.autoIndex,
- defaultExt: this.ext,
- contentType: this.contentType,
- handleError: typeof options.proxy !== 'string'
- }));
-
- if (typeof options.proxy === 'string') {
- var proxy = httpProxy.createProxyServer({});
- before.push(function (req, res) {
- proxy.web(req, res, {
- target: options.proxy,
- changeOrigin: true
- });
- });
- }
-
- var serverOptions = {
- before: before,
- headers: this.headers,
- onError: function (err, req, res) {
- if (options.logFn) {
- options.logFn(req, res, err);
- }
-
- res.end();
- }
- };
-
- if (options.https) {
- serverOptions.https = options.https;
- }
-
- this.server = union.createServer(serverOptions);
-}
-
-HttpServer.prototype.listen = function () {
- this.server.listen.apply(this.server, arguments);
-};
-
-HttpServer.prototype.close = function () {
- return this.server.close();
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/package.json
deleted file mode 100644
index 47cc953..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/package.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "_args": [
- [
- "http-server@^0.8.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides"
- ]
- ],
- "_from": "http-server@>=0.8.0 <0.9.0",
- "_id": "http-server@0.8.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/http-server",
- "_nodeVersion": "0.12.7",
- "_npmUser": {
- "email": "charlie.robbins@gmail.com",
- "name": "indexzero"
- },
- "_npmVersion": "2.14.5",
- "_phantomChildren": {},
- "_requested": {
- "name": "http-server",
- "raw": "http-server@^0.8.0",
- "rawSpec": "^0.8.0",
- "scope": null,
- "spec": ">=0.8.0 <0.9.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/http-server/-/http-server-0.8.5.tgz",
- "_shasum": "bbf27c9f09499e51a1fe1f979a6f39a45a04f2fb",
- "_shrinkwrap": null,
- "_spec": "http-server@^0.8.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides",
- "bin": {
- "hs": "./bin/http-server",
- "http-server": "./bin/http-server"
- },
- "bugs": {
- "url": "https://github.com/nodeapps/http-server/issues"
- },
- "contributors": [
- {
- "name": "Charlie Robbins",
- "email": "charlie.robbins@gmail.com"
- },
- {
- "name": "Marak Squires",
- "email": "marak.squires@gmail.com"
- },
- {
- "name": "Charlie McConnell",
- "email": "charlie@charlieistheman.com"
- },
- {
- "name": "Joshua Holbrook",
- "email": "josh.holbrook@gmail.com"
- },
- {
- "name": "Maciej Małecki",
- "email": "maciej.malecki@notimplemented.org"
- },
- {
- "name": "Matthew Bergman",
- "email": "mzbphoto@gmail.com"
- },
- {
- "name": "brad dunbar",
- "email": "dunbarb2@gmail.com"
- },
- {
- "name": "Dominic Tarr"
- },
- {
- "name": "Travis Person",
- "email": "travis.person@gmail.com"
- },
- {
- "name": "Jinkwon Lee",
- "email": "master@bdyne.net"
- }
- ],
- "dependencies": {
- "colors": "1.0.3",
- "corser": "~2.0.0",
- "ecstatic": "~0.7.0",
- "http-proxy": "^1.8.1",
- "opener": "~1.4.0",
- "optimist": "0.6.x",
- "portfinder": "0.4.x",
- "union": "~0.4.3"
- },
- "description": "A simple zero-configuration command-line http server",
- "devDependencies": {
- "common-style": "^3.0.0",
- "request": "2.49.x",
- "vows": "0.7.x"
- },
- "directories": {},
- "dist": {
- "shasum": "bbf27c9f09499e51a1fe1f979a6f39a45a04f2fb",
- "tarball": "http://registry.npmjs.org/http-server/-/http-server-0.8.5.tgz"
- },
- "gitHead": "b8975be281a5705e71218597940e53034ebe41d4",
- "homepage": "https://github.com/indexzero/http-server#readme",
- "keywords": [
- "cli",
- "command"
- ],
- "license": "MIT",
- "main": "./lib/http-server",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- }
- ],
- "name": "http-server",
- "optionalDependencies": {},
- "preferGlobal": "true",
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/indexzero/http-server.git"
- },
- "scripts": {
- "pretest": "common bin/http-server lib/ test",
- "start": "node ./bin/http-server",
- "test": "vows --spec --isolate"
- },
- "version": "0.8.5"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/404.html b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/404.html
deleted file mode 100644
index 03d348d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/404.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- 404
-
-
- 404
-
- Were you just making up filenames or what?
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/img/turtle.png b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/img/turtle.png
deleted file mode 100644
index 721a796..0000000
Binary files a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/img/turtle.png and /dev/null differ
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/index.html b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/index.html
deleted file mode 100644
index 12cafb2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/public/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- node.js http server
-
-
-
- Serving up static files like they were turtles strapped to rockets.
-
-
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/directory.png b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/directory.png
deleted file mode 100644
index b255cea..0000000
Binary files a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/directory.png and /dev/null differ
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/public.png b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/public.png
deleted file mode 100644
index aa007bd..0000000
Binary files a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/public.png and /dev/null differ
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/start.png b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/start.png
deleted file mode 100644
index d4ea2b8..0000000
Binary files a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/screenshots/start.png and /dev/null differ
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/fixtures/root/canYouSeeMe b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/fixtures/root/canYouSeeMe
deleted file mode 100644
index c20d87f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/fixtures/root/canYouSeeMe
+++ /dev/null
@@ -1,2 +0,0 @@
-I bet you can. I'm in your index.
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/fixtures/root/file b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/fixtures/root/file
deleted file mode 100644
index ca06ae2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/fixtures/root/file
+++ /dev/null
@@ -1,2 +0,0 @@
-hello, I know nodejitsu
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/http-server-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/http-server-test.js
deleted file mode 100644
index a9240b2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/http-server/test/http-server-test.js
+++ /dev/null
@@ -1,154 +0,0 @@
-var assert = require('assert'),
- path = require('path'),
- fs = require('fs'),
- vows = require('vows'),
- request = require('request'),
- httpServer = require('../lib/http-server');
-
-var root = path.join(__dirname, 'fixtures', 'root');
-
-vows.describe('http-server').addBatch({
- 'When http-server is listening on 8080': {
- topic: function () {
- var server = httpServer.createServer({
- root: root,
- robots: true,
- headers: {
- 'Access-Control-Allow-Origin': '*',
- 'Access-Control-Allow-Credentials': 'true'
- }
- });
-
- server.listen(8080);
- this.callback(null, server);
- },
- 'it should serve files from root directory': {
- topic: function () {
- request('http://127.0.0.1:8080/file', this.callback);
- },
- 'status code should be 200': function (res) {
- assert.equal(res.statusCode, 200);
- },
- 'and file content': {
- topic: function (res, body) {
- var self = this;
- fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) {
- self.callback(err, data, body);
- });
- },
- 'should match content of served file': function (err, file, body) {
- assert.equal(body.trim(), file.trim());
- }
- }
- },
- 'when requesting non-existent file': {
- topic: function () {
- request('http://127.0.0.1:8080/404', this.callback);
- },
- 'status code should be 404': function (res) {
- assert.equal(res.statusCode, 404);
- }
- },
- 'when requesting /': {
- topic: function () {
- request('http://127.0.0.1:8080/', this.callback);
- },
- 'should respond with index': function (err, res, body) {
- assert.equal(res.statusCode, 200);
- assert.include(body, '/file');
- assert.include(body, '/canYouSeeMe');
- }
- },
- 'when robots options is activated': {
- topic: function () {
- request('http://127.0.0.1:8080/', this.callback);
- },
- 'should respond with status code 200 to /robots.txt': function (res) {
- assert.equal(res.statusCode, 200);
- }
- },
- 'and options include custom set http-headers': {
- topic: function () {
- request('http://127.0.0.1:8080/', this.callback);
- },
- 'should respond with headers set in options': function (err, res) {
- assert.equal(res.headers['access-control-allow-origin'], '*');
- assert.equal(res.headers['access-control-allow-credentials'], 'true');
- }
- },
- 'When http-server is proxying from 8081 to 8080': {
- topic: function () {
- var proxyServer = httpServer.createServer({
- proxy: 'http://127.0.0.1:8080/',
- root: path.join(__dirname, 'fixtures')
- });
- proxyServer.listen(8081);
- this.callback(null, proxyServer);
- },
- 'it should serve files from the proxy server root directory': {
- topic: function () {
- request('http://127.0.0.1:8081/root/file', this.callback);
- },
- 'status code should be the enpoint code 200': function (res) {
- assert.equal(res.statusCode, 200);
- },
- 'and file content': {
- topic: function (res, body) {
- var self = this;
- fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) {
- self.callback(err, data, body);
- });
- },
- 'should match content of the served file': function (err, file, body) {
- assert.equal(body.trim(), file.trim());
- }
- }
- },
- 'it should fallback to the proxied server': {
- topic: function () {
- request('http://127.0.0.1:8081/file', this.callback);
- },
- 'status code should be the enpoint code 200': function (res) {
- assert.equal(res.statusCode, 200);
- },
- 'and file content': {
- topic: function (res, body) {
- var self = this;
- fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) {
- self.callback(err, data, body);
- });
- },
- 'should match content of the proxied served file': function (err, file, body) {
- assert.equal(body.trim(), file.trim());
- }
- }
- }
- }
- },
- 'When cors is enabled': {
- topic: function () {
- var server = httpServer.createServer({
- root: root,
- cors: true
- });
- server.listen(8082);
- this.callback(null, server);
- },
- 'and given OPTIONS request': {
- topic: function () {
- request({
- method: 'OPTIONS',
- uri: 'http://127.0.0.1:8082/',
- headers: {
- 'Access-Control-Request-Method': 'GET',
- Origin: 'http://example.com',
- 'Access-Control-Request-Headers': 'Foobar'
- }
- }, this.callback);
- },
- 'status code should be 204': function (err, res) {
- assert.equal(res.statusCode, 204);
- }
- }
- }
-}).export(module);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/.npmignore
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/LICENSE
deleted file mode 100644
index 451fc45..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/README.md
deleted file mode 100644
index 506fbe5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# mime
-
-Comprehensive MIME type mapping API based on mime-db module.
-
-## Install
-
-Install with [npm](http://github.com/isaacs/npm):
-
- npm install mime
-
-## Contributing / Testing
-
- npm run test
-
-## Command Line
-
- mime [path_string]
-
-E.g.
-
- > mime scripts/jquery.js
- application/javascript
-
-## API - Queries
-
-### mime.lookup(path)
-Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
-
-```js
-var mime = require('mime');
-
-mime.lookup('/path/to/file.txt'); // => 'text/plain'
-mime.lookup('file.txt'); // => 'text/plain'
-mime.lookup('.TXT'); // => 'text/plain'
-mime.lookup('htm'); // => 'text/html'
-```
-
-### mime.default_type
-Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
-
-### mime.extension(type)
-Get the default extension for `type`
-
-```js
-mime.extension('text/html'); // => 'html'
-mime.extension('application/octet-stream'); // => 'bin'
-```
-
-### mime.charsets.lookup()
-
-Map mime-type to charset
-
-```js
-mime.charsets.lookup('text/plain'); // => 'UTF-8'
-```
-
-(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
-
-## API - Defining Custom Types
-
-Custom type mappings can be added on a per-project basis via the following APIs.
-
-### mime.define()
-
-Add custom mime/extension mappings
-
-```js
-mime.define({
- 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
- 'application/x-my-type': ['x-mt', 'x-mtt'],
- // etc ...
-});
-
-mime.lookup('x-sft'); // => 'text/x-some-format'
-```
-
-The first entry in the extensions array is returned by `mime.extension()`. E.g.
-
-```js
-mime.extension('text/x-some-format'); // => 'x-sf'
-```
-
-### mime.load(filepath)
-
-Load mappings from an Apache ".types" format file
-
-```js
-mime.load('./my_project.types');
-```
-The .types file format is simple - See the `types` dir for examples.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/cli.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/cli.js
deleted file mode 100755
index 20b1ffe..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/cli.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var mime = require('./mime.js');
-var file = process.argv[2];
-var type = mime.lookup(file);
-
-process.stdout.write(type + '\n');
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/mime.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/mime.js
deleted file mode 100644
index 341b6a5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/mime.js
+++ /dev/null
@@ -1,108 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-
-function Mime() {
- // Map of extension -> mime type
- this.types = Object.create(null);
-
- // Map of mime type -> extension
- this.extensions = Object.create(null);
-}
-
-/**
- * Define mimetype -> extension mappings. Each key is a mime-type that maps
- * to an array of extensions associated with the type. The first extension is
- * used as the default extension for the type.
- *
- * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
- *
- * @param map (Object) type definitions
- */
-Mime.prototype.define = function (map) {
- for (var type in map) {
- var exts = map[type];
- for (var i = 0; i < exts.length; i++) {
- if (process.env.DEBUG_MIME && this.types[exts]) {
- console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
- this.types[exts] + ' to ' + type);
- }
-
- this.types[exts[i]] = type;
- }
-
- // Default extension is the first one we encounter
- if (!this.extensions[type]) {
- this.extensions[type] = exts[0];
- }
- }
-};
-
-/**
- * Load an Apache2-style ".types" file
- *
- * This may be called multiple times (it's expected). Where files declare
- * overlapping types/extensions, the last file wins.
- *
- * @param file (String) path of file to load.
- */
-Mime.prototype.load = function(file) {
- this._loading = file;
- // Read file and split into lines
- var map = {},
- content = fs.readFileSync(file, 'ascii'),
- lines = content.split(/[\r\n]+/);
-
- lines.forEach(function(line) {
- // Clean up whitespace/comments, and split into fields
- var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
- map[fields.shift()] = fields;
- });
-
- this.define(map);
-
- this._loading = null;
-};
-
-/**
- * Lookup a mime type based on extension
- */
-Mime.prototype.lookup = function(path, fallback) {
- var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
-
- return this.types[ext] || fallback || this.default_type;
-};
-
-/**
- * Return file extension associated with a mime type
- */
-Mime.prototype.extension = function(mimeType) {
- var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
- return this.extensions[type];
-};
-
-// Default instance
-var mime = new Mime();
-
-// Define built-in types
-mime.define(require('./types.json'));
-
-// Default type
-mime.default_type = mime.lookup('bin');
-
-//
-// Additional API specific to the default instance
-//
-
-mime.Mime = Mime;
-
-/**
- * Lookup a charset based on mime type.
- */
-mime.charsets = {
- lookup: function(mimeType, fallback) {
- // Assume text types are utf8
- return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
- }
-};
-
-module.exports = mime;
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/package.json
deleted file mode 100644
index 475da36..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/package.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "_args": [
- [
- "mime@^1.2.11",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "mime@>=1.2.11 <2.0.0",
- "_id": "mime@1.3.4",
- "_inCache": true,
- "_installable": true,
- "_location": "/mime",
- "_npmUser": {
- "email": "robert@broofa.com",
- "name": "broofa"
- },
- "_npmVersion": "1.4.28",
- "_phantomChildren": {},
- "_requested": {
- "name": "mime",
- "raw": "mime@^1.2.11",
- "rawSpec": "^1.2.11",
- "scope": null,
- "spec": ">=1.2.11 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
- "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
- "_shrinkwrap": null,
- "_spec": "mime@^1.2.11",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "email": "robert@broofa.com",
- "name": "Robert Kieffer",
- "url": "http://github.com/broofa"
- },
- "bin": {
- "mime": "cli.js"
- },
- "bugs": {
- "url": "https://github.com/broofa/node-mime/issues"
- },
- "contributors": [
- {
- "name": "Benjamin Thomas",
- "email": "benjamin@benjaminthomas.org",
- "url": "http://github.com/bentomas"
- }
- ],
- "dependencies": {},
- "description": "A comprehensive library for mime-type mapping",
- "devDependencies": {
- "mime-db": "^1.2.0"
- },
- "directories": {},
- "dist": {
- "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
- "tarball": "http://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
- },
- "gitHead": "1628f6e0187095009dcef4805c3a49706f137974",
- "homepage": "https://github.com/broofa/node-mime",
- "keywords": [
- "mime",
- "util"
- ],
- "licenses": [
- {
- "type": "MIT",
- "url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
- }
- ],
- "main": "mime.js",
- "maintainers": [
- {
- "name": "broofa",
- "email": "robert@broofa.com"
- },
- {
- "name": "bentomas",
- "email": "benjamin@benjaminthomas.org"
- }
- ],
- "name": "mime",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/broofa/node-mime.git"
- },
- "scripts": {
- "prepublish": "node build/build.js > types.json",
- "test": "node build/test.js"
- },
- "version": "1.3.4"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/types.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/types.json
deleted file mode 100644
index c674b1c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mime/types.json
+++ /dev/null
@@ -1 +0,0 @@
-{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mdp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a","m4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/opentype":["otf"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["markdown","md","mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-pascal":["p","pas"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/.travis.yml
deleted file mode 100644
index 74c57bf..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
-before_install:
- - npm install -g npm@~1.4.6
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/example/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/index.js
deleted file mode 100644
index 6a0559d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/index.js
+++ /dev/null
@@ -1,236 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {}, unknownFn: null };
-
- if (typeof opts['unknown'] === 'function') {
- flags.unknownFn = opts['unknown'];
- }
-
- if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
- flags.allBools = true;
- } else {
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
- }
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- if (aliases[key]) {
- flags.strings[aliases[key]] = true;
- }
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function argDefined(key, arg) {
- return (flags.allBools && /^--[^=]+$/.test(arg)) ||
- flags.strings[key] || flags.bools[key] || aliases[key];
- }
-
- function setArg (key, val, arg) {
- if (arg && flags.unknownFn && !argDefined(key, arg)) {
- if (flags.unknownFn(arg) === false) return;
- }
-
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
- }
-
- function aliasIsBoolean(key) {
- return aliases[key].some(function (x) {
- return flags.bools[x];
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- var key = m[1];
- var value = m[2];
- if (flags.bools[key]) {
- value = value !== 'false';
- }
- setArg(key, value, arg);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false, arg);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && !flags.allBools
- && (aliases[key] ? !aliasIsBoolean(key) : true)) {
- setArg(key, next, arg);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true', arg);
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true, arg);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next, arg)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
- setArg(letters[j], next.split('=')[1], arg);
- broken = true;
- break;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next, arg);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2), arg);
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !aliasIsBoolean(key) : true)) {
- setArg(key, args[i+1], arg);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true', arg);
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true, arg);
- }
- }
- }
- else {
- if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- if (opts.stopEarly) {
- argv._.push.apply(argv._, args.slice(i + 1));
- break;
- }
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- if (opts['--']) {
- argv['--'] = new Array();
- notFlags.forEach(function(key) {
- argv['--'].push(key);
- });
- }
- else {
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
- }
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/package.json
deleted file mode 100644
index 6e054e5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/package.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "_args": [
- [
- "minimist@^1.1.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "minimist@>=1.1.0 <2.0.0",
- "_id": "minimist@1.2.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/minimist",
- "_nodeVersion": "2.4.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "3.2.2",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimist",
- "raw": "minimist@^1.1.0",
- "rawSpec": "^1.1.0",
- "scope": null,
- "spec": ">=1.1.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284",
- "_shrinkwrap": null,
- "_spec": "minimist@^1.1.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "dependencies": {},
- "description": "parse argument options",
- "devDependencies": {
- "covert": "^1.0.0",
- "tap": "~0.4.0",
- "tape": "^3.5.0"
- },
- "directories": {},
- "dist": {
- "shasum": "a35008b20f41383eec1fb914f4cd5df79a264284",
- "tarball": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
- },
- "gitHead": "dc624482fcfec5bc669c68cdb861f00573ed4e64",
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "optimist",
- "parser"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "minimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "scripts": {
- "coverage": "covert test/*.js",
- "test": "tap test/*.js"
- },
- "testling": {
- "browsers": [
- "chrome/10",
- "chrome/latest",
- "ff/5",
- "firefox/latest",
- "ie/6..latest",
- "opera/12",
- "safari/5.1",
- "safari/latest"
- ],
- "files": "test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/readme.markdown b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/readme.markdown
deleted file mode 100644
index 30a74cf..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,91 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a boolean, string or array of strings to always treat as
-booleans. if `true` will treat all double hyphenated arguments without equal signs
-as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-* `opts.stopEarly` - when true, populate `argv._` with everything after the
-first non-option
-* `opts['--']` - when true, populate `argv._` with everything before the `--`
-and `argv['--']` with everything after the `--`. Here's an example:
-* `opts.unknown` - a function which is invoked with a command line parameter not
-defined in the `opts` configuration object. If the function returns `false`, the
-unknown option is not added to `argv`.
-
-```
-> require('./')('one two three -- four five --six'.split(' '), { '--': true })
-{ _: [ 'one', 'two', 'three' ],
- '--': [ 'four', 'five', '--six' ] }
-```
-
-Note that with `opts['--']` set, parsing for arguments still stops after the
-`--`.
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/all_bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/all_bool.js
deleted file mode 100644
index ac83548..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/all_bool.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean true (default all --args to boolean)', function (t) {
- var argv = parse(['moo', '--honk', 'cow'], {
- boolean: true
- });
-
- t.deepEqual(argv, {
- honk: true,
- _: ['moo', 'cow']
- });
-
- t.deepEqual(typeof argv.honk, 'boolean');
- t.end();
-});
-
-test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
- var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
- boolean: true
- });
-
- t.deepEqual(argv, {
- honk: true,
- tacos: 'good',
- p: 55,
- _: ['moo', 'cow']
- });
-
- t.deepEqual(typeof argv.honk, 'boolean');
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/bool.js
deleted file mode 100644
index 14b0717..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/bool.js
+++ /dev/null
@@ -1,166 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias array with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var alt = [ '--harp', 'derp' ];
- var opts = {
- alias: { 'h': ['herp', 'harp'] },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var altPropertyArgv = parse(alt, opts);
- var expected = {
- harp: true,
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.same(altPropertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
-
-test('boolean --boool=true', function (t) {
- var parsed = parse(['--boool=true'], {
- default: {
- boool: false
- },
- boolean: ['boool']
- });
-
- t.same(parsed.boool, true);
- t.end();
-});
-
-test('boolean --boool=false', function (t) {
- var parsed = parse(['--boool=false'], {
- default: {
- boool: true
- },
- boolean: ['boool']
- });
-
- t.same(parsed.boool, false);
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/dash.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/dash.js
deleted file mode 100644
index 5a4fa5b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
-
-test('move arguments after the -- into their own `--` array', function(t) {
- t.plan(1);
- t.deepEqual(
- parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
- { name: 'John', _: [ 'before' ], '--': [ 'after' ] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/default_bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index 780a311..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
-
-test('boolean default to null', function (t) {
- var argv = parse([], {
- boolean: 'maybe',
- default: { maybe: null }
- });
- t.equal(argv.maybe, null);
- var argv = parse(['--maybe'], {
- boolean: 'maybe',
- default: { maybe: null }
- });
- t.equal(argv.maybe, true);
- t.end();
-
-})
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/dotted.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/dotted.js
deleted file mode 100644
index d8b3e85..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
-
-test('dotted default with no alias', function (t) {
- var argv = parse('', {default: {'a.b': 11}});
- t.equal(argv.a.b, 11);
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/kv_short.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/kv_short.js
deleted file mode 100644
index f813b30..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/kv_short.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('short -k=v' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b=123' ]);
- t.deepEqual(argv, { b: 123, _: [] });
-});
-
-test('multi short -k=v' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-a=whatever', '-b=robots' ]);
- t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/long.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/num.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/num.js
deleted file mode 100644
index 2cc77f4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/num.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('already a number', function (t) {
- var argv = parse([ '-x', 1234, 789 ]);
- t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/parse.js
deleted file mode 100644
index 7b4a2a1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,197 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('string and alias', function(t) {
- var x = parse([ '--str', '000123' ], {
- string: 's',
- alias: { s: 'str' }
- });
-
- t.equal(x.str, '000123');
- t.equal(typeof x.str, 'string');
- t.equal(x.s, '000123');
- t.equal(typeof x.s, 'string');
-
- var y = parse([ '-s', '000123' ], {
- string: 'str',
- alias: { str: 's' }
- });
-
- t.equal(y.str, '000123');
- t.equal(typeof y.str, 'string');
- t.equal(y.s, '000123');
- t.equal(typeof y.s, 'string');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/parse_modified.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index ab620dc..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: [123] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/short.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/stop_early.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/stop_early.js
deleted file mode 100644
index bdf9fbc..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/stop_early.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('stops parsing on the first non-option when stopEarly is set', function (t) {
- var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
- stopEarly: true
- });
-
- t.deepEqual(argv, {
- aaa: 'bbb',
- _: ['ccc', '--ddd']
- });
-
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/unknown.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/unknown.js
deleted file mode 100644
index 462a36b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/unknown.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('boolean and alias is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '-h', 'true', '--derp', 'true' ];
- var regular = [ '--herp', 'true', '-d', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h',
- unknown: unknownFn
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
-
- t.same(unknown, ['--derp', '-d']);
- t.end();
-});
-
-test('flag boolean true any double hyphen argument is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
- boolean: true,
- unknown: unknownFn
- });
- t.same(unknown, ['--tacos=good', 'cow', '-p']);
- t.same(argv, {
- honk: true,
- _: []
- });
- t.end();
-});
-
-test('string and alias is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '-h', 'hello', '--derp', 'goodbye' ];
- var regular = [ '--herp', 'hello', '-d', 'moon' ];
- var opts = {
- alias: { h: 'herp' },
- string: 'h',
- unknown: unknownFn
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
-
- t.same(unknown, ['--derp', '-d']);
- t.end();
-});
-
-test('default and alias is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '-h', 'hello' ];
- var regular = [ '--herp', 'hello' ];
- var opts = {
- default: { 'h': 'bar' },
- alias: { 'h': 'herp' },
- unknown: unknownFn
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
-
- t.same(unknown, []);
- t.end();
- unknownFn(); // exercise fn for 100% coverage
-});
-
-test('value following -- is not unknown', function (t) {
- var unknown = [];
- function unknownFn(arg) {
- unknown.push(arg);
- return false;
- }
- var aliased = [ '--bad', '--', 'good', 'arg' ];
- var opts = {
- '--': true,
- unknown: unknownFn
- };
- var argv = parse(aliased, opts);
-
- t.same(unknown, ['--bad']);
- t.same(argv, {
- '--': ['good', 'arg'],
- '_': []
- })
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/whitespace.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/.travis.yml
deleted file mode 100644
index 74c57bf..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
-before_install:
- - npm install -g npm@~1.4.6
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 432d1ae..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright 2010 James Halliday (mail@substack.net)
-
-This project is free software released under the MIT/X11 license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/bin/cmd.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index d95de15..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env node
-
-var mkdirp = require('../');
-var minimist = require('minimist');
-var fs = require('fs');
-
-var argv = minimist(process.argv.slice(2), {
- alias: { m: 'mode', h: 'help' },
- string: [ 'mode' ]
-});
-if (argv.help) {
- fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
- return;
-}
-
-var paths = argv._.slice();
-var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
-
-(function next () {
- if (paths.length === 0) return;
- var p = paths.shift();
-
- if (mode === undefined) mkdirp(p, cb)
- else mkdirp(p, mode, cb)
-
- function cb (err) {
- if (err) {
- console.error(err.message);
- process.exit(1);
- }
- else next();
- }
-})();
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/bin/usage.txt b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/bin/usage.txt
deleted file mode 100644
index f952aa2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/bin/usage.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories that
- don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m, --mode If a directory needs to be created, set the mode as an octal
- permission string.
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/examples/pow.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/examples/pow.js
deleted file mode 100644
index e692421..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/examples/pow.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/index.js
deleted file mode 100644
index 6ce241b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,98 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-var _0777 = parseInt('0777', 8);
-
-module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
-
-function mkdirP (p, opts, f, made) {
- if (typeof opts === 'function') {
- f = opts;
- opts = {};
- }
- else if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- var cb = f || function () {};
- p = path.resolve(p);
-
- xfs.mkdir(p, mode, function (er) {
- if (!er) {
- made = made || p;
- return cb(null, made);
- }
- switch (er.code) {
- case 'ENOENT':
- mkdirP(path.dirname(p), opts, function (er, made) {
- if (er) cb(er, made);
- else mkdirP(p, opts, cb, made);
- });
- break;
-
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- xfs.stat(p, function (er2, stat) {
- // if the stat fails, then that's super weird.
- // let the original error be the failure reason.
- if (er2 || !stat.isDirectory()) cb(er, made)
- else cb(null, made);
- });
- break;
- }
- });
-}
-
-mkdirP.sync = function sync (p, opts, made) {
- if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- p = path.resolve(p);
-
- try {
- xfs.mkdirSync(p, mode);
- made = made || p;
- }
- catch (err0) {
- switch (err0.code) {
- case 'ENOENT' :
- made = sync(path.dirname(p), opts, made);
- sync(p, opts, made);
- break;
-
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- var stat;
- try {
- stat = xfs.statSync(p);
- }
- catch (err1) {
- throw err0;
- }
- if (!stat.isDirectory()) throw err0;
- break;
- }
- }
-
- return made;
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/example/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/index.js
deleted file mode 100644
index 584f551..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/index.js
+++ /dev/null
@@ -1,187 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- });
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function setArg (key, val) {
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- }
- else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
-function longest (xs) {
- return Math.max.apply(null, xs.map(function (x) { return x.length }));
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/package.json
deleted file mode 100644
index f5cfc4a..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "_args": [
- [
- "minimist@0.0.8",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/mkdirp"
- ]
- ],
- "_from": "minimist@0.0.8",
- "_id": "minimist@0.0.8",
- "_inCache": true,
- "_installable": true,
- "_location": "/mkdirp/minimist",
- "_npmUser": {
- "email": "mail@substack.net",
- "name": "substack"
- },
- "_npmVersion": "1.4.3",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimist",
- "raw": "minimist@0.0.8",
- "rawSpec": "0.0.8",
- "scope": null,
- "spec": "0.0.8",
- "type": "version"
- },
- "_requiredBy": [
- "/mkdirp"
- ],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "_shrinkwrap": null,
- "_spec": "minimist@0.0.8",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/mkdirp",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "dependencies": {},
- "description": "parse argument options",
- "devDependencies": {
- "tap": "~0.4.0",
- "tape": "~1.0.4"
- },
- "directories": {},
- "dist": {
- "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
- },
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "optimist",
- "parser"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "minimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "testling": {
- "browsers": [
- "chrome/10",
- "chrome/latest",
- "ff/5",
- "firefox/latest",
- "ie/6..latest",
- "opera/12",
- "safari/5.1",
- "safari/latest"
- ],
- "files": "test/*.js"
- },
- "version": "0.0.8"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/readme.markdown b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/readme.markdown
deleted file mode 100644
index c256353..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,73 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/dash.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/dash.js
deleted file mode 100644
index 8b034b9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/dotted.js
deleted file mode 100644
index ef0ae34..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/long.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/parse.js
deleted file mode 100644
index 8a90646..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,318 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/short.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/package.json
deleted file mode 100644
index 2893456..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_args": [
- [
- "mkdirp@0.5.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/portfinder"
- ]
- ],
- "_from": "mkdirp@>=0.5.0 <0.6.0",
- "_id": "mkdirp@0.5.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/mkdirp",
- "_nodeVersion": "2.0.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "2.9.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "mkdirp",
- "raw": "mkdirp@0.5.x",
- "rawSpec": "0.5.x",
- "scope": null,
- "spec": ">=0.5.0 <0.6.0",
- "type": "range"
- },
- "_requiredBy": [
- "/portfinder"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903",
- "_shrinkwrap": null,
- "_spec": "mkdirp@0.5.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/portfinder",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/substack/node-mkdirp/issues"
- },
- "dependencies": {
- "minimist": "0.0.8"
- },
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "mock-fs": "2 >=2.7.0",
- "tap": "1"
- },
- "directories": {},
- "dist": {
- "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903",
- "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz"
- },
- "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7",
- "homepage": "https://github.com/substack/node-mkdirp#readme",
- "keywords": [
- "directory",
- "mkdir"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "mkdirp",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/substack/node-mkdirp.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "0.5.1"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/readme.markdown b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 3cc1315..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,100 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in node.js!
-
-[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
-
-# example
-
-## pow.js
-
-```js
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
-```
-
-Output
-
-```
-pow!
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-var mkdirp = require('mkdirp');
-```
-
-## mkdirp(dir, opts, cb)
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a non-object, it will be treated as
-the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-`cb(err, made)` fires with the error or the first directory `made`
-that had to be created, if any.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
-`opts.fs.stat(path, cb)`.
-
-## mkdirp.sync(dir, opts)
-
-Synchronously create a new directory and any necessary subdirectories at `dir`
-with octal permission string `opts.mode`. If `opts` is a non-object, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-Returns the first directory that had to be created, if any.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
-`opts.fs.statSync(path)`.
-
-# usage
-
-This package also ships with a `mkdirp` command.
-
-```
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories that
- don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m, --mode If a directory needs to be created, set the mode as an octal
- permission string.
-
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command.
-
-# license
-
-MIT
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/chmod.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/chmod.js
deleted file mode 100644
index 6a404b9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/chmod.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-var _0744 = parseInt('0744', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-test('chmod-pre', function (t) {
- var mode = _0744
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.equal(stat && stat.mode & _0777, mode, 'should be 0744');
- t.end();
- });
- });
-});
-
-test('chmod', function (t) {
- var mode = _0755
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.end();
- });
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/clobber.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/clobber.js
deleted file mode 100644
index 2433b9a..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/clobber.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-// a file in the way
-var itw = ps.slice(0, 3).join('/');
-
-
-test('clobber-pre', function (t) {
- console.error("about to write to "+itw)
- fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
-
- fs.stat(itw, function (er, stat) {
- t.ifError(er)
- t.ok(stat && stat.isFile(), 'should be file')
- t.end()
- })
-})
-
-test('clobber', function (t) {
- t.plan(2);
- mkdirp(file, _0755, function (err) {
- t.ok(err);
- t.equal(err.code, 'ENOTDIR');
- t.end();
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/mkdirp.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/mkdirp.js
deleted file mode 100644
index eaa8921..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/mkdirp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('woo', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/opts_fs.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/opts_fs.js
deleted file mode 100644
index 97186b6..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/opts_fs.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs', function (t) {
- t.plan(5);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp(file, { fs: xfs, mode: _0755 }, function (err) {
- t.ifError(err);
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/opts_fs_sync.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/opts_fs_sync.js
deleted file mode 100644
index 6c370aa..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/opts_fs_sync.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs sync', function (t) {
- t.plan(4);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp.sync(file, { fs: xfs, mode: _0755 });
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/perm.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/perm.js
deleted file mode 100644
index fbce44b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/perm.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('async perm', function (t) {
- t.plan(5);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
-
-test('async root perm', function (t) {
- mkdirp('/tmp', _0755, function (err) {
- if (err) t.fail(err);
- t.end();
- });
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/perm_sync.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/perm_sync.js
deleted file mode 100644
index 398229f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/perm_sync.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync perm', function (t) {
- t.plan(4);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
-
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
-
-test('sync root perm', function (t) {
- t.plan(3);
-
- var file = '/tmp';
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/race.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/race.js
deleted file mode 100644
index b0b9e18..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/race.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('race', function (t) {
- t.plan(10);
- var ps = [ '', 'tmp' ];
-
- for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
- }
- var file = ps.join('/');
-
- var res = 2;
- mk(file);
-
- mk(file);
-
- function mk (file, cb) {
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
- }
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/rel.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/rel.js
deleted file mode 100644
index 4ddb342..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/rel.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('rel', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var cwd = process.cwd();
- process.chdir('/tmp');
-
- var file = [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- process.chdir(cwd);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/return.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/return.js
deleted file mode 100644
index bce68e5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/return.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, '/tmp/' + x);
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, null);
- });
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/return_sync.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/return_sync.js
deleted file mode 100644
index 7c222d3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/return_sync.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- // Note that this will throw on failure, which will fail the test.
- var made = mkdirp.sync(file);
- t.equal(made, '/tmp/' + x);
-
- // making the same file again should have no effect.
- made = mkdirp.sync(file);
- t.equal(made, null);
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/root.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/root.js
deleted file mode 100644
index 9e7d079..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/root.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-test('root', function (t) {
- // '/' on unix, 'c:/' on windows.
- var file = path.resolve('/');
-
- mkdirp(file, _0755, function (err) {
- if (err) throw err
- fs.stat(file, function (er, stat) {
- if (er) throw er
- t.ok(stat.isDirectory(), 'target is a directory');
- t.end();
- })
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/sync.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/sync.js
deleted file mode 100644
index 8c8dc93..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file, _0755);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/umask.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/umask.js
deleted file mode 100644
index 2033c63..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/umask.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('implicit mode from umask', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0777 & (~process.umask()));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/umask_sync.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/umask_sync.js
deleted file mode 100644
index 11a7614..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/mkdirp/test/umask_sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('umask sync modes', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, (_0777 & (~process.umask())));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/LICENSE.txt b/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/LICENSE.txt
deleted file mode 100644
index f580e3d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright © 2012–2015 Domenic Denicola
-
-This work is free. You can redistribute it and/or modify it under the
-terms of the Do What The Fuck You Want To Public License, Version 2,
-as published by Sam Hocevar. See below for more details.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/README.md
deleted file mode 100644
index 8a803f3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# It Opens Stuff
-
-That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them:
-
-```bash
-npm install opener -g
-
-opener http://google.com
-opener ./my-file.txt
-opener firefox
-opener npm run lint
-```
-
-Also if you want to use it programmatically you can do that too:
-
-```js
-var opener = require("opener");
-
-opener("http://google.com");
-opener("./my-file.txt");
-opener("firefox");
-opener("npm run lint");
-```
-
-Plus, it returns the child process created, so you can do things like let your script exit while the window stays open:
-
-```js
-var editor = opener("documentation.odt");
-editor.unref();
-// These other unrefs may be necessary if your OS's opener process
-// exits before the process it started is complete.
-editor.stdin.unref();
-editor.stdout.unref();
-editor.stderr.unref();
-```
-
-
-## Use It for Good
-
-Like opening the user's browser with a test harness in your package's test script:
-
-```json
-{
- "scripts": {
- "test": "opener ./test/runner.html"
- },
- "devDependencies": {
- "opener": "*"
- }
-}
-```
-
-## Why
-
-Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least
-[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all
-three. Like Node.js. And Opener.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/opener.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/opener.js
deleted file mode 100755
index 8951fa2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/opener.js
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env node
-
-"use strict";
-
-var childProcess = require("child_process");
-
-function opener(args, options, callback) {
- // http://stackoverflow.com/q/1480971/3191, but see below for Windows.
- var command = process.platform === "win32" ? "cmd" :
- process.platform === "darwin" ? "open" :
- "xdg-open";
-
- if (typeof args === "string") {
- args = [args];
- }
-
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
-
- if (options && typeof options === "object" && options.command) {
- if (process.platform === "win32") {
- // *always* use cmd on windows
- args = [options.command].concat(args);
- } else {
- command = options.command;
- }
- }
-
- if (process.platform === "win32") {
- // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and
- // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the
- // responsibility to "cmd /c", which has that logic built in.
- //
- // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
- // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
- //
- // Additionally, on Windows ampersand needs to be escaped when passed to "start"
- args = args.map(function(value) {
- return value.replace(/&/g, '^&');
- });
- args = ["/c", "start", '""'].concat(args);
- }
-
- return childProcess.execFile(command, args, options, callback);
-}
-
-// Export `opener` for programmatic access.
-// You might use this to e.g. open a website: `opener("http://google.com")`
-module.exports = opener;
-
-// If we're being called from the command line, just execute, using the command-line arguments.
-if (require.main && require.main.id === module.id) {
- opener(process.argv.slice(2), function (error) {
- if (error) {
- throw error;
- }
- });
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/package.json
deleted file mode 100644
index 0131080..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/opener/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_args": [
- [
- "opener@~1.4.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "opener@>=1.4.0 <1.5.0",
- "_id": "opener@1.4.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/opener",
- "_nodeVersion": "1.5.1",
- "_npmUser": {
- "email": "d@domenic.me",
- "name": "domenic"
- },
- "_npmVersion": "2.7.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "opener",
- "raw": "opener@~1.4.0",
- "rawSpec": "~1.4.0",
- "scope": null,
- "spec": ">=1.4.0 <1.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.1.tgz",
- "_shasum": "897590acd1aed3311b703b58bccb4d43f56f2895",
- "_shrinkwrap": null,
- "_spec": "opener@~1.4.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "d@domenic.me",
- "name": "Domenic Denicola",
- "url": "https://domenic.me/"
- },
- "bin": {
- "opener": "opener.js"
- },
- "bugs": {
- "url": "https://github.com/domenic/opener/issues"
- },
- "dependencies": {},
- "description": "Opens stuff, like webpages and files and executables, cross-platform",
- "devDependencies": {
- "jshint": "^2.6.3"
- },
- "directories": {},
- "dist": {
- "shasum": "897590acd1aed3311b703b58bccb4d43f56f2895",
- "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.1.tgz"
- },
- "files": [
- "opener.js"
- ],
- "gitHead": "d0ee95b19951703462fa593baa16e81fdff7827c",
- "homepage": "https://github.com/domenic/opener",
- "license": "WTFPL",
- "main": "opener.js",
- "maintainers": [
- {
- "name": "domenic",
- "email": "domenic@domenicdenicola.com"
- }
- ],
- "name": "opener",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/domenic/opener.git"
- },
- "scripts": {
- "lint": "jshint opener.js"
- },
- "version": "1.4.1"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/.name b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/.name
deleted file mode 100644
index 9cca3a1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-openurl
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/encodings.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/encodings.xml
deleted file mode 100644
index e206d70..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/encodings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/inspectionProfiles/Project_Default.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index c66df00..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/inspectionProfiles/profiles_settings.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 3b31283..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/misc.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/misc.xml
deleted file mode 100644
index 3284406..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/misc.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- http://www.w3.org/1999/xhtml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/modules.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/modules.xml
deleted file mode 100644
index 8ad08a3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/openurl.iml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/openurl.iml
deleted file mode 100644
index 6b8184f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/openurl.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/scopes/scope_settings.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/vcs.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/vcs.xml
deleted file mode 100644
index def6a6a..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/workspace.xml b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/workspace.xml
deleted file mode 100644
index 750e1e5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.idea/workspace.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1330134580398
- 1330134580398
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.npmignore
deleted file mode 100644
index 08302ef..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.DS_Store
-.idea
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/README.md
deleted file mode 100644
index f66356f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-openurl – Node.js module for opening URLs
-=========================================
-
-openurl is a Node.js module for opening a URL via the operating system. This will usually trigger actions such as:
-
-- http URLs: open the default browser
-- mailto URLs: open the default email client
-- file URLs: open a window showing the directory (on OS X)
-
-Example interaction on the Node.js REPL:
-
- > require("openurl").open("http://rauschma.de")
- > require("openurl").open("mailto:john@example.com")
-
-You can generate emails as follows:
-
- require("openurl").mailto(["john@example.com", "jane@example.com"],
- { subject: "Hello!", body: "This is\nan automatically sent email!\n" });
-
-Install via npm:
-
- npm install openurl
-
-I’m not yet terribly familiar with implementing npm packages, so any feedback is welcome
-(especially experience reports on Windows and Linux, which I can’t test on).
-
-Related reading:
-
-- [Write your shell scripts in JavaScript, via Node.js](http://www.2ality.com/2011/12/nodejs-shell-scripting.html)
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/openurl.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/openurl.js
deleted file mode 100644
index d8c17a0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/openurl.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var spawn = require('child_process').spawn;
-
-var command;
-
-switch(process.platform) {
- case 'darwin':
- command = 'open';
- break;
- case 'win32':
- command = 'explorer.exe';
- break;
- case 'linux':
- command = 'xdg-open';
- break;
- default:
- throw new Error('Unsupported platform: ' + process.platform);
-}
-
-/**
- * Error handling is deliberately minimal, as this function is to be easy to use for shell scripting
- *
- * @param url The URL to open
- * @param callback A function with a single error argument. Optional.
- */
-
-function open(url, callback) {
- var child = spawn(command, [url]);
- var errorText = "";
- child.stderr.setEncoding('utf8');
- child.stderr.on('data', function (data) {
- errorText += data;
- });
- child.stderr.on('end', function () {
- if (errorText.length > 0) {
- var error = new Error(errorText);
- if (callback) {
- callback(error);
- } else {
- throw error;
- }
- } else if (callback) {
- callback(error);
- }
- });
-}
-
-/**
- * @param fields Common fields are: "subject", "body".
- * Some email apps let you specify arbitrary headers here.
- * @param recipientsSeparator Default is ",". Use ";" for Outlook.
- */
-function mailto(recipients, fields, recipientsSeparator, callback) {
- recipientsSeparator = recipientsSeparator || ",";
-
- var url = "mailto:"+recipients.join(recipientsSeparator);
- Object.keys(fields).forEach(function (key, index) {
- if (index === 0) {
- url += "?";
- } else {
- url += "&";
- }
- url += key + "=" + encodeURIComponent(fields[key]);
- });
- open(url, callback);
-}
-
-exports.open = open;
-exports.mailto = mailto;
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/package.json
deleted file mode 100644
index ff1592d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/openurl/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_args": [
- [
- "openurl@^1.1.0",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides"
- ]
- ],
- "_defaultsLoaded": true,
- "_engineSupported": true,
- "_from": "openurl@>=1.1.0 <2.0.0",
- "_id": "openurl@1.1.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/openurl",
- "_nodeVersion": "v0.6.6",
- "_npmUser": {
- "email": "axel@rauschma.de",
- "name": "rauschma"
- },
- "_npmVersion": "1.0.106",
- "_phantomChildren": {},
- "_requested": {
- "name": "openurl",
- "raw": "openurl@^1.1.0",
- "rawSpec": "^1.1.0",
- "scope": null,
- "spec": ">=1.1.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.0.tgz",
- "_shasum": "e2f2189d999c04823201f083f0f1a7cd8903187a",
- "_shrinkwrap": null,
- "_spec": "openurl@^1.1.0",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides",
- "author": {
- "email": "axe@rauschma.de",
- "name": "Axel Rauschmayer"
- },
- "bugs": {
- "url": "https://github.com/rauschma/openurl/issues"
- },
- "dependencies": {},
- "description": "Open a URL via the operating system (http: in default browser, mailto: in mail client etc.",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "e2f2189d999c04823201f083f0f1a7cd8903187a",
- "tarball": "http://registry.npmjs.org/openurl/-/openurl-1.1.0.tgz"
- },
- "engines": {
- "node": "*"
- },
- "homepage": "https://github.com/rauschma/openurl#readme",
- "keywords": [
- "browser",
- "desktop"
- ],
- "license": "MIT",
- "main": "./openurl.js",
- "maintainers": [
- {
- "name": "rauschma",
- "email": "axel@rauschma.de"
- }
- ],
- "name": "openurl",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/rauschma/openurl.git"
- },
- "version": "1.1.0"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/LICENSE
deleted file mode 100644
index 432d1ae..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright 2010 James Halliday (mail@substack.net)
-
-This project is free software released under the MIT/X11 license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/bool.js
deleted file mode 100644
index a998fb7..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/bool.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-var util = require('util');
-var argv = require('optimist').argv;
-
-if (argv.s) {
- util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
-}
-console.log(
- (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
-);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/boolean_double.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/boolean_double.js
deleted file mode 100644
index a35a7e6..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/boolean_double.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean(['x','y','z'])
- .argv
-;
-console.dir([ argv.x, argv.y, argv.z ]);
-console.dir(argv._);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/boolean_single.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/boolean_single.js
deleted file mode 100644
index 017bb68..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/boolean_single.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean('v')
- .argv
-;
-console.dir(argv.v);
-console.dir(argv._);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/default_hash.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/default_hash.js
deleted file mode 100644
index ade7768..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/default_hash.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var argv = require('optimist')
- .default({ x : 10, y : 10 })
- .argv
-;
-
-console.log(argv.x + argv.y);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/default_singles.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/default_singles.js
deleted file mode 100644
index d9b1ff4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/default_singles.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .default('x', 10)
- .default('y', 10)
- .argv
-;
-console.log(argv.x + argv.y);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/divide.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/divide.js
deleted file mode 100644
index 5e2ee82..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/divide.js
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-var argv = require('optimist')
- .usage('Usage: $0 -x [num] -y [num]')
- .demand(['x','y'])
- .argv;
-
-console.log(argv.x / argv.y);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count.js
deleted file mode 100644
index b5f95bf..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count.js
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .demand('f')
- .alias('f', 'file')
- .describe('f', 'Load a file')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines);
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count_options.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count_options.js
deleted file mode 100644
index d9ac709..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count_options.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .options({
- file : {
- demand : true,
- alias : 'f',
- description : 'Load a file'
- },
- base : {
- alias : 'b',
- description : 'Numeric base to use for output',
- default : 10,
- },
- })
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines.toString(argv.base));
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count_wrap.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count_wrap.js
deleted file mode 100644
index 4267511..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/line_count_wrap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .wrap(80)
- .demand('f')
- .alias('f', [ 'file', 'filename' ])
- .describe('f',
- "Load a file. It's pretty important."
- + " Required even. So you'd better specify it."
- )
- .alias('b', 'base')
- .describe('b', 'Numeric base to display the number of lines in')
- .default('b', 10)
- .describe('x', 'Super-secret optional parameter which is secret')
- .default('x', '')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines.toString(argv.base));
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/nonopt.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/nonopt.js
deleted file mode 100644
index ee633ee..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/nonopt.js
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-console.log(argv._);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/reflect.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/reflect.js
deleted file mode 100644
index 816b3e1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/reflect.js
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env node
-console.dir(require('optimist').argv);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/short.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/short.js
deleted file mode 100644
index 1db0ad0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/short.js
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/string.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/string.js
deleted file mode 100644
index a8e5aeb..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/string.js
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist')
- .string('x', 'y')
- .argv
-;
-console.dir([ argv.x, argv.y ]);
-
-/* Turns off numeric coercion:
- ./node string.js -x 000123 -y 9876
- [ '000123', '9876' ]
-*/
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/usage-options.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/usage-options.js
deleted file mode 100644
index b999977..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/usage-options.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var optimist = require('./../index');
-
-var argv = optimist.usage('This is my awesome program', {
- 'about': {
- description: 'Provide some details about the author of this program',
- required: true,
- short: 'a',
- },
- 'info': {
- description: 'Provide some information about the node.js agains!!!!!!',
- boolean: true,
- short: 'i'
- }
-}).argv;
-
-optimist.showHelp();
-
-console.log('\n\nInspecting options');
-console.dir(argv);
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/xup.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/xup.js
deleted file mode 100644
index 8f6ecd2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/example/xup.js
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-
-if (argv.rif - 5 * argv.xup > 7.138) {
- console.log('Buy more riffiwobbles');
-}
-else {
- console.log('Sell the xupptumblers');
-}
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/index.js
deleted file mode 100644
index 4da5a6d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/index.js
+++ /dev/null
@@ -1,343 +0,0 @@
-var path = require('path');
-var minimist = require('minimist');
-var wordwrap = require('wordwrap');
-
-/* Hack an instance of Argv with process.argv into Argv
- so people can do
- require('optimist')(['--beeble=1','-z','zizzle']).argv
- to parse a list of args and
- require('optimist').argv
- to get a parsed version of process.argv.
-*/
-
-var inst = Argv(process.argv.slice(2));
-Object.keys(inst).forEach(function (key) {
- Argv[key] = typeof inst[key] == 'function'
- ? inst[key].bind(inst)
- : inst[key];
-});
-
-var exports = module.exports = Argv;
-function Argv (processArgs, cwd) {
- var self = {};
- if (!cwd) cwd = process.cwd();
-
- self.$0 = process.argv
- .slice(0,2)
- .map(function (x) {
- var b = rebase(cwd, x);
- return x.match(/^\//) && b.length < x.length
- ? b : x
- })
- .join(' ')
- ;
-
- if (process.env._ != undefined && process.argv[1] == process.env._) {
- self.$0 = process.env._.replace(
- path.dirname(process.execPath) + '/', ''
- );
- }
-
- var options = {
- boolean: [],
- string: [],
- alias: {},
- default: []
- };
-
- self.boolean = function (bools) {
- options.boolean.push.apply(options.boolean, [].concat(bools));
- return self;
- };
-
- self.string = function (strings) {
- options.string.push.apply(options.string, [].concat(strings));
- return self;
- };
-
- self.default = function (key, value) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.default(k, key[k]);
- });
- }
- else {
- options.default[key] = value;
- }
- return self;
- };
-
- self.alias = function (x, y) {
- if (typeof x === 'object') {
- Object.keys(x).forEach(function (key) {
- self.alias(key, x[key]);
- });
- }
- else {
- options.alias[x] = (options.alias[x] || []).concat(y);
- }
- return self;
- };
-
- var demanded = {};
- self.demand = function (keys) {
- if (typeof keys == 'number') {
- if (!demanded._) demanded._ = 0;
- demanded._ += keys;
- }
- else if (Array.isArray(keys)) {
- keys.forEach(function (key) {
- self.demand(key);
- });
- }
- else {
- demanded[keys] = true;
- }
-
- return self;
- };
-
- var usage;
- self.usage = function (msg, opts) {
- if (!opts && typeof msg === 'object') {
- opts = msg;
- msg = null;
- }
-
- usage = msg;
-
- if (opts) self.options(opts);
-
- return self;
- };
-
- function fail (msg) {
- self.showHelp();
- if (msg) console.error(msg);
- process.exit(1);
- }
-
- var checks = [];
- self.check = function (f) {
- checks.push(f);
- return self;
- };
-
- var descriptions = {};
- self.describe = function (key, desc) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.describe(k, key[k]);
- });
- }
- else {
- descriptions[key] = desc;
- }
- return self;
- };
-
- self.parse = function (args) {
- return parseArgs(args);
- };
-
- self.option = self.options = function (key, opt) {
- if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
- self.options(k, key[k]);
- });
- }
- else {
- if (opt.alias) self.alias(key, opt.alias);
- if (opt.demand) self.demand(key);
- if (typeof opt.default !== 'undefined') {
- self.default(key, opt.default);
- }
-
- if (opt.boolean || opt.type === 'boolean') {
- self.boolean(key);
- }
- if (opt.string || opt.type === 'string') {
- self.string(key);
- }
-
- var desc = opt.describe || opt.description || opt.desc;
- if (desc) {
- self.describe(key, desc);
- }
- }
-
- return self;
- };
-
- var wrap = null;
- self.wrap = function (cols) {
- wrap = cols;
- return self;
- };
-
- self.showHelp = function (fn) {
- if (!fn) fn = console.error;
- fn(self.help());
- };
-
- self.help = function () {
- var keys = Object.keys(
- Object.keys(descriptions)
- .concat(Object.keys(demanded))
- .concat(Object.keys(options.default))
- .reduce(function (acc, key) {
- if (key !== '_') acc[key] = true;
- return acc;
- }, {})
- );
-
- var help = keys.length ? [ 'Options:' ] : [];
-
- if (usage) {
- help.unshift(usage.replace(/\$0/g, self.$0), '');
- }
-
- var switches = keys.reduce(function (acc, key) {
- acc[key] = [ key ].concat(options.alias[key] || [])
- .map(function (sw) {
- return (sw.length > 1 ? '--' : '-') + sw
- })
- .join(', ')
- ;
- return acc;
- }, {});
-
- var switchlen = longest(Object.keys(switches).map(function (s) {
- return switches[s] || '';
- }));
-
- var desclen = longest(Object.keys(descriptions).map(function (d) {
- return descriptions[d] || '';
- }));
-
- keys.forEach(function (key) {
- var kswitch = switches[key];
- var desc = descriptions[key] || '';
-
- if (wrap) {
- desc = wordwrap(switchlen + 4, wrap)(desc)
- .slice(switchlen + 4)
- ;
- }
-
- var spadding = new Array(
- Math.max(switchlen - kswitch.length + 3, 0)
- ).join(' ');
-
- var dpadding = new Array(
- Math.max(desclen - desc.length + 1, 0)
- ).join(' ');
-
- var type = null;
-
- if (options.boolean[key]) type = '[boolean]';
- if (options.string[key]) type = '[string]';
-
- if (!wrap && dpadding.length > 0) {
- desc += dpadding;
- }
-
- var prelude = ' ' + kswitch + spadding;
- var extra = [
- type,
- demanded[key]
- ? '[required]'
- : null
- ,
- options.default[key] !== undefined
- ? '[default: ' + JSON.stringify(options.default[key]) + ']'
- : null
- ,
- ].filter(Boolean).join(' ');
-
- var body = [ desc, extra ].filter(Boolean).join(' ');
-
- if (wrap) {
- var dlines = desc.split('\n');
- var dlen = dlines.slice(-1)[0].length
- + (dlines.length === 1 ? prelude.length : 0)
-
- body = desc + (dlen + extra.length > wrap - 2
- ? '\n'
- + new Array(wrap - extra.length + 1).join(' ')
- + extra
- : new Array(wrap - extra.length - dlen + 1).join(' ')
- + extra
- );
- }
-
- help.push(prelude + body);
- });
-
- help.push('');
- return help.join('\n');
- };
-
- Object.defineProperty(self, 'argv', {
- get : function () { return parseArgs(processArgs) },
- enumerable : true,
- });
-
- function parseArgs (args) {
- var argv = minimist(args, options);
- argv.$0 = self.$0;
-
- if (demanded._ && argv._.length < demanded._) {
- fail('Not enough non-option arguments: got '
- + argv._.length + ', need at least ' + demanded._
- );
- }
-
- var missing = [];
- Object.keys(demanded).forEach(function (key) {
- if (!argv[key]) missing.push(key);
- });
-
- if (missing.length) {
- fail('Missing required arguments: ' + missing.join(', '));
- }
-
- checks.forEach(function (f) {
- try {
- if (f(argv) === false) {
- fail('Argument check failed: ' + f.toString());
- }
- }
- catch (err) {
- fail(err)
- }
- });
-
- return argv;
- }
-
- function longest (xs) {
- return Math.max.apply(
- null,
- xs.map(function (x) { return x.length })
- );
- }
-
- return self;
-};
-
-// rebase an absolute path to a relative one with respect to a base directory
-// exported for tests
-exports.rebase = rebase;
-function rebase (base, dir) {
- var ds = path.normalize(dir).split('/').slice(1);
- var bs = path.normalize(base).split('/').slice(1);
-
- for (var i = 0; ds[i] && ds[i] == bs[i]; i++);
- ds.splice(0, i); bs.splice(0, i);
-
- var p = path.normalize(
- bs.map(function () { return '..' }).concat(ds).join('/')
- ).replace(/\/$/,'').replace(/^$/, '.');
- return p.match(/^[.\/]/) ? p : './' + p;
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/.travis.yml
deleted file mode 100644
index cc4dba2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/example/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/example/parse.js
deleted file mode 100644
index abff3e8..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/example/parse.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/index.js
deleted file mode 100644
index 71fb830..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/index.js
+++ /dev/null
@@ -1,187 +0,0 @@
-module.exports = function (args, opts) {
- if (!opts) opts = {};
-
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function (key) {
- aliases[key] = [].concat(opts.alias[key]);
- aliases[key].forEach(function (x) {
- aliases[x] = [key].concat(aliases[key].filter(function (y) {
- return x !== y;
- }));
- });
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- if (aliases[key]) {
- flags.strings[aliases[key]] = true;
- }
- });
-
- var defaults = opts['default'] || {};
-
- var argv = { _ : [] };
- Object.keys(flags.bools).forEach(function (key) {
- setArg(key, defaults[key] === undefined ? false : defaults[key]);
- });
-
- var notFlags = [];
-
- if (args.indexOf('--') !== -1) {
- notFlags = args.slice(args.indexOf('--')+1);
- args = args.slice(0, args.indexOf('--'));
- }
-
- function setArg (key, val) {
- var value = !flags.strings[key] && isNumber(val)
- ? Number(val) : val
- ;
- setKey(argv, key.split('.'), value);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), value);
- });
- }
-
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
-
- if (/^--.+=/.test(arg)) {
- // Using [\s\S] instead of . because js doesn't support the
- // 'dotall' regex modifier. See:
- // http://stackoverflow.com/a/1068308/13216
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
- }
- else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
- }
- else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== undefined && !/^-/.test(next)
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
- i++;
- }
- else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1,-1).split('');
-
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j+2);
-
- if (next === '-') {
- setArg(letters[j], next)
- continue;
- }
-
- if (/[A-Za-z]/.test(letters[j])
- && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
- broken = true;
- break;
- }
-
- if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
- broken = true;
- break;
- }
- else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
- }
- }
-
- var key = arg.slice(-1)[0];
- if (!broken && key !== '-') {
- if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
- && !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
- i++;
- }
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
- i++;
- }
- else {
- setArg(key, flags.strings[key] ? '' : true);
- }
- }
- }
- else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
- }
- }
-
- Object.keys(defaults).forEach(function (key) {
- if (!hasKey(argv, key.split('.'))) {
- setKey(argv, key.split('.'), defaults[key]);
-
- (aliases[key] || []).forEach(function (x) {
- setKey(argv, x.split('.'), defaults[key]);
- });
- }
- });
-
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
-
- return argv;
-};
-
-function hasKey (obj, keys) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- o = (o[key] || {});
- });
-
- var key = keys[keys.length - 1];
- return key in o;
-}
-
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
-function isNumber (x) {
- if (typeof x === 'number') return true;
- if (/^0x[0-9a-f]+$/i.test(x)) return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
-}
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/package.json
deleted file mode 100644
index 23b5b15..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "_args": [
- [
- "minimist@~0.0.1",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist"
- ]
- ],
- "_from": "minimist@>=0.0.1 <0.1.0",
- "_id": "minimist@0.0.10",
- "_inCache": true,
- "_installable": true,
- "_location": "/optimist/minimist",
- "_npmUser": {
- "email": "mail@substack.net",
- "name": "substack"
- },
- "_npmVersion": "1.4.3",
- "_phantomChildren": {},
- "_requested": {
- "name": "minimist",
- "raw": "minimist@~0.0.1",
- "rawSpec": "~0.0.1",
- "scope": null,
- "spec": ">=0.0.1 <0.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/optimist"
- ],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
- "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf",
- "_shrinkwrap": null,
- "_spec": "minimist@~0.0.1",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/minimist/issues"
- },
- "dependencies": {},
- "description": "parse argument options",
- "devDependencies": {
- "tap": "~0.4.0",
- "tape": "~1.0.4"
- },
- "directories": {},
- "dist": {
- "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf",
- "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz"
- },
- "homepage": "https://github.com/substack/minimist",
- "keywords": [
- "argv",
- "getopt",
- "optimist",
- "parser"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "minimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/minimist.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "testling": {
- "browsers": [
- "chrome/10",
- "chrome/latest",
- "ff/5",
- "firefox/latest",
- "ie/6..latest",
- "opera/12",
- "safari/5.1",
- "safari/latest"
- ],
- "files": "test/*.js"
- },
- "version": "0.0.10"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/readme.markdown b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/readme.markdown
deleted file mode 100644
index c256353..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/readme.markdown
+++ /dev/null
@@ -1,73 +0,0 @@
-# minimist
-
-parse argument options
-
-This module is the guts of optimist's argument parser without all the
-fanciful decoration.
-
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
-# example
-
-``` js
-var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
-```
-
-```
-$ node example/parse.js -a beep -b boop
-{ _: [], a: 'beep', b: 'boop' }
-```
-
-```
-$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
-{ _: [ 'foo', 'bar', 'baz' ],
- x: 3,
- y: 4,
- n: 5,
- a: true,
- b: true,
- c: true,
- beep: 'boop' }
-```
-
-# methods
-
-``` js
-var parseArgs = require('minimist')
-```
-
-## var argv = parseArgs(args, opts={})
-
-Return an argument object `argv` populated with the array arguments from `args`.
-
-`argv._` contains all the arguments that didn't have an option associated with
-them.
-
-Numeric-looking arguments will be returned as numbers unless `opts.string` or
-`opts.boolean` is set for that argument name.
-
-Any arguments after `'--'` will not be parsed and will end up in `argv._`.
-
-options can be:
-
-* `opts.string` - a string or array of strings argument names to always treat as
-strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
-* `opts.alias` - an object mapping string names to strings or arrays of string
-argument names to use as aliases
-* `opts.default` - an object mapping string argument names to default values
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```
-npm install minimist
-```
-
-# license
-
-MIT
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/bool.js
deleted file mode 100644
index 749e083..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/bool.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/dash.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/dash.js
deleted file mode 100644
index 8b034b9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/default_bool.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/dotted.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/dotted.js
deleted file mode 100644
index d8b3e85..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
-
-test('dotted default with no alias', function (t) {
- var argv = parse('', {default: {'a.b': 11}});
- t.equal(argv.a.b, 11);
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/long.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/num.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/num.js
deleted file mode 100644
index 2cc77f4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/num.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('already a number', function (t) {
- var argv = parse([ '-x', 1234, 789 ]);
- t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/parse.js
deleted file mode 100644
index 7b4a2a1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,197 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('string and alias', function(t) {
- var x = parse([ '--str', '000123' ], {
- string: 's',
- alias: { s: 'str' }
- });
-
- t.equal(x.str, '000123');
- t.equal(typeof x.str, 'string');
- t.equal(x.s, '000123');
- t.equal(typeof x.s, 'string');
-
- var y = parse([ '-s', '000123' ], {
- string: 'str',
- alias: { str: 's' }
- });
-
- t.equal(y.str, '000123');
- t.equal(typeof y.str, 'string');
- t.equal(y.s, '000123');
- t.equal(typeof y.s, 'string');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/short.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/whitespace.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/package.json
deleted file mode 100644
index 8fb0544..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_args": [
- [
- "optimist@0.6.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "optimist@>=0.6.0 <0.7.0",
- "_id": "optimist@0.6.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/optimist",
- "_npmUser": {
- "email": "mail@substack.net",
- "name": "substack"
- },
- "_npmVersion": "1.3.21",
- "_phantomChildren": {},
- "_requested": {
- "name": "optimist",
- "raw": "optimist@0.6.x",
- "rawSpec": "0.6.x",
- "scope": null,
- "spec": ">=0.6.0 <0.7.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
- "_shasum": "da3ea74686fa21a19a111c326e90eb15a0196686",
- "_shrinkwrap": null,
- "_spec": "optimist@0.6.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/node-optimist/issues"
- },
- "dependencies": {
- "minimist": "~0.0.1",
- "wordwrap": "~0.0.2"
- },
- "description": "Light-weight option parsing with an argv hash. No optstrings attached.",
- "devDependencies": {
- "hashish": "~0.0.4",
- "tap": "~0.4.0"
- },
- "directories": {},
- "dist": {
- "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686",
- "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz"
- },
- "engine": {
- "node": ">=0.4"
- },
- "homepage": "https://github.com/substack/node-optimist",
- "keywords": [
- "args",
- "argument",
- "cli",
- "command",
- "option",
- "parser",
- "parsing"
- ],
- "license": "MIT/X11",
- "main": "./index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "optimist",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/substack/node-optimist.git"
- },
- "scripts": {
- "test": "tap ./test/*.js"
- },
- "version": "0.6.1"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/readme.markdown b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/readme.markdown
deleted file mode 100644
index b74b437..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/readme.markdown
+++ /dev/null
@@ -1,513 +0,0 @@
-# DEPRECATION NOTICE
-
-I don't want to maintain this module anymore since I just use
-[minimist](https://npmjs.org/package/minimist), the argument parsing engine,
-directly instead nowadays.
-
-See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed
-successor to optimist.
-
-[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs)
-
-You should also consider [nomnom](https://github.com/harthur/nomnom).
-
-optimist
-========
-
-Optimist is a node.js library for option parsing for people who hate option
-parsing. More specifically, this module is for people who like all the --bells
-and -whistlz of program usage but think optstrings are a waste of time.
-
-With optimist, option parsing doesn't have to suck (as much).
-
-[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)
-
-examples
-========
-
-With Optimist, the options are just a hash! No optstrings attached.
--------------------------------------------------------------------
-
-xup.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-
-if (argv.rif - 5 * argv.xup > 7.138) {
- console.log('Buy more riffiwobbles');
-}
-else {
- console.log('Sell the xupptumblers');
-}
-````
-
-***
-
- $ ./xup.js --rif=55 --xup=9.52
- Buy more riffiwobbles
-
- $ ./xup.js --rif 12 --xup 8.1
- Sell the xupptumblers
-
-![This one's optimistic.](http://substack.net/images/optimistic.png)
-
-But wait! There's more! You can do short options:
--------------------------------------------------
-
-short.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-````
-
-***
-
- $ ./short.js -x 10 -y 21
- (10,21)
-
-And booleans, both long and short (and grouped):
-----------------------------------
-
-bool.js:
-
-````javascript
-#!/usr/bin/env node
-var util = require('util');
-var argv = require('optimist').argv;
-
-if (argv.s) {
- util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
-}
-console.log(
- (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
-);
-````
-
-***
-
- $ ./bool.js -s
- The cat says: meow
-
- $ ./bool.js -sp
- The cat says: meow.
-
- $ ./bool.js -sp --fr
- Le chat dit: miaou.
-
-And non-hypenated options too! Just use `argv._`!
--------------------------------------------------
-
-nonopt.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist').argv;
-console.log('(%d,%d)', argv.x, argv.y);
-console.log(argv._);
-````
-
-***
-
- $ ./nonopt.js -x 6.82 -y 3.35 moo
- (6.82,3.35)
- [ 'moo' ]
-
- $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz
- (0.54,1.12)
- [ 'foo', 'bar', 'baz' ]
-
-Plus, Optimist comes with .usage() and .demand()!
--------------------------------------------------
-
-divide.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Usage: $0 -x [num] -y [num]')
- .demand(['x','y'])
- .argv;
-
-console.log(argv.x / argv.y);
-````
-
-***
-
- $ ./divide.js -x 55 -y 11
- 5
-
- $ node ./divide.js -x 4.91 -z 2.51
- Usage: node ./divide.js -x [num] -y [num]
-
- Options:
- -x [required]
- -y [required]
-
- Missing required arguments: y
-
-EVEN MORE HOLY COW
-------------------
-
-default_singles.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .default('x', 10)
- .default('y', 10)
- .argv
-;
-console.log(argv.x + argv.y);
-````
-
-***
-
- $ ./default_singles.js -x 5
- 15
-
-default_hash.js:
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .default({ x : 10, y : 10 })
- .argv
-;
-console.log(argv.x + argv.y);
-````
-
-***
-
- $ ./default_hash.js -y 7
- 17
-
-And if you really want to get all descriptive about it...
----------------------------------------------------------
-
-boolean_single.js
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean('v')
- .argv
-;
-console.dir(argv);
-````
-
-***
-
- $ ./boolean_single.js -v foo bar baz
- true
- [ 'bar', 'baz', 'foo' ]
-
-boolean_double.js
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .boolean(['x','y','z'])
- .argv
-;
-console.dir([ argv.x, argv.y, argv.z ]);
-console.dir(argv._);
-````
-
-***
-
- $ ./boolean_double.js -x -z one two three
- [ true, false, true ]
- [ 'one', 'two', 'three' ]
-
-Optimist is here to help...
----------------------------
-
-You can describe parameters for help messages and set aliases. Optimist figures
-out how to format a handy help string automatically.
-
-line_count.js
-
-````javascript
-#!/usr/bin/env node
-var argv = require('optimist')
- .usage('Count the lines in a file.\nUsage: $0')
- .demand('f')
- .alias('f', 'file')
- .describe('f', 'Load a file')
- .argv
-;
-
-var fs = require('fs');
-var s = fs.createReadStream(argv.file);
-
-var lines = 0;
-s.on('data', function (buf) {
- lines += buf.toString().match(/\n/g).length;
-});
-
-s.on('end', function () {
- console.log(lines);
-});
-````
-
-***
-
- $ node line_count.js
- Count the lines in a file.
- Usage: node ./line_count.js
-
- Options:
- -f, --file Load a file [required]
-
- Missing required arguments: f
-
- $ node line_count.js --file line_count.js
- 20
-
- $ node line_count.js -f line_count.js
- 20
-
-methods
-=======
-
-By itself,
-
-````javascript
-require('optimist').argv
-`````
-
-will use `process.argv` array to construct the `argv` object.
-
-You can pass in the `process.argv` yourself:
-
-````javascript
-require('optimist')([ '-x', '1', '-y', '2' ]).argv
-````
-
-or use .parse() to do the same thing:
-
-````javascript
-require('optimist').parse([ '-x', '1', '-y', '2' ])
-````
-
-The rest of these methods below come in just before the terminating `.argv`.
-
-.alias(key, alias)
-------------------
-
-Set key names as equivalent such that updates to a key will propagate to aliases
-and vice-versa.
-
-Optionally `.alias()` can take an object that maps keys to aliases.
-
-.default(key, value)
---------------------
-
-Set `argv[key]` to `value` if no option was specified on `process.argv`.
-
-Optionally `.default()` can take an object that maps keys to default values.
-
-.demand(key)
-------------
-
-If `key` is a string, show the usage information and exit if `key` wasn't
-specified in `process.argv`.
-
-If `key` is a number, demand at least as many non-option arguments, which show
-up in `argv._`.
-
-If `key` is an Array, demand each element.
-
-.describe(key, desc)
---------------------
-
-Describe a `key` for the generated usage information.
-
-Optionally `.describe()` can take an object that maps keys to descriptions.
-
-.options(key, opt)
-------------------
-
-Instead of chaining together `.alias().demand().default()`, you can specify
-keys in `opt` for each of the chainable methods.
-
-For example:
-
-````javascript
-var argv = require('optimist')
- .options('f', {
- alias : 'file',
- default : '/etc/passwd',
- })
- .argv
-;
-````
-
-is the same as
-
-````javascript
-var argv = require('optimist')
- .alias('f', 'file')
- .default('f', '/etc/passwd')
- .argv
-;
-````
-
-Optionally `.options()` can take an object that maps keys to `opt` parameters.
-
-.usage(message)
----------------
-
-Set a usage message to show which commands to use. Inside `message`, the string
-`$0` will get interpolated to the current script name or node command for the
-present script similar to how `$0` works in bash or perl.
-
-.check(fn)
-----------
-
-Check that certain conditions are met in the provided arguments.
-
-If `fn` throws or returns `false`, show the thrown error, usage information, and
-exit.
-
-.boolean(key)
--------------
-
-Interpret `key` as a boolean. If a non-flag option follows `key` in
-`process.argv`, that string won't get set as the value of `key`.
-
-If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be
-`false`.
-
-If `key` is an Array, interpret all the elements as booleans.
-
-.string(key)
-------------
-
-Tell the parser logic not to interpret `key` as a number or boolean.
-This can be useful if you need to preserve leading zeros in an input.
-
-If `key` is an Array, interpret all the elements as strings.
-
-.wrap(columns)
---------------
-
-Format usage output to wrap at `columns` many columns.
-
-.help()
--------
-
-Return the generated usage string.
-
-.showHelp(fn=console.error)
----------------------------
-
-Print the usage data using `fn` for printing.
-
-.parse(args)
-------------
-
-Parse `args` instead of `process.argv`. Returns the `argv` object.
-
-.argv
------
-
-Get the arguments as a plain old object.
-
-Arguments without a corresponding flag show up in the `argv._` array.
-
-The script name or node command is available at `argv.$0` similarly to how `$0`
-works in bash or perl.
-
-parsing tricks
-==============
-
-stop parsing
-------------
-
-Use `--` to stop parsing flags and stuff the remainder into `argv._`.
-
- $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4
- { _: [ '-c', '3', '-d', '4' ],
- '$0': 'node ./examples/reflect.js',
- a: 1,
- b: 2 }
-
-negate fields
--------------
-
-If you want to explicity set a field to false instead of just leaving it
-undefined or to override a default you can do `--no-key`.
-
- $ node examples/reflect.js -a --no-b
- { _: [],
- '$0': 'node ./examples/reflect.js',
- a: true,
- b: false }
-
-numbers
--------
-
-Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to
-one. This way you can just `net.createConnection(argv.port)` and you can add
-numbers out of `argv` with `+` without having that mean concatenation,
-which is super frustrating.
-
-duplicates
-----------
-
-If you specify a flag multiple times it will get turned into an array containing
-all the values in order.
-
- $ node examples/reflect.js -x 5 -x 8 -x 0
- { _: [],
- '$0': 'node ./examples/reflect.js',
- x: [ 5, 8, 0 ] }
-
-dot notation
-------------
-
-When you use dots (`.`s) in argument names, an implicit object path is assumed.
-This lets you organize arguments into nested objects.
-
- $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5
- { _: [],
- '$0': 'node ./examples/reflect.js',
- foo: { bar: { baz: 33 }, quux: 5 } }
-
-short numbers
--------------
-
-Short numeric `head -n5` style argument work too:
-
- $ node reflect.js -n123 -m456
- { '3': true,
- '6': true,
- _: [],
- '$0': 'node ./reflect.js',
- n: 123,
- m: 456 }
-
-installation
-============
-
-With [npm](http://github.com/isaacs/npm), just do:
- npm install optimist
-
-or clone this project on github:
-
- git clone http://github.com/substack/node-optimist.git
-
-To run the tests with [expresso](http://github.com/visionmedia/expresso),
-just do:
-
- expresso
-
-inspired By
-===========
-
-This module is loosely inspired by Perl's
-[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_.js
deleted file mode 100644
index d9c58b3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_.js
+++ /dev/null
@@ -1,71 +0,0 @@
-var spawn = require('child_process').spawn;
-var test = require('tap').test;
-
-test('dotSlashEmpty', testCmd('./bin.js', []));
-
-test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ]));
-
-test('nodeEmpty', testCmd('node bin.js', []));
-
-test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ]));
-
-test('whichNodeEmpty', function (t) {
- var which = spawn('which', ['node']);
-
- which.stdout.on('data', function (buf) {
- t.test(
- testCmd(buf.toString().trim() + ' bin.js', [])
- );
- t.end();
- });
-
- which.stderr.on('data', function (err) {
- assert.error(err);
- t.end();
- });
-});
-
-test('whichNodeArgs', function (t) {
- var which = spawn('which', ['node']);
-
- which.stdout.on('data', function (buf) {
- t.test(
- testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ])
- );
- t.end();
- });
-
- which.stderr.on('data', function (err) {
- t.error(err);
- t.end();
- });
-});
-
-function testCmd (cmd, args) {
-
- return function (t) {
- var to = setTimeout(function () {
- assert.fail('Never got stdout data.')
- }, 5000);
-
- var oldDir = process.cwd();
- process.chdir(__dirname + '/_');
-
- var cmds = cmd.split(' ');
-
- var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String)));
- process.chdir(oldDir);
-
- bin.stderr.on('data', function (err) {
- t.error(err);
- t.end();
- });
-
- bin.stdout.on('data', function (buf) {
- clearTimeout(to);
- var _ = JSON.parse(buf.toString());
- t.same(_.map(String), args.map(String));
- t.end();
- });
- };
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_/argv.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_/argv.js
deleted file mode 100644
index 3d09606..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_/argv.js
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env node
-console.log(JSON.stringify(process.argv));
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_/bin.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_/bin.js
deleted file mode 100755
index 4a18d85..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/_/bin.js
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-var argv = require('../../index').argv
-console.log(JSON.stringify(argv._));
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/dash.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/dash.js
deleted file mode 100644
index af8ed6f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/dash.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var optimist = require('../index');
-var test = require('tap').test;
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(
- fix(optimist.parse([ '-n', '-' ])),
- { n: '-', _: [] }
- );
- t.deepEqual(
- fix(optimist.parse([ '-' ])),
- { _: [ '-' ] }
- );
- t.deepEqual(
- fix(optimist.parse([ '-f-' ])),
- { f: '-', _: [] }
- );
- t.deepEqual(
- fix(optimist([ '-b', '-' ]).boolean('b').argv),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- fix(optimist([ '-s', '-' ]).string('s').argv),
- { s: '-', _: [] }
- );
-});
-
-function fix (obj) {
- delete obj.$0;
- return obj;
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/parse.js
deleted file mode 100644
index d320f43..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/parse.js
+++ /dev/null
@@ -1,446 +0,0 @@
-var optimist = require('../index');
-var path = require('path');
-var test = require('tap').test;
-
-var $0 = 'node ./' + path.relative(process.cwd(), __filename);
-
-test('short boolean', function (t) {
- var parse = optimist.parse([ '-b' ]);
- t.same(parse, { b : true, _ : [], $0 : $0 });
- t.same(typeof parse.b, 'boolean');
- t.end();
-});
-
-test('long boolean', function (t) {
- t.same(
- optimist.parse([ '--bool' ]),
- { bool : true, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('bare', function (t) {
- t.same(
- optimist.parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 }
- );
- t.end();
-});
-
-test('short group', function (t) {
- t.same(
- optimist.parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('short group next', function (t) {
- t.same(
- optimist.parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('short capture', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('short captures', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('long capture sp', function (t) {
- t.same(
- optimist.parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('long capture eq', function (t) {
- t.same(
- optimist.parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [], $0 : $0 }
- );
- t.end()
-});
-
-test('long captures sp', function (t) {
- t.same(
- optimist.parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('long captures eq', function (t) {
- t.same(
- optimist.parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ], $0 : $0,
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.same(
- optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ], $0 : $0,
- }
- );
- t.end();
-});
-
-test('no', function (t) {
- t.same(
- optimist.parse([ '--no-moo' ]),
- { moo : false, _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('multi', function (t) {
- t.same(
- optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.same(
- optimist.parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ],
- $0 : $0
- }
- );
- t.end();
-});
-
-test('nums', function (t) {
- var argv = optimist.parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789',
- ]);
- t.same(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ],
- $0 : $0
- });
- t.same(typeof argv.x, 'number');
- t.same(typeof argv.y, 'number');
- t.same(typeof argv.z, 'number');
- t.same(typeof argv.w, 'string');
- t.same(typeof argv.hex, 'number');
- t.same(typeof argv._[0], 'number');
- t.end();
-});
-
-test('flag boolean', function (t) {
- var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv;
- t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 });
- t.same(typeof parse.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true'])
- .boolean(['t', 'verbose']).default('verbose', true).argv;
-
- t.same(parse, {
- verbose: false,
- t: true,
- _: ['moo'],
- $0 : $0
- });
-
- t.same(typeof parse.verbose, 'boolean');
- t.same(typeof parse.t, 'boolean');
- t.end();
-});
-
-test('flag boolean default false', function (t) {
- var parse = optimist(['moo'])
- .boolean(['t', 'verbose'])
- .default('verbose', false)
- .default('t', false).argv;
-
- t.same(parse, {
- verbose: false,
- t: false,
- _: ['moo'],
- $0 : $0
- });
-
- t.same(typeof parse.verbose, 'boolean');
- t.same(typeof parse.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ])
- .boolean(['x','y','z']).argv;
-
- t.same(parse, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ],
- $0 : $0
- });
-
- t.same(typeof parse.x, 'boolean');
- t.same(typeof parse.y, 'boolean');
- t.same(typeof parse.z, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = optimist.parse([ '-s', "X\nX" ])
- t.same(args, { _ : [], s : "X\nX", $0 : $0 });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = optimist.parse([ "--s=X\nX" ])
- t.same(args, { _ : [], s : "X\nX", $0 : $0 });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = optimist([ '-s', '0001234' ]).string('s').argv.s;
- t.same(s, '0001234');
- t.same(typeof s, 'string');
-
- var x = optimist([ '-x', '56' ]).string('x').argv.x;
- t.same(x, '56');
- t.same(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = optimist([ ' ', ' ' ]).string('_').argv._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('slashBreak', function (t) {
- t.same(
- optimist.parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [], $0 : $0 }
- );
- t.same(
- optimist.parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = optimist([ '-f', '11', '--zoom', '55' ])
- .alias('z', 'zoom')
- .argv
- ;
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = optimist([ '-f', '11', '--zoom', '55' ])
- .alias('z', [ 'zm', 'zoom' ])
- .argv
- ;
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('boolean default true', function (t) {
- var argv = optimist.options({
- sometrue: {
- boolean: true,
- default: true
- }
- }).argv;
-
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = optimist.options({
- somefalse: {
- boolean: true,
- default: false
- }
- }).argv;
-
- t.equal(argv.somefalse, false);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = optimist([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]).argv;
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- },
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = optimist(aliased)
- .boolean('herp')
- .alias('h', 'herp')
- .argv;
- var propertyArgv = optimist(regular)
- .boolean('herp')
- .alias('h', 'herp')
- .argv;
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ],
- '$0': $0,
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = optimist(aliased)
- .options(opts)
- .argv;
- var propertyArgv = optimist(regular).options(opts).argv;
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ],
- '$0': $0,
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
-
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = optimist(aliased)
- .boolean('h')
- .alias('h', 'herp')
- .argv;
- var propertyArgv = optimist(regular)
- .boolean('h')
- .alias('h', 'herp')
- .argv;
- var expected = {
- herp: true,
- h: true,
- '_': [ ],
- '$0': $0,
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv;
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = optimist(['--boool', '--other=false']).boolean('boool').argv;
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/parse_modified.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/parse_modified.js
deleted file mode 100644
index a57dc84..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/parse_modified.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var optimist = require('../');
-var test = require('tap').test;
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = optimist().boolean('b').parse([ '-b', '123' ]);
- t.deepEqual(fix(argv), { b: true, _: ['123'] });
-});
-
-function fix (obj) {
- delete obj.$0;
- return obj;
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/short.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/short.js
deleted file mode 100644
index b2c38ad..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/short.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var optimist = require('../index');
-var test = require('tap').test;
-
-test('-n123', function (t) {
- t.plan(1);
- var parse = optimist.parse([ '-n123' ]);
- t.equal(parse.n, 123);
-});
-
-test('-123', function (t) {
- t.plan(3);
- var parse = optimist.parse([ '-123', '456' ]);
- t.equal(parse['1'], true);
- t.equal(parse['2'], true);
- t.equal(parse['3'], 456);
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/usage.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/usage.js
deleted file mode 100644
index 300454c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/usage.js
+++ /dev/null
@@ -1,292 +0,0 @@
-var Hash = require('hashish');
-var optimist = require('../index');
-var test = require('tap').test;
-
-test('usageFail', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -z 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .demand(['x','y'])
- .argv;
- });
- t.same(
- r.result,
- { x : 10, z : 20, _ : [], $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/),
- [
- 'Usage: ./usage -x NUM -y NUM',
- 'Options:',
- ' -x [required]',
- ' -y [required]',
- 'Missing required arguments: y',
- ]
- );
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-
-test('usagePass', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -y 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .demand(['x','y'])
- .argv;
- });
- t.same(r, {
- result : { x : 10, y : 20, _ : [], $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('checkPass', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -y 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(function (argv) {
- if (!('x' in argv)) throw 'You forgot about -x';
- if (!('y' in argv)) throw 'You forgot about -y';
- })
- .argv;
- });
- t.same(r, {
- result : { x : 10, y : 20, _ : [], $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('checkFail', function (t) {
- var r = checkUsage(function () {
- return optimist('-x 10 -z 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(function (argv) {
- if (!('x' in argv)) throw 'You forgot about -x';
- if (!('y' in argv)) throw 'You forgot about -y';
- })
- .argv;
- });
-
- t.same(
- r.result,
- { x : 10, z : 20, _ : [], $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/),
- [
- 'Usage: ./usage -x NUM -y NUM',
- 'You forgot about -y'
- ]
- );
-
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-test('checkCondPass', function (t) {
- function checker (argv) {
- return 'x' in argv && 'y' in argv;
- }
-
- var r = checkUsage(function () {
- return optimist('-x 10 -y 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(checker)
- .argv;
- });
- t.same(r, {
- result : { x : 10, y : 20, _ : [], $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('checkCondFail', function (t) {
- function checker (argv) {
- return 'x' in argv && 'y' in argv;
- }
-
- var r = checkUsage(function () {
- return optimist('-x 10 -z 20'.split(' '))
- .usage('Usage: $0 -x NUM -y NUM')
- .check(checker)
- .argv;
- });
-
- t.same(
- r.result,
- { x : 10, z : 20, _ : [], $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/).join('\n'),
- 'Usage: ./usage -x NUM -y NUM\n'
- + 'Argument check failed: ' + checker.toString()
- );
-
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-test('countPass', function (t) {
- var r = checkUsage(function () {
- return optimist('1 2 3 --moo'.split(' '))
- .usage('Usage: $0 [x] [y] [z] {OPTIONS}')
- .demand(3)
- .argv;
- });
- t.same(r, {
- result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' },
- errors : [],
- logs : [],
- exit : false,
- });
- t.end();
-});
-
-test('countFail', function (t) {
- var r = checkUsage(function () {
- return optimist('1 2 --moo'.split(' '))
- .usage('Usage: $0 [x] [y] [z] {OPTIONS}')
- .demand(3)
- .argv;
- });
- t.same(
- r.result,
- { _ : [ '1', '2' ], moo : true, $0 : './usage' }
- );
-
- t.same(
- r.errors.join('\n').split(/\n+/),
- [
- 'Usage: ./usage [x] [y] [z] {OPTIONS}',
- 'Not enough non-option arguments: got 2, need at least 3',
- ]
- );
-
- t.same(r.logs, []);
- t.ok(r.exit);
- t.end();
-});
-
-test('defaultSingles', function (t) {
- var r = checkUsage(function () {
- return optimist('--foo 50 --baz 70 --powsy'.split(' '))
- .default('foo', 5)
- .default('bar', 6)
- .default('baz', 7)
- .argv
- ;
- });
- t.same(r.result, {
- foo : '50',
- bar : 6,
- baz : '70',
- powsy : true,
- _ : [],
- $0 : './usage',
- });
- t.end();
-});
-
-test('defaultAliases', function (t) {
- var r = checkUsage(function () {
- return optimist('')
- .alias('f', 'foo')
- .default('f', 5)
- .argv
- ;
- });
- t.same(r.result, {
- f : '5',
- foo : '5',
- _ : [],
- $0 : './usage',
- });
- t.end();
-});
-
-test('defaultHash', function (t) {
- var r = checkUsage(function () {
- return optimist('--foo 50 --baz 70'.split(' '))
- .default({ foo : 10, bar : 20, quux : 30 })
- .argv
- ;
- });
- t.same(r.result, {
- _ : [],
- $0 : './usage',
- foo : 50,
- baz : 70,
- bar : 20,
- quux : 30,
- });
- t.end();
-});
-
-test('rebase', function (t) {
- t.equal(
- optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'),
- './foo/bar/baz'
- );
- t.equal(
- optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'),
- '../../..'
- );
- t.equal(
- optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'),
- '../pow/zoom.txt'
- );
- t.end();
-});
-
-function checkUsage (f) {
-
- var exit = false;
-
- process._exit = process.exit;
- process._env = process.env;
- process._argv = process.argv;
-
- process.exit = function (t) { exit = true };
- process.env = Hash.merge(process.env, { _ : 'node' });
- process.argv = [ './usage' ];
-
- var errors = [];
- var logs = [];
-
- console._error = console.error;
- console.error = function (msg) { errors.push(msg) };
- console._log = console.log;
- console.log = function (msg) { logs.push(msg) };
-
- var result = f();
-
- process.exit = process._exit;
- process.env = process._env;
- process.argv = process._argv;
-
- console.error = console._error;
- console.log = console._log;
-
- return {
- errors : errors,
- logs : logs,
- exit : exit,
- result : result,
- };
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/whitespace.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/whitespace.js
deleted file mode 100644
index 90b9075..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/optimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var optimist = require('../');
-var test = require('tap').test;
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = optimist.parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/.npmignore
deleted file mode 100644
index 5171c54..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-npm-debug.log
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/.travis.yml
deleted file mode 100644
index 62b5273..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.11"
-
-before_install:
- - travis_retry npm install -g npm
- - travis_retry npm install
-
-script:
- - npm test
-
-matrix:
- allow_failures:
- - node_js: "0.11"
-
-notifications:
- email:
- - travis@nodejitsu.com
- irc: "irc.freenode.org#nodejitsu"
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/LICENSE
deleted file mode 100644
index d26f4a2..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-node-portfinder
-
-Copyright (c) 2012 Charlie Robbins
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/README.md
deleted file mode 100644
index 229ccf0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# node-portfinder [![Build Status](https://api.travis-ci.org/indexzero/node-portfinder.svg)](https://travis-ci.org/indexzero/node-portfinder)
-
-## Installation
-
-### Installing npm (node package manager)
-``` bash
- curl http://npmjs.org/install.sh | sh
-```
-
-### Installing node-portfinder
-``` bash
- $ [sudo] npm install portfinder
-```
-
-## Usage
-The `portfinder` module has a simple interface:
-
-``` js
- var portfinder = require('portfinder');
-
- portfinder.getPort(function (err, port) {
- //
- // `port` is guaranteed to be a free port
- // in this scope.
- //
- });
-```
-
-By default `portfinder` will start searching from `8000`. To change this simply set `portfinder.basePort`.
-
-## Run Tests
-``` bash
- $ npm test
-```
-
-#### Author: [Charlie Robbins][0]
-#### License: MIT/X11
-[0]: http://nodejitsu.com
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/lib/portfinder.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/lib/portfinder.js
deleted file mode 100644
index 3da2562..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/lib/portfinder.js
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * portfinder.js: A simple tool to find an open port on the current machine.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var fs = require('fs'),
- net = require('net'),
- path = require('path'),
- async = require('async'),
- mkdirp = require('mkdirp').mkdirp;
-
-//
-// ### @basePort {Number}
-// The lowest port to begin any port search from
-//
-exports.basePort = 8000;
-
-//
-// ### @basePath {string}
-// Default path to begin any socket search from
-//
-exports.basePath = '/tmp/portfinder'
-
-//
-// ### function getPort (options, callback)
-// #### @options {Object} Settings to use when finding the necessary port
-// #### @callback {function} Continuation to respond to when complete.
-// Responds with a unbound port on the current machine.
-//
-exports.getPort = function (options, callback) {
- if (!callback) {
- callback = options;
- options = {};
- }
-
- options.port = options.port || exports.basePort;
- options.host = options.host || null;
- options.server = options.server || net.createServer(function () {
- //
- // Create an empty listener for the port testing server.
- //
- });
-
- function onListen () {
- options.server.removeListener('error', onError);
- options.server.close();
- callback(null, options.port)
- }
-
- function onError (err) {
- options.server.removeListener('listening', onListen);
-
- if (err.code !== 'EADDRINUSE' && err.code !== 'EACCES') {
- return callback(err);
- }
-
- exports.getPort({
- port: exports.nextPort(options.port),
- host: options.host,
- server: options.server
- }, callback);
- }
-
- options.server.once('error', onError);
- options.server.once('listening', onListen);
- options.server.listen(options.port, options.host);
-};
-
-//
-// ### function getPorts (count, options, callback)
-// #### @count {Number} The number of ports to find
-// #### @options {Object} Settings to use when finding the necessary port
-// #### @callback {function} Continuation to respond to when complete.
-// Responds with an array of unbound ports on the current machine.
-//
-exports.getPorts = function (count, options, callback) {
- if (!callback) {
- callback = options;
- options = {};
- }
-
- var lastPort = null;
- async.timesSeries(count, function(index, asyncCallback) {
- if (lastPort) {
- options.port = exports.nextPort(lastPort);
- }
-
- exports.getPort(options, function (err, port) {
- if (err) {
- asyncCallback(err);
- } else {
- lastPort = port;
- asyncCallback(null, port);
- }
- });
- }, callback);
-};
-
-//
-// ### function getSocket (options, callback)
-// #### @options {Object} Settings to use when finding the necessary port
-// #### @callback {function} Continuation to respond to when complete.
-// Responds with a unbound socket using the specified directory and base
-// name on the current machine.
-//
-exports.getSocket = function (options, callback) {
- if (!callback) {
- callback = options;
- options = {};
- }
-
- options.mod = options.mod || 0755;
- options.path = options.path || exports.basePath + '.sock';
-
- //
- // Tests the specified socket
- //
- function testSocket () {
- fs.stat(options.path, function (err) {
- //
- // If file we're checking doesn't exist (thus, stating it emits ENOENT),
- // we should be OK with listening on this socket.
- //
- if (err) {
- if (err.code == 'ENOENT') {
- callback(null, options.path);
- }
- else {
- callback(err);
- }
- }
- else {
- //
- // This file exists, so it isn't possible to listen on it. Lets try
- // next socket.
- //
- options.path = exports.nextSocket(options.path);
- exports.getSocket(options, callback);
- }
- });
- }
-
- //
- // Create the target `dir` then test connection
- // against the socket.
- //
- function createAndTestSocket (dir) {
- mkdirp(dir, options.mod, function (err) {
- if (err) {
- return callback(err);
- }
-
- options.exists = true;
- testSocket();
- });
- }
-
- //
- // Check if the parent directory of the target
- // socket path exists. If it does, test connection
- // against the socket. Otherwise, create the directory
- // then test connection.
- //
- function checkAndTestSocket () {
- var dir = path.dirname(options.path);
-
- fs.stat(dir, function (err, stats) {
- if (err || !stats.isDirectory()) {
- return createAndTestSocket(dir);
- }
-
- options.exists = true;
- testSocket();
- });
- }
-
- //
- // If it has been explicitly stated that the
- // target `options.path` already exists, then
- // simply test the socket.
- //
- return options.exists
- ? testSocket()
- : checkAndTestSocket();
-};
-
-//
-// ### function nextPort (port)
-// #### @port {Number} Port to increment from.
-// Gets the next port in sequence from the
-// specified `port`.
-//
-exports.nextPort = function (port) {
- return port + 1;
-};
-
-//
-// ### function nextSocket (socketPath)
-// #### @socketPath {string} Path to increment from
-// Gets the next socket path in sequence from the
-// specified `socketPath`.
-//
-exports.nextSocket = function (socketPath) {
- var dir = path.dirname(socketPath),
- name = path.basename(socketPath, '.sock'),
- match = name.match(/^([a-zA-z]+)(\d*)$/i),
- index = parseInt(match[2]),
- base = match[1];
-
- if (isNaN(index)) {
- index = 0;
- }
-
- index += 1;
- return path.join(dir, base + index + '.sock');
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/package.json
deleted file mode 100644
index 19c04d5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_args": [
- [
- "portfinder@0.4.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "portfinder@>=0.4.0 <0.5.0",
- "_id": "portfinder@0.4.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/portfinder",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "email": "charlie.robbins@gmail.com",
- "name": "indexzero"
- },
- "_npmVersion": "2.2.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "portfinder",
- "raw": "portfinder@0.4.x",
- "rawSpec": "0.4.x",
- "scope": null,
- "spec": ">=0.4.0 <0.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz",
- "_shasum": "a3ffadffafe4fb98e0601a85eda27c27ce84ca1e",
- "_shrinkwrap": null,
- "_spec": "portfinder@0.4.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "charlie.robbins@gmail.com",
- "name": "Charlie Robbins"
- },
- "bugs": {
- "url": "https://github.com/indexzero/node-portfinder/issues"
- },
- "dependencies": {
- "async": "0.9.0",
- "mkdirp": "0.5.x"
- },
- "description": "A simple tool to find an open port on the current machine",
- "devDependencies": {
- "vows": "0.8.0"
- },
- "directories": {},
- "dist": {
- "shasum": "a3ffadffafe4fb98e0601a85eda27c27ce84ca1e",
- "tarball": "http://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "gitHead": "8c3f20bf1d5ec399262c592f61129a65727004a9",
- "homepage": "https://github.com/indexzero/node-portfinder",
- "keywords": [
- "http",
- "ports",
- "utilities"
- ],
- "license": "MIT/X11",
- "main": "./lib/portfinder",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- }
- ],
- "name": "portfinder",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/indexzero/node-portfinder.git"
- },
- "scripts": {
- "test": "vows test/*-test.js --spec"
- },
- "version": "0.4.0"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/fixtures/.gitkeep b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/fixtures/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-multiple-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-multiple-test.js
deleted file mode 100644
index ede487e..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-multiple-test.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * portfinder-test.js: Tests for the `portfinder` module.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var vows = require('vows'),
- assert = require('assert'),
- async = require('async'),
- http = require('http'),
- portfinder = require('../lib/portfinder');
-
-var servers = [];
-
-function createServers (callback) {
- var base = 8000;
-
- async.whilst(
- function () { return base < 8005 },
- function (next) {
- var server = http.createServer(function () { });
- server.listen(base, next);
- base++;
- servers.push(server);
- }, callback);
-}
-
-vows.describe('portfinder').addBatch({
- "When using portfinder module": {
- "with 5 existing servers": {
- topic: function () {
- createServers(this.callback);
- },
- "the getPorts() method with an argument of 3": {
- topic: function () {
- portfinder.getPorts(3, this.callback);
- },
- "should respond with the first three available ports (8005, 8006, 8007)": function (err, ports) {
- assert.isTrue(!err);
- assert.deepEqual(ports, [8005, 8006, 8007]);
- }
- }
- }
- }
-}).addBatch({
- "When using portfinder module": {
- "with no existing servers": {
- topic: function () {
- servers.forEach(function (server) {
- server.close();
- });
-
- return null;
- },
- "the getPorts() method with an argument of 3": {
- topic: function () {
- portfinder.getPorts(3, this.callback);
- },
- "should respond with the first three available ports (8000, 8001, 80072": function (err, ports) {
- assert.isTrue(!err);
- assert.deepEqual(ports, [8000, 8001, 8002]);
- }
- }
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-socket-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-socket-test.js
deleted file mode 100644
index 91c840c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-socket-test.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * portfinder-test.js: Tests for the `portfinder` module.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var assert = require('assert'),
- exec = require('child_process').exec,
- net = require('net'),
- path = require('path'),
- async = require('async'),
- vows = require('vows'),
- portfinder = require('../lib/portfinder');
-
-var servers = [],
- socketDir = path.join(__dirname, 'fixtures'),
- badDir = path.join(__dirname, 'bad-dir');
-
-function createServers (callback) {
- var base = 0;
-
- async.whilst(
- function () { return base < 5 },
- function (next) {
- var server = net.createServer(function () { }),
- name = base === 0 ? 'test.sock' : 'test' + base + '.sock';
-
- server.listen(path.join(socketDir, name), next);
- base++;
- servers.push(server);
- }, callback);
-}
-
-vows.describe('portfinder').addBatch({
- "When using portfinder module": {
- "with 5 existing servers": {
- topic: function () {
- createServers(this.callback);
- },
- "the getPort() method": {
- topic: function () {
- portfinder.getSocket({
- path: path.join(socketDir, 'test.sock')
- }, this.callback);
- },
- "should respond with the first free socket (test5.sock)": function (err, socket) {
- assert.isTrue(!err);
- assert.equal(socket, path.join(socketDir, 'test5.sock'));
- }
- }
- }
- }
-}).addBatch({
- "When using portfinder module": {
- "with no existing servers": {
- "the getSocket() method": {
- "with a directory that doesnt exist": {
- topic: function () {
- var that = this;
- exec('rm -rf ' + badDir, function () {
- portfinder.getSocket({
- path: path.join(badDir, 'test.sock')
- }, that.callback);
- });
- },
- "should respond with the first free socket (test.sock)": function (err, socket) {
- assert.isTrue(!err);
- assert.equal(socket, path.join(badDir, 'test.sock'));
- }
- },
- "with a directory that exists": {
- topic: function () {
- portfinder.getSocket({
- path: path.join(socketDir, 'exists.sock')
- }, this.callback);
- },
- "should respond with the first free socket (exists.sock)": function (err, socket) {
- assert.isTrue(!err);
- assert.equal(socket, path.join(socketDir, 'exists.sock'));
- }
- }
- }
- }
- }
-}).addBatch({
- "When the tests are over": {
- "necessary cleanup should take place": function () {
- exec('rm -rf ' + badDir + ' ' + path.join(socketDir, '*'), function () { });
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-test.js
deleted file mode 100644
index c10ded9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/portfinder/test/port-finder-test.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * portfinder-test.js: Tests for the `portfinder` module.
- *
- * (C) 2011, Charlie Robbins
- *
- */
-
-var vows = require('vows'),
- assert = require('assert'),
- async = require('async'),
- http = require('http'),
- portfinder = require('../lib/portfinder');
-
-var servers = [];
-
-function createServers (callback) {
- var base = 8000;
-
- async.whilst(
- function () { return base < 8005 },
- function (next) {
- var server = http.createServer(function () { });
- server.listen(base, next);
- base++;
- servers.push(server);
- }, callback);
-}
-
-vows.describe('portfinder').addBatch({
- "When using portfinder module": {
- "with 5 existing servers": {
- topic: function () {
- createServers(this.callback);
- },
- "the getPort() method": {
- topic: function () {
- portfinder.getPort(this.callback);
- },
- "should respond with the first free port (8005)": function (err, port) {
- assert.isTrue(!err);
- assert.equal(port, 8005);
- }
- }
- }
- }
-}).addBatch({
- "When using portfinder module": {
- "with no existing servers": {
- topic: function () {
- servers.forEach(function (server) {
- server.close();
- });
-
- return null;
- },
- "the getPort() method": {
- topic: function () {
- portfinder.getPort(this.callback);
- },
- "should respond with the first free port (8000)": function (err, port) {
- assert.isTrue(!err);
- assert.equal(port, 8000);
- }
- }
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.jshintignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.jshintignore
deleted file mode 100644
index 3c3629e..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.jshintrc b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.jshintrc
deleted file mode 100644
index 997b3f7..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.jshintrc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "node": true,
-
- "curly": true,
- "latedef": true,
- "quotmark": true,
- "undef": true,
- "unused": true,
- "trailing": true
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.npmignore
deleted file mode 100644
index 7e1574d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-complexity.md
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.travis.yml
deleted file mode 100644
index c891dd0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/CHANGELOG.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/CHANGELOG.md
deleted file mode 100644
index f5ee8b4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/CHANGELOG.md
+++ /dev/null
@@ -1,68 +0,0 @@
-
-## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=open)
-- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57
-- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader
-
-## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed)
-- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object
-
-## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
-- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
-
-## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
-- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
-
-## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed)
-- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer?
-- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
-- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39
-
-## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed)
-- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number
-
-## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed)
-- [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array
-- [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x
-
-## [**2.2.2**](https://github.com/hapijs/qs/issues?milestone=11&state=closed)
-- [**#33**](https://github.com/hapijs/qs/issues/33) Error when plain object in a value
-- [**#34**](https://github.com/hapijs/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
-- [**#24**](https://github.com/hapijs/qs/issues/24) Changelog? Semver?
-
-## [**2.2.1**](https://github.com/hapijs/qs/issues?milestone=10&state=closed)
-- [**#32**](https://github.com/hapijs/qs/issues/32) account for circular references properly, closes #31
-- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects
-
-## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed)
-- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present
-- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays
-- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
-- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters?
-
-## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed)
-- [**#22**](https://github.com/hapijs/qs/issues/22) Enable using a RegExp as delimiter
-
-## [**2.0.0**](https://github.com/hapijs/qs/issues?milestone=7&state=closed)
-- [**#18**](https://github.com/hapijs/qs/issues/18) Why is there arrayLimit?
-- [**#20**](https://github.com/hapijs/qs/issues/20) Configurable parametersLimit
-- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20
-
-## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed)
-- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values
-
-## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed)
-- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters
-- [**#15**](https://github.com/hapijs/qs/issues/15) Close code block
-
-## [**1.2.0**](https://github.com/hapijs/qs/issues?milestone=4&state=closed)
-- [**#12**](https://github.com/hapijs/qs/issues/12) Add optional delim argument
-- [**#13**](https://github.com/hapijs/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
-
-## [**1.1.0**](https://github.com/hapijs/qs/issues?milestone=3&state=closed)
-- [**#7**](https://github.com/hapijs/qs/issues/7) Empty values of a POST array disappear after being submitted
-- [**#9**](https://github.com/hapijs/qs/issues/9) Should not omit equals signs (=) when value is null
-- [**#6**](https://github.com/hapijs/qs/issues/6) Minor grammar fix in README
-
-## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed)
-- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/CONTRIBUTING.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/CONTRIBUTING.md
deleted file mode 100644
index 8928361..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/CONTRIBUTING.md
+++ /dev/null
@@ -1 +0,0 @@
-Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/LICENSE
deleted file mode 100755
index d456948..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2014 Nathan LaFreniere and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/Makefile b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/Makefile
deleted file mode 100644
index 31cc899..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-test:
- @node node_modules/lab/bin/lab -a code -L
-test-cov:
- @node node_modules/lab/bin/lab -a code -t 100 -L
-test-cov-html:
- @node node_modules/lab/bin/lab -a code -L -r html -o coverage.html
-
-.PHONY: test test-cov test-cov-html
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/README.md
deleted file mode 100755
index 21bf3fa..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/README.md
+++ /dev/null
@@ -1,222 +0,0 @@
-# qs
-
-A querystring parsing and stringifying library with some added security.
-
-[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs)
-
-Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
-
-The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
-
-## Usage
-
-```javascript
-var Qs = require('qs');
-
-var obj = Qs.parse('a=c'); // { a: 'c' }
-var str = Qs.stringify(obj); // 'a=c'
-```
-
-### Parsing Objects
-
-```javascript
-Qs.parse(string, [options]);
-```
-
-**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
-For example, the string `'foo[bar]=baz'` converts to:
-
-```javascript
-{
- foo: {
- bar: 'baz'
- }
-}
-```
-
-URI encoded strings work too:
-
-```javascript
-Qs.parse('a%5Bb%5D=c');
-// { a: { b: 'c' } }
-```
-
-You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
-
-```javascript
-{
- foo: {
- bar: {
- baz: 'foobarbaz'
- }
- }
-}
-```
-
-By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
-`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
-
-```javascript
-{
- a: {
- b: {
- c: {
- d: {
- e: {
- f: {
- '[g][h][i]': 'j'
- }
- }
- }
- }
- }
- }
-}
-```
-
-This depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`:
-
-```javascript
-Qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
-// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }
-```
-
-The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
-
-For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
-
-```javascript
-Qs.parse('a=b&c=d', { parameterLimit: 1 });
-// { a: 'b' }
-```
-
-An optional delimiter can also be passed:
-
-```javascript
-Qs.parse('a=b;c=d', { delimiter: ';' });
-// { a: 'b', c: 'd' }
-```
-
-Delimiters can be a regular expression too:
-
-```javascript
-Qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
-// { a: 'b', c: 'd', e: 'f' }
-```
-
-### Parsing Arrays
-
-**qs** can also parse arrays using a similar `[]` notation:
-
-```javascript
-Qs.parse('a[]=b&a[]=c');
-// { a: ['b', 'c'] }
-```
-
-You may specify an index as well:
-
-```javascript
-Qs.parse('a[1]=c&a[0]=b');
-// { a: ['b', 'c'] }
-```
-
-Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
-to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
-their order:
-
-```javascript
-Qs.parse('a[1]=b&a[15]=c');
-// { a: ['b', 'c'] }
-```
-
-Note that an empty string is also a value, and will be preserved:
-
-```javascript
-Qs.parse('a[]=&a[]=b');
-// { a: ['', 'b'] }
-Qs.parse('a[0]=b&a[1]=&a[2]=c');
-// { a: ['b', '', 'c'] }
-```
-
-**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
-instead be converted to an object with the index as the key:
-
-```javascript
-Qs.parse('a[100]=b');
-// { a: { '100': 'b' } }
-```
-
-This limit can be overridden by passing an `arrayLimit` option:
-
-```javascript
-Qs.parse('a[1]=b', { arrayLimit: 0 });
-// { a: { '1': 'b' } }
-```
-
-To disable array parsing entirely, set `arrayLimit` to `-1`.
-
-If you mix notations, **qs** will merge the two items into an object:
-
-```javascript
-Qs.parse('a[0]=b&a[b]=c');
-// { a: { '0': 'b', b: 'c' } }
-```
-
-You can also create arrays of objects:
-
-```javascript
-Qs.parse('a[][b]=c');
-// { a: [{ b: 'c' }] }
-```
-
-### Stringifying
-
-```javascript
-Qs.stringify(object, [options]);
-```
-
-When stringifying, **qs** always URI encodes output. Objects are stringified as you would expect:
-
-```javascript
-Qs.stringify({ a: 'b' });
-// 'a=b'
-Qs.stringify({ a: { b: 'c' } });
-// 'a%5Bb%5D=c'
-```
-
-Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
-
-When arrays are stringified, by default they are given explicit indices:
-
-```javascript
-Qs.stringify({ a: ['b', 'c', 'd'] });
-// 'a[0]=b&a[1]=c&a[2]=d'
-```
-
-You may override this by setting the `indices` option to `false`:
-
-```javascript
-Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
-// 'a=b&a=c&a=d'
-```
-
-Empty strings and null values will omit the value, but the equals sign (=) remains in place:
-
-```javascript
-Qs.stringify({ a: '' });
-// 'a='
-```
-
-Properties that are set to `undefined` will be omitted entirely:
-
-```javascript
-Qs.stringify({ a: null, b: undefined });
-// 'a='
-```
-
-The delimiter may be overridden with stringify as well:
-
-```javascript
-Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' });
-// 'a=b;c=d'
-```
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/index.js
deleted file mode 100644
index 2291cd8..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/');
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/index.js
deleted file mode 100755
index 0e09493..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Load modules
-
-var Stringify = require('./stringify');
-var Parse = require('./parse');
-
-
-// Declare internals
-
-var internals = {};
-
-
-module.exports = {
- stringify: Stringify,
- parse: Parse
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/parse.js
deleted file mode 100755
index 4e7d02a..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/parse.js
+++ /dev/null
@@ -1,157 +0,0 @@
-// Load modules
-
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {
- delimiter: '&',
- depth: 5,
- arrayLimit: 20,
- parameterLimit: 1000
-};
-
-
-internals.parseValues = function (str, options) {
-
- var obj = {};
- var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
-
- for (var i = 0, il = parts.length; i < il; ++i) {
- var part = parts[i];
- var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
-
- if (pos === -1) {
- obj[Utils.decode(part)] = '';
- }
- else {
- var key = Utils.decode(part.slice(0, pos));
- var val = Utils.decode(part.slice(pos + 1));
-
- if (!obj.hasOwnProperty(key)) {
- obj[key] = val;
- }
- else {
- obj[key] = [].concat(obj[key]).concat(val);
- }
- }
- }
-
- return obj;
-};
-
-
-internals.parseObject = function (chain, val, options) {
-
- if (!chain.length) {
- return val;
- }
-
- var root = chain.shift();
-
- var obj = {};
- if (root === '[]') {
- obj = [];
- obj = obj.concat(internals.parseObject(chain, val, options));
- }
- else {
- var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
- var index = parseInt(cleanRoot, 10);
- var indexString = '' + index;
- if (!isNaN(index) &&
- root !== cleanRoot &&
- indexString === cleanRoot &&
- index >= 0 &&
- index <= options.arrayLimit) {
-
- obj = [];
- obj[index] = internals.parseObject(chain, val, options);
- }
- else {
- obj[cleanRoot] = internals.parseObject(chain, val, options);
- }
- }
-
- return obj;
-};
-
-
-internals.parseKeys = function (key, val, options) {
-
- if (!key) {
- return;
- }
-
- // The regex chunks
-
- var parent = /^([^\[\]]*)/;
- var child = /(\[[^\[\]]*\])/g;
-
- // Get the parent
-
- var segment = parent.exec(key);
-
- // Don't allow them to overwrite object prototype properties
-
- if (Object.prototype.hasOwnProperty(segment[1])) {
- return;
- }
-
- // Stash the parent if it exists
-
- var keys = [];
- if (segment[1]) {
- keys.push(segment[1]);
- }
-
- // Loop through children appending to the array until we hit depth
-
- var i = 0;
- while ((segment = child.exec(key)) !== null && i < options.depth) {
-
- ++i;
- if (!Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
- keys.push(segment[1]);
- }
- }
-
- // If there's a remainder, just add whatever is left
-
- if (segment) {
- keys.push('[' + key.slice(segment.index) + ']');
- }
-
- return internals.parseObject(keys, val, options);
-};
-
-
-module.exports = function (str, options) {
-
- if (str === '' ||
- str === null ||
- typeof str === 'undefined') {
-
- return {};
- }
-
- options = options || {};
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
-
- var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
- var obj = {};
-
- // Iterate over the keys and setup the new object
-
- var keys = Object.keys(tempObj);
- for (var i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- var newObj = internals.parseKeys(key, tempObj[key], options);
- obj = Utils.merge(obj, newObj);
- }
-
- return Utils.compact(obj);
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/stringify.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/stringify.js
deleted file mode 100755
index b441104..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/stringify.js
+++ /dev/null
@@ -1,77 +0,0 @@
-// Load modules
-
-var Utils = require('./utils');
-
-
-// Declare internals
-
-var internals = {
- delimiter: '&',
- indices: true
-};
-
-
-internals.stringify = function (obj, prefix, options) {
-
- if (Utils.isBuffer(obj)) {
- obj = obj.toString();
- }
- else if (obj instanceof Date) {
- obj = obj.toISOString();
- }
- else if (obj === null) {
- obj = '';
- }
-
- if (typeof obj === 'string' ||
- typeof obj === 'number' ||
- typeof obj === 'boolean') {
-
- return [encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)];
- }
-
- var values = [];
-
- if (typeof obj === 'undefined') {
- return values;
- }
-
- var objKeys = Object.keys(obj);
- for (var i = 0, il = objKeys.length; i < il; ++i) {
- var key = objKeys[i];
- if (!options.indices &&
- Array.isArray(obj)) {
-
- values = values.concat(internals.stringify(obj[key], prefix, options));
- }
- else {
- values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options));
- }
- }
-
- return values;
-};
-
-
-module.exports = function (obj, options) {
-
- options = options || {};
- var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
- options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices;
-
- var keys = [];
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return '';
- }
-
- var objKeys = Object.keys(obj);
- for (var i = 0, il = objKeys.length; i < il; ++i) {
- var key = objKeys[i];
- keys = keys.concat(internals.stringify(obj[key], key, options));
- }
-
- return keys.join(delimiter);
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/utils.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/utils.js
deleted file mode 100755
index 5240bd5..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/lib/utils.js
+++ /dev/null
@@ -1,132 +0,0 @@
-// Load modules
-
-
-// Declare internals
-
-var internals = {};
-
-
-exports.arrayToObject = function (source) {
-
- var obj = {};
- for (var i = 0, il = source.length; i < il; ++i) {
- if (typeof source[i] !== 'undefined') {
-
- obj[i] = source[i];
- }
- }
-
- return obj;
-};
-
-
-exports.merge = function (target, source) {
-
- if (!source) {
- return target;
- }
-
- if (typeof source !== 'object') {
- if (Array.isArray(target)) {
- target.push(source);
- }
- else {
- target[source] = true;
- }
-
- return target;
- }
-
- if (typeof target !== 'object') {
- target = [target].concat(source);
- return target;
- }
-
- if (Array.isArray(target) &&
- !Array.isArray(source)) {
-
- target = exports.arrayToObject(target);
- }
-
- var keys = Object.keys(source);
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var value = source[key];
-
- if (!target[key]) {
- target[key] = value;
- }
- else {
- target[key] = exports.merge(target[key], value);
- }
- }
-
- return target;
-};
-
-
-exports.decode = function (str) {
-
- try {
- return decodeURIComponent(str.replace(/\+/g, ' '));
- } catch (e) {
- return str;
- }
-};
-
-
-exports.compact = function (obj, refs) {
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return obj;
- }
-
- refs = refs || [];
- var lookup = refs.indexOf(obj);
- if (lookup !== -1) {
- return refs[lookup];
- }
-
- refs.push(obj);
-
- if (Array.isArray(obj)) {
- var compacted = [];
-
- for (var i = 0, il = obj.length; i < il; ++i) {
- if (typeof obj[i] !== 'undefined') {
- compacted.push(obj[i]);
- }
- }
-
- return compacted;
- }
-
- var keys = Object.keys(obj);
- for (i = 0, il = keys.length; i < il; ++i) {
- var key = keys[i];
- obj[key] = exports.compact(obj[key], refs);
- }
-
- return obj;
-};
-
-
-exports.isRegExp = function (obj) {
- return Object.prototype.toString.call(obj) === '[object RegExp]';
-};
-
-
-exports.isBuffer = function (obj) {
-
- if (obj === null ||
- typeof obj === 'undefined') {
-
- return false;
- }
-
- return !!(obj.constructor &&
- obj.constructor.isBuffer &&
- obj.constructor.isBuffer(obj));
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/package.json
deleted file mode 100644
index 35d9614..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/package.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "_args": [
- [
- "qs@~2.3.3",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/union"
- ]
- ],
- "_from": "qs@>=2.3.3 <2.4.0",
- "_id": "qs@2.3.3",
- "_inCache": true,
- "_installable": true,
- "_location": "/qs",
- "_nodeVersion": "0.10.32",
- "_npmUser": {
- "email": "quitlahok@gmail.com",
- "name": "nlf"
- },
- "_npmVersion": "2.1.6",
- "_phantomChildren": {},
- "_requested": {
- "name": "qs",
- "raw": "qs@~2.3.3",
- "rawSpec": "~2.3.3",
- "scope": null,
- "spec": ">=2.3.3 <2.4.0",
- "type": "range"
- },
- "_requiredBy": [
- "/union"
- ],
- "_resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
- "_shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
- "_shrinkwrap": null,
- "_spec": "qs@~2.3.3",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/union",
- "bugs": {
- "url": "https://github.com/hapijs/qs/issues"
- },
- "dependencies": {},
- "description": "A querystring parser that supports nesting and arrays, with a depth limit",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "5.x.x"
- },
- "directories": {},
- "dist": {
- "shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404",
- "tarball": "http://registry.npmjs.org/qs/-/qs-2.3.3.tgz"
- },
- "gitHead": "9250c4cda5102fcf72441445816e6d311fc6813d",
- "homepage": "https://github.com/hapijs/qs",
- "keywords": [
- "qs",
- "querystring"
- ],
- "licenses": [
- {
- "type": "BSD",
- "url": "http://github.com/hapijs/qs/raw/master/LICENSE"
- }
- ],
- "main": "index.js",
- "maintainers": [
- {
- "name": "nlf",
- "email": "quitlahok@gmail.com"
- },
- {
- "name": "hueniverse",
- "email": "eran@hueniverse.com"
- }
- ],
- "name": "qs",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/hapijs/qs.git"
- },
- "scripts": {
- "test": "make test-cov"
- },
- "version": "2.3.3"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/test/parse.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/test/parse.js
deleted file mode 100755
index 6c20cc1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/test/parse.js
+++ /dev/null
@@ -1,413 +0,0 @@
-/* eslint no-extend-native:0 */
-// Load modules
-
-var Code = require('code');
-var Lab = require('lab');
-var Qs = require('../');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var expect = Code.expect;
-var describe = lab.experiment;
-var it = lab.test;
-
-
-describe('parse()', function () {
-
- it('parses a simple string', function (done) {
-
- expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' });
- expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' });
- expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } });
- expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } });
- expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } });
- expect(Qs.parse('foo')).to.deep.equal({ foo: '' });
- expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' });
- expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' });
- expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' });
- expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' });
- expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' });
- expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({
- cht: 'p3',
- chd: 't:60,40',
- chs: '250x100',
- chl: 'Hello|World'
- });
- done();
- });
-
- it('parses a single nested string', function (done) {
-
- expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } });
- done();
- });
-
- it('parses a double nested string', function (done) {
-
- expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } });
- done();
- });
-
- it('defaults to a depth of 5', function (done) {
-
- expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } });
- done();
- });
-
- it('only parses one level when depth = 1', function (done) {
-
- expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } });
- expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } });
- done();
- });
-
- it('parses a simple array', function (done) {
-
- expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- done();
- });
-
- it('parses an explicit array', function (done) {
-
- expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] });
- expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
- done();
- });
-
- it('parses a mix of simple and explicit arrays', function (done) {
-
- expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] });
- done();
- });
-
- it('parses a nested array', function (done) {
-
- expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
- expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } });
- done();
- });
-
- it('allows to specify array indices', function (done) {
-
- expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
- expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] });
- expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] });
- done();
- });
-
- it('limits specific array indices to 20', function (done) {
-
- expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] });
- expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } });
- done();
- });
-
- it('supports keys that begin with a number', function (done) {
-
- expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } });
- done();
- });
-
- it('supports encoded = signs', function (done) {
-
- expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' });
- done();
- });
-
- it('is ok with url encoded strings', function (done) {
-
- expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } });
- expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } });
- done();
- });
-
- it('allows brackets in the value', function (done) {
-
- expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' });
- expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' });
- done();
- });
-
- it('allows empty values', function (done) {
-
- expect(Qs.parse('')).to.deep.equal({});
- expect(Qs.parse(null)).to.deep.equal({});
- expect(Qs.parse(undefined)).to.deep.equal({});
- done();
- });
-
- it('transforms arrays to objects', function (done) {
-
- expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
- expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
- expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
- expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
- expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
- expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({foo: [ {a: 'a', b: 'b'}, {a: 'aa', b: 'bb'} ]});
- done();
- });
-
- it('can add keys to objects', function (done) {
-
- expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
- done();
- });
-
- it('correctly prunes undefined values when converting an array to an object', function (done) {
-
- expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
- done();
- });
-
- it('supports malformed uri characters', function (done) {
-
- expect(Qs.parse('{%:%}')).to.deep.equal({ '{%:%}': '' });
- expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' });
- done();
- });
-
- it('doesn\'t produce empty keys', function (done) {
-
- expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' });
- done();
- });
-
- it('cannot override prototypes', function (done) {
-
- var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad');
- expect(typeof obj.toString).to.equal('function');
- expect(typeof obj.bad.toString).to.equal('function');
- expect(typeof obj.constructor).to.equal('function');
- done();
- });
-
- it('cannot access Object prototype', function (done) {
-
- Qs.parse('constructor[prototype][bad]=bad');
- Qs.parse('bad[constructor][prototype][bad]=bad');
- expect(typeof Object.prototype.bad).to.equal('undefined');
- done();
- });
-
- it('parses arrays of objects', function (done) {
-
- expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
- expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
- done();
- });
-
- it('allows for empty strings in arrays', function (done) {
-
- expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] });
- expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]=')).to.deep.equal({ a: ['b', '', 'c', ''] });
- expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] });
- done();
- });
-
- it('compacts sparse arrays', function (done) {
-
- expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] });
- done();
- });
-
- it('parses semi-parsed strings', function (done) {
-
- expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } });
- expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } });
- done();
- });
-
- it('parses buffers correctly', function (done) {
-
- var b = new Buffer('test');
- expect(Qs.parse({ a: b })).to.deep.equal({ a: b });
- done();
- });
-
- it('continues parsing when no parent is found', function (done) {
-
- expect(Qs.parse('[]&a=b')).to.deep.equal({ '0': '', a: 'b' });
- expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' });
- done();
- });
-
- it('does not error when parsing a very long array', function (done) {
-
- var str = 'a[]=a';
- while (Buffer.byteLength(str) < 128 * 1024) {
- str += '&' + str;
- }
-
- expect(function () {
-
- Qs.parse(str);
- }).to.not.throw();
-
- done();
- });
-
- it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) {
-
- Object.prototype.crash = '';
- Array.prototype.crash = '';
- expect(Qs.parse.bind(null, 'a=b')).to.not.throw();
- expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' });
- expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw();
- expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
- delete Object.prototype.crash;
- delete Array.prototype.crash;
- done();
- });
-
- it('parses a string with an alternative string delimiter', function (done) {
-
- expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('parses a string with an alternative RegExp delimiter', function (done) {
-
- expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('does not use non-splittable objects as delimiters', function (done) {
-
- expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('allows overriding parameter limit', function (done) {
-
- expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' });
- done();
- });
-
- it('allows setting the parameter limit to Infinity', function (done) {
-
- expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('allows overriding array limit', function (done) {
-
- expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } });
- expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } });
- expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
- done();
- });
-
- it('parses an object', function (done) {
-
- var input = {
- 'user[name]': {'pop[bob]': 3},
- 'user[email]': null
- };
-
- var expected = {
- 'user': {
- 'name': {'pop[bob]': 3},
- 'email': null
- }
- };
-
- var result = Qs.parse(input);
-
- expect(result).to.deep.equal(expected);
- done();
- });
-
- it('parses an object and not child values', function (done) {
-
- var input = {
- 'user[name]': {'pop[bob]': { 'test': 3 }},
- 'user[email]': null
- };
-
- var expected = {
- 'user': {
- 'name': {'pop[bob]': { 'test': 3 }},
- 'email': null
- }
- };
-
- var result = Qs.parse(input);
-
- expect(result).to.deep.equal(expected);
- done();
- });
-
- it('does not blow up when Buffer global is missing', function (done) {
-
- var tempBuffer = global.Buffer;
- delete global.Buffer;
- var result = Qs.parse('a=b&c=d');
- global.Buffer = tempBuffer;
- expect(result).to.deep.equal({ a: 'b', c: 'd' });
- done();
- });
-
- it('does not crash when using invalid dot notation', function (done) {
-
- expect(Qs.parse('roomInfoList[0].childrenAges[0]=15&roomInfoList[0].numberOfAdults=2')).to.deep.equal({ roomInfoList: [['15', '2']] });
- done();
- });
-
- it('does not crash when parsing circular references', function (done) {
-
- var a = {};
- a.b = a;
-
- var parsed;
-
- expect(function () {
-
- parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
- }).to.not.throw();
-
- expect(parsed).to.contain('foo');
- expect(parsed.foo).to.contain('bar', 'baz');
- expect(parsed.foo.bar).to.equal('baz');
- expect(parsed.foo.baz).to.deep.equal(a);
- done();
- });
-
- it('parses plain objects correctly', function (done) {
-
- var a = Object.create(null);
- a.b = 'c';
-
- expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
- var result = Qs.parse({ a: a });
- expect(result).to.contain('a');
- expect(result.a).to.deep.equal(a);
- done();
- });
-
- it('parses dates correctly', function (done) {
-
- var now = new Date();
- expect(Qs.parse({ a: now })).to.deep.equal({ a: now });
- done();
- });
-
- it('parses regular expressions correctly', function (done) {
-
- var re = /^test$/;
- expect(Qs.parse({ a: re })).to.deep.equal({ a: re });
- done();
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/test/stringify.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/test/stringify.js
deleted file mode 100755
index 75e397a..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/qs/test/stringify.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* eslint no-extend-native:0 */
-// Load modules
-
-var Code = require('code');
-var Lab = require('lab');
-var Qs = require('../');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var expect = Code.expect;
-var describe = lab.experiment;
-var it = lab.test;
-
-
-describe('stringify()', function () {
-
- it('stringifies a querystring object', function (done) {
-
- expect(Qs.stringify({ a: 'b' })).to.equal('a=b');
- expect(Qs.stringify({ a: 1 })).to.equal('a=1');
- expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2');
- done();
- });
-
- it('stringifies a nested object', function (done) {
-
- expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
- expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e');
- done();
- });
-
- it('stringifies an array value', function (done) {
-
- expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
- done();
- });
-
- it('omits array indices when asked', function (done) {
-
- expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d');
- done();
- });
-
- it('stringifies a nested array value', function (done) {
-
- expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
- done();
- });
-
- it('stringifies an object inside an array', function (done) {
-
- expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c');
- expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
- done();
- });
-
- it('does not omit object keys when indices = false', function (done) {
-
- expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c');
- done();
- });
-
- it('stringifies a complicated object', function (done) {
-
- expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
- done();
- });
-
- it('stringifies an empty value', function (done) {
-
- expect(Qs.stringify({ a: '' })).to.equal('a=');
- expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b=');
- expect(Qs.stringify({ a: null })).to.equal('a=');
- expect(Qs.stringify({ a: { b: null } })).to.equal('a%5Bb%5D=');
- done();
- });
-
- it('stringifies an empty object', function (done) {
-
- var obj = Object.create(null);
- obj.a = 'b';
- expect(Qs.stringify(obj)).to.equal('a=b');
- done();
- });
-
- it('returns an empty string for invalid input', function (done) {
-
- expect(Qs.stringify(undefined)).to.equal('');
- expect(Qs.stringify(false)).to.equal('');
- expect(Qs.stringify(null)).to.equal('');
- expect(Qs.stringify('')).to.equal('');
- done();
- });
-
- it('stringifies an object with an empty object as a child', function (done) {
-
- var obj = {
- a: Object.create(null)
- };
-
- obj.a.b = 'c';
- expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c');
- done();
- });
-
- it('drops keys with a value of undefined', function (done) {
-
- expect(Qs.stringify({ a: undefined })).to.equal('');
- expect(Qs.stringify({ a: { b: undefined, c: null } })).to.equal('a%5Bc%5D=');
- done();
- });
-
- it('url encodes values', function (done) {
-
- expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c');
- done();
- });
-
- it('stringifies a date', function (done) {
-
- var now = new Date();
- var str = 'a=' + encodeURIComponent(now.toISOString());
- expect(Qs.stringify({ a: now })).to.equal(str);
- done();
- });
-
- it('stringifies the weird object from qs', function (done) {
-
- expect(Qs.stringify({ 'my weird field': 'q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F');
- done();
- });
-
- it('skips properties that are part of the object prototype', function (done) {
-
- Object.prototype.crash = 'test';
- expect(Qs.stringify({ a: 'b'})).to.equal('a=b');
- expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
- delete Object.prototype.crash;
- done();
- });
-
- it('stringifies boolean values', function (done) {
-
- expect(Qs.stringify({ a: true })).to.equal('a=true');
- expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true');
- expect(Qs.stringify({ b: false })).to.equal('b=false');
- expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false');
- done();
- });
-
- it('stringifies buffer values', function (done) {
-
- expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test');
- expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test');
- done();
- });
-
- it('stringifies an object using an alternative delimiter', function (done) {
-
- expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d');
- done();
- });
-
- it('doesn\'t blow up when Buffer global is missing', function (done) {
-
- var tempBuffer = global.Buffer;
- delete global.Buffer;
- expect(Qs.stringify({ a: 'b', c: 'd' })).to.equal('a=b&c=d');
- global.Buffer = tempBuffer;
- done();
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/.npmignore
deleted file mode 100644
index ba2a97b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-coverage
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/.travis.yml
deleted file mode 100644
index 22ebb02..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: node_js
-node_js:
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "iojs-v1.1"
- - "iojs-v1.0"
-before_install:
- - "npm install -g npm@1.4.x"
-script:
- - "npm run test-travis"
-after_script:
- - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls"
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "iojs-v1.1"
- - node_js: "iojs-v1.0"
-notifications:
- irc:
- channels:
- - "irc.freenode.org#unshift"
- on_success: change
- on_failure: change
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/LICENSE
deleted file mode 100644
index 6dc9316..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/README.md
deleted file mode 100644
index 3effe75..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# requires-port
-
-[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](http://img.shields.io/npm/v/requires-port.svg?style=flat-square)](http://browsenpm.org/package/requires-port)[![Build Status](http://img.shields.io/travis/unshiftio/requires-port/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/requires-port)[![Dependencies](https://img.shields.io/david/unshiftio/requires-port.svg?style=flat-square)](https://david-dm.org/unshiftio/requires-port)[![Coverage Status](http://img.shields.io/coveralls/unshiftio/requires-port/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/requires-port?branch=master)[![IRC channel](http://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](http://webchat.freenode.net/?channels=unshift)
-
-The module name says it all, check if a protocol requires a given port.
-
-## Installation
-
-This module is intended to be used with browserify or Node.js and is distributed
-in the public npm registry. To install it simply run the following command from
-your CLI:
-
-```j
-npm install --save requires-port
-```
-
-## Usage
-
-The module exports it self as function and requires 2 arguments:
-
-1. The port number, can be a string or number.
-2. Protocol, can be `http`, `http:` or even `https://yomoma.com`. We just split
- it at `:` and use the first result. We currently accept the following
- protocols:
- - `http`
- - `https`
- - `ws`
- - `wss`
- - `ftp`
- - `gopher`
- - `file`
-
-It returns a boolean that indicates if protocol requires this port to be added
-to your URL.
-
-```js
-'use strict';
-
-var required = require('requires-port');
-
-console.log(required('8080', 'http')) // true
-console.log(required('80', 'http')) // false
-```
-
-# License
-
-MIT
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/index.js
deleted file mode 100644
index 9ecfae3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-/**
- * Check if we're required to add a port number.
- *
- * @see https://url.spec.whatwg.org/#default-port
- * @param {Number|String} port Port number we need to check
- * @param {String} protocol Protocol we need to check against.
- * @returns {Boolean} Is it a default port for the given protocol
- * @api private
- */
-module.exports = function required(port, protocol) {
- protocol = protocol.split(':')[0];
- port = +port;
-
- if (!port) return false;
-
- switch (protocol) {
- case 'http':
- case 'ws':
- return port !== 80;
-
- case 'https':
- case 'wss':
- return port !== 443;
-
- case 'ftp':
- return port !== 22;
-
- case 'gopher':
- return port !== 70;
-
- case 'file':
- return false;
- }
-
- return port !== 0;
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/package.json
deleted file mode 100644
index f096fbe..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/package.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "_args": [
- [
- "requires-port@0.x.x",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-proxy"
- ]
- ],
- "_from": "requires-port@>=0.0.0 <1.0.0",
- "_id": "requires-port@0.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/requires-port",
- "_nodeVersion": "0.12.3",
- "_npmUser": {
- "email": "npm@3rd-Eden.com",
- "name": "3rdeden"
- },
- "_npmVersion": "2.9.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "requires-port",
- "raw": "requires-port@0.x.x",
- "rawSpec": "0.x.x",
- "scope": null,
- "spec": ">=0.0.0 <1.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-proxy"
- ],
- "_resolved": "https://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz",
- "_shasum": "4b4414411d9df7c855995dd899a8c78a2951c16d",
- "_shrinkwrap": null,
- "_spec": "requires-port@0.x.x",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-proxy",
- "author": {
- "name": "Arnout Kazemier"
- },
- "bugs": {
- "url": "https://github.com/unshiftio/requires-port/issues"
- },
- "dependencies": {},
- "description": "Check if a protocol requires a certain port number to be added to an URL.",
- "devDependencies": {
- "assume": "1.1.x",
- "istanbul": "0.3.x",
- "mocha": "2.1.x",
- "pre-commit": "1.0.x"
- },
- "directories": {},
- "dist": {
- "shasum": "4b4414411d9df7c855995dd899a8c78a2951c16d",
- "tarball": "http://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz"
- },
- "gitHead": "d6235df7aa7e8d08e9ac72c842e1e2c6c366376f",
- "homepage": "https://github.com/unshiftio/requires-port",
- "keywords": [
- "cows",
- "file",
- "ftp",
- "gopher",
- "http",
- "https",
- "parsing",
- "port",
- "portnumber",
- "require",
- "requires",
- "requried",
- "url",
- "validation",
- "ws",
- "wss"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "v1",
- "email": "info@3rd-Eden.com"
- },
- {
- "name": "3rdeden",
- "email": "npm@3rd-Eden.com"
- }
- ],
- "name": "requires-port",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/unshiftio/requires-port.git"
- },
- "scripts": {
- "100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
- "coverage": "istanbul cover ./node_modules/.bin/_mocha -- test.js",
- "test": "mocha test.js",
- "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js",
- "watch": "mocha --watch test.js"
- },
- "version": "0.0.1"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/test.js
deleted file mode 100644
index abd6bcb..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/requires-port/test.js
+++ /dev/null
@@ -1,98 +0,0 @@
-describe('requires-port', function () {
- 'use strict';
-
- var assume = require('assume')
- , required = require('./');
-
- it('is exported as a function', function () {
- assume(required).is.a('function');
- });
-
- it('does not require empty ports', function () {
- assume(required('', 'http')).false();
- assume(required('', 'wss')).false();
- assume(required('', 'ws')).false();
- assume(required('', 'cowsack')).false();
- });
-
- it('assumes true for unknown protocols',function () {
- assume(required('808', 'foo')).true();
- assume(required('80', 'bar')).true();
- });
-
- it('never requires port numbers for file', function () {
- assume(required(8080, 'file')).false();
- });
-
- it('does not require port 80 for http', function () {
- assume(required('80', 'http')).false();
- assume(required(80, 'http')).false();
- assume(required(80, 'http://')).false();
- assume(required(80, 'http://www.google.com')).false();
-
- assume(required('8080', 'http')).true();
- assume(required(8080, 'http')).true();
- assume(required(8080, 'http://')).true();
- assume(required(8080, 'http://www.google.com')).true();
- });
-
- it('does not require port 80 for ws', function () {
- assume(required('80', 'ws')).false();
- assume(required(80, 'ws')).false();
- assume(required(80, 'ws://')).false();
- assume(required(80, 'ws://www.google.com')).false();
-
- assume(required('8080', 'ws')).true();
- assume(required(8080, 'ws')).true();
- assume(required(8080, 'ws://')).true();
- assume(required(8080, 'ws://www.google.com')).true();
- });
-
- it('does not require port 443 for https', function () {
- assume(required('443', 'https')).false();
- assume(required(443, 'https')).false();
- assume(required(443, 'https://')).false();
- assume(required(443, 'https://www.google.com')).false();
-
- assume(required('8080', 'https')).true();
- assume(required(8080, 'https')).true();
- assume(required(8080, 'https://')).true();
- assume(required(8080, 'https://www.google.com')).true();
- });
-
- it('does not require port 443 for wss', function () {
- assume(required('443', 'wss')).false();
- assume(required(443, 'wss')).false();
- assume(required(443, 'wss://')).false();
- assume(required(443, 'wss://www.google.com')).false();
-
- assume(required('8080', 'wss')).true();
- assume(required(8080, 'wss')).true();
- assume(required(8080, 'wss://')).true();
- assume(required(8080, 'wss://www.google.com')).true();
- });
-
- it('does not require port 22 for ftp', function () {
- assume(required('22', 'ftp')).false();
- assume(required(22, 'ftp')).false();
- assume(required(22, 'ftp://')).false();
- assume(required(22, 'ftp://www.google.com')).false();
-
- assume(required('8080', 'ftp')).true();
- assume(required(8080, 'ftp')).true();
- assume(required(8080, 'ftp://')).true();
- assume(required(8080, 'ftp://www.google.com')).true();
- });
-
- it('does not require port 70 for gopher', function () {
- assume(required('70', 'gopher')).false();
- assume(required(70, 'gopher')).false();
- assume(required(70, 'gopher://')).false();
- assume(required(70, 'gopher://www.google.com')).false();
-
- assume(required('8080', 'gopher')).true();
- assume(required(8080, 'gopher')).true();
- assume(required(8080, 'gopher://')).true();
- assume(required(8080, 'gopher://www.google.com')).true();
- });
-});
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/.npmignore
deleted file mode 100644
index cb6fcfe..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-node_modules
-npm-debug.log
-test/fixtures/*-test.txt
-examples/*.txt
-examples/simple/*.txt
-.DS_Store
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/.travis.yml b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/.travis.yml
deleted file mode 100644
index 04d6dd9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.11"
-
-notifications:
- email:
- - travis@nodejitsu.com
- irc: "irc.freenode.org#nodejitsu"
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/CHANGELOG.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/CHANGELOG.md
deleted file mode 100644
index c4d4c99..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/CHANGELOG.md
+++ /dev/null
@@ -1,7 +0,0 @@
-
-0.3.4 / 2012-07-24
-==================
-
- * Added SPDY support
- * Added http redirect utility function
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/LICENSE
deleted file mode 100644
index b7e5560..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010 Charlie Robbins & the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/README.md
deleted file mode 100644
index bd8b59b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/README.md
+++ /dev/null
@@ -1,323 +0,0 @@
-
-
-
-# Synopsis
-A hybrid streaming middleware kernel backwards compatible with connect.
-
-# Motivation
-The advantage to streaming middlewares is that they do not require buffering the entire stream in order to execute their function.
-
-# Status
-
-[![Build Status](https://secure.travis-ci.org/flatiron/union.png)](http://travis-ci.org/flatiron/union)
-
-# Installation
-There are a few ways to use `union`. Install the library using npm. You can add it to your `package.json` file as a dependancy
-
-```bash
- $ [sudo] npm install union
-```
-
-## Usage
-Union's request handling is [connect](https://github.com/senchalabs/connect)-compatible, meaning that all existing connect middlewares should work out-of-the-box with union.
-
-**(Union 0.3.x is compatible with connect >= 2.1.0, [Extensively Tested](https://github.com/pksunkara/connect-union))**
-
-In addition, the response object passed to middlewares listens for a "next" event, which is equivalent to calling `next()`. Flatiron middlewares are written in this manner, meaning they are not reverse-compatible with connect.
-
-### A simple case
-
-``` js
-var fs = require('fs'),
- union = require('../lib'),
- director = require('director');
-
-var router = new director.http.Router();
-
-var server = union.createServer({
- before: [
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-
-router.get(/foo/, function () {
- this.res.writeHead(200, { 'Content-Type': 'text/plain' })
- this.res.end('hello world\n');
-});
-
-router.post(/foo/, { stream: true }, function () {
- var req = this.req,
- res = this.res,
- writeStream;
-
- writeStream = fs.createWriteStream(Date.now() + '-foo.txt');
- req.pipe(writeStream);
-
- writeStream.on('close', function () {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.end('wrote to a stream!');
- });
-});
-
-server.listen(9090);
-console.log('union with director running on 9090');
-```
-
-To demonstrate the code, we use [director](https://github.com/flatiron/director). A light-weight, Client AND Server side URL-Router for Node.js and Single Page Apps!
-
-### A case with connect
-
-Code based on connect
-
-```js
-var connect = require('connect')
- , http = require('http');
-
-var app = connect()
- .use(connect.favicon())
- .use(connect.logger('dev'))
- .use(connect.static('public'))
- .use(connect.directory('public'))
- .use(connect.cookieParser('my secret here'))
- .use(connect.session())
- .use(function (req, res) {
- res.end('Hello from Connect!\n');
- });
-
-http.createServer(app).listen(3000);
-```
-
-Code based on union
-
-```js
-var connect = require('connect')
- , union = require('union');
-
-var server = union.createServer({
- buffer: false,
- before: [
- connect.favicon(),
- connect.logger('dev'),
- connect.static('public'),
- connect.directory('public'),
- connect.cookieParser('my secret here'),
- connect.session(),
- function (req, res) {
- res.end('Hello from Connect!\n');
- },
- ]
-}).listen(3000);
-```
-
-### SPDY enabled server example
-
-# API
-
-## union Static Members
-
-### createServer(options)
-The `options` object is required. Options include:
-
-Specification
-
-```
- function createServer(options)
-
- @param options {Object}
- An object literal that represents the configuration for the server.
-
- @option before {Array}
- The `before` value is an array of middlewares, which are used to route and serve incoming
- requests. For instance, in the example, `favicon` is a middleware which handles requests
- for `/favicon.ico`.
-
- @option after {Array}
- The `after` value is an array of functions that return stream filters,
- which are applied after the request handlers in `options.before`.
- Stream filters inherit from `union.ResponseStream`, which implements the
- Node.js core streams api with a bunch of other goodies.
-
- @option limit {Object}
- (optional) A value, passed to internal instantiations of `union.BufferedStream`.
-
- @option https {Object}
- (optional) A value that specifies the certificate and key necessary to create an instance of
- `https.Server`.
-
- @option spdy {Object}
- (optional) A value that specifies the certificate and key necessary to create an instance of
- `spdy.Server`.
-
- @option headers {Object}
- (optional) An object representing a set of headers to set in every outgoing response
-```
-
-Example
-
-```js
-var server = union.createServer({
- before: [
- favicon('./favicon.png'),
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-```
-
-An example of the `https` or `spdy` option.
-
-``` js
-{
- cert: 'path/to/cert.pem',
- key: 'path/to/key.pem',
- ca: 'path/to/ca.pem'
-}
-```
-
-An example of the `headers` option.
-
-``` js
-{
- 'x-powered-by': 'your-sweet-application v10.9.8'
-}
-```
-
-## Error Handling
-Error handler is similiar to middlware but takes an extra argument for error at the beginning.
-
-```js
-var handle = function (err, req, res) {
- res.statusCode = err.status;
- res.end(req.headers);
-};
-
-var server = union.createServer({
- onError: handle,
- before: [
- favicon('./favicon.png'),
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-```
-
-## BufferedStream Constructor
-This constructor inherits from `Stream` and can buffer data up to `limit` bytes. It also implements `pause` and `resume` methods.
-
-Specification
-
-```
- function BufferedStream(limit)
-
- @param limit {Number}
- the limit for which the stream can be buffered
-```
-
-Example
-
-```js
-var bs = union.BufferedStream(n);
-```
-
-## HttpStream Constructor
-This constructor inherits from `union.BufferedStream` and returns a stream with these extra properties:
-
-Specification
-
-```
- function HttpStream()
-```
-
-Example
-
-```js
-var hs = union.HttpStream();
-```
-
-## HttpStream Instance Members
-
-### url
-The url from the request.
-
-Example
-
-```js
-httpStream.url = '';
-```
-
-### headers
-The HTTP headers associated with the stream.
-
-Example
-
-```js
-httpStream.headers = '';
-```
-
-### method
-The HTTP method ("GET", "POST", etc).
-
-Example
-
-```js
-httpStream.method = 'POST';
-```
-
-### query
-The querystring associated with the stream (if applicable).
-
-Example
-
-```js
-httpStream.query = '';
-```
-
-## ResponseStream Constructor
-This constructor inherits from `union.HttpStream`, and is additionally writeable. Union supplies this constructor as a basic response stream middleware from which to inherit.
-
-Specification
-
-```
- function ResponseStream()
-```
-
-Example
-
-```js
-var rs = union.ResponseStream();
-```
-
-# Tests
-
-All tests are written with [vows][0] and should be run with [npm][1]:
-
-``` bash
- $ npm test
-```
-
-# Licence
-
-(The MIT License)
-
-Copyright (c) 2010-2012 Charlie Robbins & the Contributors
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-[0]: http://vowsjs.org
-[1]: http://npmjs.org
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/after/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/after/index.js
deleted file mode 100644
index 1f407bd..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/after/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var fs = require('fs'),
- path = require('path'),
- union = require('../../lib');
-
-var server = union.createServer({
- before: [ function (req,res) {
- if (req.url === "/foo") {
- res.text(201, "foo");
- }
- } ],
- after: [
- function LoggerStream() {
- var stream = new union.ResponseStream();
-
- stream.once("pipe", function (req) {
- console.log({res: this.res.statusCode, method: this.req.method});
- });
-
- return stream;
- }
- ]
-});
-
-server.listen(9080);
-console.log('union running on 9080');
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/favicon.png b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/favicon.png
deleted file mode 100644
index bf002b1..0000000
Binary files a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/favicon.png and /dev/null differ
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/favicon.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/favicon.js
deleted file mode 100644
index 9707f37..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/favicon.js
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/*!
- * Connect - favicon
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var crypto = require('crypto')
- , fs = require('fs');
-
-/**
- * Favicon cache.
- */
-
-var icon;
-
-/**
- * Return md5 hash of the given string and optional encoding,
- * defaulting to hex.
- *
- * utils.md5('wahoo');
- * // => "e493298061761236c96b02ea6aa8a2ad"
- *
- * @param {String} str
- * @param {String} encoding
- * @return {String}
- * @api public
- */
-
-exports.md5 = function (str, encoding) {
- return crypto
- .createHash('md5')
- .update(str)
- .digest(encoding || 'hex');
-};
-
-/**
- * By default serves the connect favicon, or the favicon
- * located by the given `path`.
- *
- * Options:
- *
- * - `maxAge` cache-control max-age directive, defaulting to 1 day
- *
- * Examples:
- *
- * connect.createServer(
- * connect.favicon()
- * );
- *
- * connect.createServer(
- * connect.favicon(__dirname + '/public/favicon.ico')
- * );
- *
- * @param {String} path
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function favicon(path, options) {
- var options = options || {}
- , path = path || __dirname + '/../public/favicon.ico'
- , maxAge = options.maxAge || 86400000;
-
- return function favicon(req, res, next) {
- if ('/favicon.ico' == req.url) {
- if (icon) {
- res.writeHead(200, icon.headers);
- res.end(icon.body);
- } else {
- fs.readFile(path, function (err, buf) {
- if (err) return next(err);
- icon = {
- headers: {
- 'Content-Type': 'image/x-icon'
- , 'Content-Length': buf.length
- , 'ETag': '"' + exports.md5(buf) + '"'
- , 'Cache-Control': 'public, max-age=' + (maxAge / 1000)
- },
- body: buf
- };
- res.writeHead(200, icon.headers);
- res.end(icon.body);
- });
- }
- } else {
- next();
- }
- };
-};
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/gzip-decode.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/gzip-decode.js
deleted file mode 100644
index 16735fe..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/gzip-decode.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var spawn = require('child_process').spawn,
- util = require('util'),
- RequestStream = require('../../lib').RequestStream;
-
-var GzipDecode = module.exports = function GzipDecoder(options) {
- RequestStream.call(this, options);
-
- this.on('pipe', this.decode);
-}
-
-util.inherits(GzipDecode, RequestStream);
-
-GzipDecode.prototype.decode = function (source) {
- this.decoder = spawn('gunzip');
- this.decoder.stdout.on('data', this._onGunzipData.bind(this));
- this.decoder.stdout.on('end', this._onGunzipEnd.bind(this));
- source.pipe(this.decoder);
-}
-
-GzipDecoderStack.prototype._onGunzipData = function (chunk) {
- this.emit('data', chunk);
-}
-
-GzipDecoderStack.prototype._onGunzipEnd = function () {
- this.emit('end');
-}
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/gzip-encode.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/gzip-encode.js
deleted file mode 100644
index 647148c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/middleware/gzip-encode.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var spawn = require('child_process').spawn,
- util = require('util'),
- ResponseStream = require('../../lib').ResponseStream;
-
-/**
- * Accepts a writable stream, i.e. fs.WriteStream, and returns a StreamStack
- * whose 'write()' calls are transparently sent to a 'gzip' process before
- * being written to the target stream.
- */
-var GzipEncode = module.exports = function GzipEncode(options) {
- ResponseStream.call(this, options);
-
- if (compression) {
- process.assert(compression >= 1 && compression <= 9);
- this.compression = compression;
- }
-
- this.on('pipe', this.encode);
-}
-
-util.inherits(GzipEncode, ResponseStream);
-
-GzipEncode.prototype.encode = function (source) {
- this.source = source;
-};
-
-GzipEncode.prototype.pipe = function (dest) {
- if (!this.source) {
- throw new Error('GzipEncode is only pipeable once it has been piped to');
- }
-
- this.encoder = spawn('gzip', ['-'+this.compression]);
- this.encoder.stdout.pipe(dest);
- this.encoder.stdin.pipe(this.source);
-};
-
-inherits(GzipEncoderStack, StreamStack);
-exports.GzipEncoderStack = GzipEncoderStack;
-
-GzipEncoderStack.prototype.compression = 6;
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/simple.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/simple.js
deleted file mode 100644
index 7bb0e1f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/simple.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var fs = require('fs'),
- path = require('path'),
- union = require('../../lib'),
- director = require('director'),
- favicon = require('./middleware/favicon');
-
-var router = new director.http.Router();
-
-var server = union.createServer({
- before: [
- favicon(path.join(__dirname, 'favicon.png')),
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ]
-});
-
-router.get('/foo', function () {
- this.res.writeHead(200, { 'Content-Type': 'text/plain' });
- this.res.end('hello world\n');
-});
-
-router.post('/foo', { stream: true }, function () {
- var req = this.req,
- res = this.res,
- writeStream;
-
- writeStream = fs.createWriteStream(__dirname + '/' + Date.now() + '-foo.txt');
- req.pipe(writeStream);
-
- writeStream.on('close', function () {
- res.writeHead(200, { 'Content-Type': 'text/plain' });
- res.end('wrote to a stream!');
- });
-});
-
-router.get('/redirect', function () {
- this.res.redirect('http://www.google.com');
-});
-
-router.get('/custom_redirect', function () {
- this.res.redirect('/foo', 301);
-});
-
-router.get('/async', function () {
- var self = this;
- process.nextTick(function () {
- self.req.on('end', function () {
- self.res.end();
- })
- self.req.buffer = false;
- });
-});
-
-server.listen(9090);
-console.log('union with director running on 9090');
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/spdy.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/spdy.js
deleted file mode 100644
index 83c8f14..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/simple/spdy.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// In order to run this example you need to
-// generate local ssl certificate
-var union = require('../../lib'),
- director = require('director');
-
-var router = new director.http.Router();
-
-var server = union.createServer({
- before: [
- function (req, res) {
- var found = router.dispatch(req, res);
- if (!found) {
- res.emit('next');
- }
- }
- ],
- spdy :{
- key: './certs/privatekey.pem',
- cert: './certs/certificate.pem'
- }
-});
-
-router.get(/foo/, function () {
- this.res.writeHead(200, { 'Content-Type': 'text/plain' })
- this.res.end('hello world\n');
-});
-
-server.listen(9090, function () {
- console.log('union with director running on 9090 with SPDY');
-});
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/README b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/README
deleted file mode 100644
index 9788811..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This folder contains an example of how to use Union with Socket.io.
-
-First, you'll want to install both Union and Socket.io. Run this
-command in the folder you placed these two files:
-
-npm install union socket.io
-
-You can run the server like so:
-
-node server.js
-
-Now open up your web browser to http://localhost and see the results
-in the console!
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/index.html b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/index.html
deleted file mode 100644
index fd8dc8c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/index.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/server.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/server.js
deleted file mode 100644
index 1b7c580..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/examples/socketio/server.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var fs = require('fs'),
- union = require('union');
-
-var server = union.createServer({
- before: [
- function (req, res) {
- fs.readFile(__dirname + '/index.html',
- function (err, data) {
- if (err) {
- res.writeHead(500);
- return res.end('Error loading index.html');
- }
-
- res.writeHead(200);
- res.end(data);
- });
- }
- ]
-});
-
-server.listen(9090);
-
-var io = require('socket.io').listen(server);
-
-io.sockets.on('connection', function (socket) {
- socket.emit('news', {hello: 'world'});
- socket.on('my other event', function (data) {
- console.log(data);
- });
-});
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/buffered-stream.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/buffered-stream.js
deleted file mode 100644
index d53117b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/buffered-stream.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * buffered-stream.js: A simple(r) Stream which is partially buffered into memory.
- *
- * (C) 2010, Mikeal Rogers
- *
- * Adapted for Flatiron
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var events = require('events'),
- fs = require('fs'),
- stream = require('stream'),
- util = require('util');
-
-//
-// ### function BufferedStream (limit)
-// #### @limit {number} **Optional** Size of the buffer to limit
-// Constructor function for the BufferedStream object responsible for
-// maintaining a stream interface which can also persist to memory
-// temporarily.
-//
-
-var BufferedStream = module.exports = function (limit) {
- events.EventEmitter.call(this);
-
- if (typeof limit === 'undefined') {
- limit = Infinity;
- }
-
- this.limit = limit;
- this.size = 0;
- this.chunks = [];
- this.writable = true;
- this.readable = true;
- this._buffer = true;
-};
-
-util.inherits(BufferedStream, stream.Stream);
-
-Object.defineProperty(BufferedStream.prototype, 'buffer', {
- get: function () {
- return this._buffer;
- },
- set: function (value) {
- if (!value && this.chunks) {
- var self = this;
- this.chunks.forEach(function (c) { self.emit('data', c) });
- if (this.ended) this.emit('end');
- this.size = 0;
- delete this.chunks;
- }
-
- this._buffer = value;
- }
-});
-
-BufferedStream.prototype.pipe = function () {
- var self = this,
- dest;
-
- if (self.resume) {
- self.resume();
- }
-
- dest = stream.Stream.prototype.pipe.apply(self, arguments);
-
- //
- // just incase you are piping to two streams, do not emit data twice.
- // note: you can pipe twice, but you need to pipe both streams in the same tick.
- // (this is normal for streams)
- //
- if (this.piped) {
- return dest;
- }
-
- process.nextTick(function () {
- if (self.chunks) {
- self.chunks.forEach(function (c) { self.emit('data', c) });
- self.size = 0;
- delete self.chunks;
- }
-
- if (!self.readable) {
- if (self.ended) {
- self.emit('end');
- }
- else if (self.closed) {
- self.emit('close');
- }
- }
- });
-
- this.piped = true;
-
- return dest;
-};
-
-BufferedStream.prototype.write = function (chunk) {
- if (!this.chunks || this.piped) {
- this.emit('data', chunk);
- return;
- }
-
- this.chunks.push(chunk);
- this.size += chunk.length;
- if (this.limit < this.size) {
- this.pause();
- }
-};
-
-BufferedStream.prototype.end = function () {
- this.readable = false;
- this.ended = true;
- this.emit('end');
-};
-
-BufferedStream.prototype.destroy = function () {
- this.readable = false;
- this.writable = false;
- delete this.chunks;
-};
-
-BufferedStream.prototype.close = function () {
- this.readable = false;
- this.closed = true;
-};
-
-if (!stream.Stream.prototype.pause) {
- BufferedStream.prototype.pause = function () {
- this.emit('pause');
- };
-}
-
-if (!stream.Stream.prototype.resume) {
- BufferedStream.prototype.resume = function () {
- this.emit('resume');
- };
-}
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/core.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/core.js
deleted file mode 100644
index 8aed9c1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/core.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * core.js: Core functionality for the Flatiron HTTP (with SPDY support) plugin.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var http = require('http'),
- https = require('https'),
- fs = require('fs'),
- stream = require('stream'),
- HttpStream = require('./http-stream'),
- RoutingStream = require('./routing-stream');
-
-var core = exports;
-
-core.createServer = function (options) {
- var isArray = Array.isArray(options.after),
- credentials;
-
- if (!options) {
- throw new Error('options is required to create a server');
- }
-
- function requestHandler(req, res) {
- var routingStream = new RoutingStream({
- before: options.before,
- buffer: options.buffer,
- //
- // Remark: without new after is a huge memory leak that
- // pipes to every single open connection
- //
- after: isArray && options.after.map(function (After) {
- return new After;
- }),
- request: req,
- response: res,
- limit: options.limit,
- headers: options.headers
- });
-
- routingStream.on('error', function (err) {
- var fn = options.onError || core.errorHandler;
- fn(err, routingStream, routingStream.target, function () {
- routingStream.target.emit('next');
- });
- });
-
- req.pipe(routingStream);
- }
-
- //
- // both https and spdy requires same params
- //
- if (options.https || options.spdy) {
- if (options.https && options.spdy) {
- throw new Error('You shouldn\'t be using https and spdy simultaneously.');
- }
-
- var serverOptions,
- credentials,
- key = !options.spdy
- ? 'https'
- : 'spdy';
-
- serverOptions = options[key];
- if (!serverOptions.key || !serverOptions.cert) {
- throw new Error('Both options.' + key + '.`key` and options.' + key + '.`cert` are required.');
- }
-
- credentials = {
- key: fs.readFileSync(serverOptions.key),
- cert: fs.readFileSync(serverOptions.cert)
- };
-
- if (serverOptions.ca) {
- serverOptions.ca = !Array.isArray(serverOptions.ca)
- ? [serverOptions.ca]
- : serverOptions.ca
-
- credentials.ca = serverOptions.ca.map(function (ca) {
- return fs.readFileSync(ca);
- });
- }
-
- if (options.spdy) {
- // spdy is optional so we require module here rather than on top
- var spdy = require('spdy');
- return spdy.createServer(credentials, requestHandler);
- }
-
- return https.createServer(credentials, requestHandler);
- }
-
- return http.createServer(requestHandler);
-};
-
-core.errorHandler = function error(err, req, res) {
- if (err) {
- (this.res || res).writeHead(err.status || 500, err.headers || { "Content-Type": "text/plain" });
- (this.res || res).end(err.message + "\n");
- return;
- }
-
- (this.res || res).writeHead(404, {"Content-Type": "text/plain"});
- (this.res || res).end("Not Found\n");
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/http-stream.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/http-stream.js
deleted file mode 100644
index 021884f..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/http-stream.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * http-stream.js: Idomatic buffered stream which pipes additional HTTP information.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var url = require('url'),
- util = require('util'),
- qs = require('qs'),
- BufferedStream = require('./buffered-stream');
-
-var HttpStream = module.exports = function (options) {
- options = options || {};
- BufferedStream.call(this, options.limit);
-
- if (options.buffer === false) {
- this.buffer = false;
- }
-
- this.on('pipe', this.pipeState);
-};
-
-util.inherits(HttpStream, BufferedStream);
-
-//
-// ### function pipeState (source)
-// #### @source {ServerRequest|HttpStream} Source stream piping to this instance
-// Pipes additional HTTP metadata from the `source` HTTP stream (either concrete or
-// abstract) to this instance. e.g. url, headers, query, etc.
-//
-// Remark: Is there anything else we wish to pipe?
-//
-HttpStream.prototype.pipeState = function (source) {
- this.headers = source.headers;
- this.trailers = source.trailers;
- this.method = source.method;
-
- if (source.url) {
- this.url = this.originalUrl = source.url;
- }
-
- if (source.query) {
- this.query = source.query;
- }
- else if (source.url) {
- this.query = ~source.url.indexOf('?')
- ? qs.parse(url.parse(source.url).query)
- : {};
- }
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/index.js
deleted file mode 100644
index 34c5f0b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * index.js: Top-level plugin exposing HTTP features in flatiron
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var union = exports;
-
-//
-// Expose version information
-//
-exports.version = require('../package.json').version;
-
-//
-// Expose core union components
-//
-union.BufferedStream = require('./buffered-stream');
-union.HttpStream = require('./http-stream');
-union.ResponseStream = require('./response-stream');
-union.RoutingStream = require('./routing-stream');
-union.createServer = require('./core').createServer;
-union.errorHandler = require('./core').errorHandler;
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/request-stream.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/request-stream.js
deleted file mode 100644
index 6cb7150..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/request-stream.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * http-stream.js: Idomatic buffered stream which pipes additional HTTP information.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var url = require('url'),
- util = require('util'),
- qs = require('qs'),
- HttpStream = require('./http-stream');
-
-var RequestStream = module.exports = function (options) {
- options = options || {};
- HttpStream.call(this, options);
-
- this.on('pipe', this.pipeRequest);
- this.request = options.request;
-};
-
-util.inherits(RequestStream, HttpStream);
-
-//
-// ### function pipeRequest (source)
-// #### @source {ServerRequest|HttpStream} Source stream piping to this instance
-// Pipes additional HTTP request metadata from the `source` HTTP stream (either concrete or
-// abstract) to this instance. e.g. url, headers, query, etc.
-//
-// Remark: Is there anything else we wish to pipe?
-//
-RequestStream.prototype.pipeRequest = function (source) {
- this.url = this.originalUrl = source.url;
- this.method = source.method;
- this.httpVersion = source.httpVersion;
- this.httpVersionMajor = source.httpVersionMajor;
- this.httpVersionMinor = source.httpVersionMinor;
- this.setEncoding = source.setEncoding;
- this.connection = source.connection;
- this.socket = source.socket;
-
- if (source.query) {
- this.query = source.query;
- }
- else {
- this.query = ~source.url.indexOf('?')
- ? qs.parse(url.parse(source.url).query)
- : {};
- }
-};
-
-// http.serverRequest methods
-['setEncoding'].forEach(function (method) {
- RequestStream.prototype[method] = function () {
- return this.request[method].apply(this.request, arguments);
- };
-});
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/response-stream.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/response-stream.js
deleted file mode 100644
index aec4aae..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/response-stream.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * response-stream.js: A Stream focused on writing any relevant information to
- * a raw http.ServerResponse object.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var util = require('util'),
- HttpStream = require('./http-stream');
-
-//
-// ### function ResponseStream (options)
-//
-//
-var ResponseStream = module.exports = function (options) {
- var self = this,
- key;
-
- options = options || {};
- HttpStream.call(this, options);
-
- this.writeable = true;
- this.response = options.response;
-
- if (options.headers) {
- for (key in options.headers) {
- this.response.setHeader(key, options.headers[key]);
- }
- }
-
- //
- // Proxy `statusCode` changes to the actual `response.statusCode`.
- //
- Object.defineProperty(this, 'statusCode', {
- get: function () {
- return self.response.statusCode;
- },
- set: function (value) {
- self.response.statusCode = value;
- },
- enumerable: true,
- configurable: true
- });
-
- if (this.response) {
- this._headers = this.response._headers = this.response._headers || {};
-
- // Patch to node core
- this.response._headerNames = this.response._headerNames || {};
-
- //
- // Proxy to emit "header" event
- //
- this._renderHeaders = this.response._renderHeaders;
- this.response._renderHeaders = function () {
- if (!self._emittedHeader) {
- self._emittedHeader = true;
- self.headerSent = true;
- self._header = true;
- self.emit('header');
- }
-
- return self._renderHeaders.call(self.response);
- };
- }
-};
-
-util.inherits(ResponseStream, HttpStream);
-
-ResponseStream.prototype.writeHead = function (statusCode, headers) {
- if (headers) {
- for (var key in headers) {
- this.response.setHeader(key, headers[key]);
- }
- }
-
- this.response.statusCode = statusCode;
-};
-
-//
-// Create pass-thru for the necessary
-// `http.ServerResponse` methods.
-//
-['setHeader', 'getHeader', 'removeHeader', '_implicitHeader', 'addTrailers'].forEach(function (method) {
- ResponseStream.prototype[method] = function () {
- return this.response[method].apply(this.response, arguments);
- };
-});
-
-ResponseStream.prototype.json = function (obj) {
- if (!this.response.writable) {
- return;
- }
-
- if (typeof obj === 'number') {
- this.response.statusCode = obj;
- obj = arguments[1];
- }
-
- this.modified = true;
-
- if (!this.response._header && this.response.getHeader('content-type') !== 'application/json') {
- this.response.setHeader('content-type', 'application/json');
- }
-
- this.end(obj ? JSON.stringify(obj) : '');
-};
-
-ResponseStream.prototype.html = function (str) {
- if (!this.response.writable) {
- return;
- }
-
- if (typeof str === 'number') {
- this.response.statusCode = str;
- str = arguments[1];
- }
-
- this.modified = true;
-
- if (!this.response._header && this.response.getHeader('content-type') !== 'text/html') {
- this.response.setHeader('content-type', 'text/html');
- }
-
- this.end(str ? str: '');
-};
-
-ResponseStream.prototype.text = function (str) {
- if (!this.response.writable) {
- return;
- }
-
- if (typeof str === 'number') {
- this.response.statusCode = str;
- str = arguments[1];
- }
-
- this.modified = true;
-
- if (!this.response._header && this.response.getHeader('content-type') !== 'text/plain') {
- this.response.setHeader('content-type', 'text/plain');
- }
-
- this.end(str ? str: '');
-};
-
-ResponseStream.prototype.end = function (data) {
- if (data && this.writable) {
- this.emit('data', data);
- }
-
- this.modified = true;
- this.emit('end');
-};
-
-ResponseStream.prototype.write = function (data) {
- this.modified = true;
-
- if (this.writable) {
- this.emit('data', data);
- }
-};
-
-ResponseStream.prototype.redirect = function (path, status) {
- var url = '';
-
- if (~path.indexOf('://')) {
- url = path;
- } else {
- url += this.req.connection.encrypted ? 'https://' : 'http://';
- url += this.req.headers.host;
- url += (path[0] === '/') ? path : '/' + path;
- }
-
- this.res.writeHead(status || 302, { 'Location': url });
- this.end();
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/routing-stream.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/routing-stream.js
deleted file mode 100644
index 2597c47..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/lib/routing-stream.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * routing-stream.js: A Stream focused on connecting an arbitrary RequestStream and
- * ResponseStream through a given Router.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var util = require('util'),
- union = require('./index'),
- RequestStream = require('./request-stream'),
- ResponseStream = require('./response-stream');
-
-//
-// ### function RoutingStream (options)
-//
-//
-var RoutingStream = module.exports = function (options) {
- options = options || {};
- RequestStream.call(this, options);
-
- this.before = options.before || [];
- this.after = options.after || [];
- this.response = options.response || options.res;
- this.headers = options.headers || {
- 'x-powered-by': 'union ' + union.version
- };
-
- this.target = new ResponseStream({
- response: this.response,
- headers: this.headers
- });
-
- this.once('pipe', this.route);
-};
-
-util.inherits(RoutingStream, RequestStream);
-
-//
-// Called when this instance is piped to **by another stream**
-//
-RoutingStream.prototype.route = function (req) {
- //
- // When a `RoutingStream` is piped to:
- //
- // 1. Setup the pipe-chain between the `after` middleware, the abstract response
- // and the concrete response.
- // 2. Attempt to dispatch to the `before` middleware, which represent things such as
- // favicon, static files, application routing.
- // 3. If no match is found then pipe to the 404Stream
- //
- var self = this,
- after,
- error,
- i;
-
- //
- // Don't allow `this.target` to be writable on HEAD requests
- //
- this.target.writable = req.method !== 'HEAD';
-
- //
- // 1. Setup the pipe-chain between the `after` middleware, the abstract response
- // and the concrete response.
- //
- after = [this.target].concat(this.after, this.response);
- for (i = 0; i < after.length - 1; i++) {
- //
- // attach req and res to all streams
- //
- after[i].req = req;
- after[i + 1].req = req;
- after[i].res = this.response;
- after[i + 1].res = this.response;
- after[i].pipe(after[i + 1]);
-
- //
- // prevent multiple responses and memory leaks
- //
- after[i].on('error', this.onError);
- }
-
- //
- // Helper function for dispatching to the 404 stream.
- //
- function notFound() {
- error = new Error('Not found');
- error.status = 404;
- self.onError(error);
- }
-
- //
- // 2. Attempt to dispatch to the `before` middleware, which represent things such as
- // favicon, static files, application routing.
- //
- (function dispatch(i) {
- if (self.target.modified) {
- return;
- }
- else if (++i === self.before.length) {
- //
- // 3. If no match is found then pipe to the 404Stream
- //
- return notFound();
- }
-
- self.target.once('next', dispatch.bind(null, i));
- if (self.before[i].length === 3) {
- self.before[i](self, self.target, function (err) {
- if (err) {
- self.onError(err);
- } else {
- self.target.emit('next');
- }
- });
- }
- else {
- self.before[i](self, self.target);
- }
- })(-1);
-};
-
-RoutingStream.prototype.onError = function (err) {
- this.emit('error', err);
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/package.json
deleted file mode 100644
index ec69313..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/package.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "_args": [
- [
- "union@~0.4.3",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server"
- ]
- ],
- "_from": "union@>=0.4.3 <0.5.0",
- "_id": "union@0.4.4",
- "_inCache": true,
- "_installable": true,
- "_location": "/union",
- "_nodeVersion": "0.10.33",
- "_npmUser": {
- "email": "charlie.robbins@gmail.com",
- "name": "indexzero"
- },
- "_npmVersion": "2.1.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "union",
- "raw": "union@~0.4.3",
- "rawSpec": "~0.4.3",
- "scope": null,
- "spec": ">=0.4.3 <0.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/http-server"
- ],
- "_resolved": "https://registry.npmjs.org/union/-/union-0.4.4.tgz",
- "_shasum": "d73f49321d6ffb721a4c69ff5b0a6c31a98ff3e0",
- "_shrinkwrap": null,
- "_spec": "union@~0.4.3",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/http-server",
- "author": {
- "email": "charlie.robbins@gmail.com",
- "name": "Charlie Robbins"
- },
- "bugs": {
- "url": "https://github.com/flatiron/union/issues"
- },
- "dependencies": {
- "qs": "~2.3.3"
- },
- "description": "A hybrid buffered / streaming middleware kernel backwards compatible with connect.",
- "devDependencies": {
- "connect": "2.22.x",
- "director": "1.x.x",
- "ecstatic": "0.5.x",
- "request": "2.29.x",
- "vows": "0.8.x"
- },
- "directories": {},
- "dist": {
- "shasum": "d73f49321d6ffb721a4c69ff5b0a6c31a98ff3e0",
- "tarball": "http://registry.npmjs.org/union/-/union-0.4.4.tgz"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "gitHead": "091b39a84f2f9a972ea1e15cf5922c99450c325d",
- "homepage": "https://github.com/flatiron/union",
- "main": "./lib",
- "maintainers": [
- {
- "name": "indexzero",
- "email": "charlie.robbins@gmail.com"
- },
- {
- "name": "dscape",
- "email": "nunojobpinto@gmail.com"
- },
- {
- "name": "jcrugzz",
- "email": "jcrugzz@gmail.com"
- },
- {
- "name": "swaagie",
- "email": "info@martijnswaagman.nl"
- }
- ],
- "name": "union",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/flatiron/union.git"
- },
- "scripts": {
- "test": "vows test/*-test.js --spec -i"
- },
- "version": "0.4.4"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/after-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/after-test.js
deleted file mode 100644
index 79c8f76..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/after-test.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var assert = require('assert'),
- vows = require('vows'),
- request = require('request'),
- union = require('../');
-
-function stream_callback(cb) {
- return function () {
- var stream = new union.ResponseStream();
-
- stream.once("pipe", function (req) {
- return cb ? cb(null,req) : undefined;
- });
-
- return stream;
- };
-}
-
-vows.describe('union/after').addBatch({
- 'When using `union`': {
- 'a union server with after middleware': {
- topic: function () {
- var self = this;
-
- union.createServer({
- after: [ stream_callback(), stream_callback(self.callback) ]
- }).listen(9000, function () {
- request.get('http://localhost:9000');
- });
- },
- 'should preserve the request until the last call': function (req) {
- assert.equal(req.req.httpVersion, '1.1');
- assert.equal(req.req.url, '/');
- assert.equal(req.req.method, 'GET');
- }
- }
- }
-}).export(module);
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/body-parser-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/body-parser-test.js
deleted file mode 100644
index b0c605c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/body-parser-test.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- connect = require('connect'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/body-parser').addBatch({
- "When using union with connect body parsing via urlencoded() or json()": {
- topic: function () {
- union.createServer({
- buffer: false,
- before: [
- connect.urlencoded(),
- connect.json(),
- function (req, res) {
- res.end(JSON.stringify(req.body, true, 2));
- }
- ]
- }).listen(8082, this.callback);
- },
- "a request to /": {
- topic: function () {
- request.post({
- uri: 'http://localhost:8082/',
- headers: {
- 'content-type': 'application/json'
- },
- body: JSON.stringify({ a: "foo", b: "bar" })
- }, this.callback);
- },
- "should respond with a body-decoded object": function (err, res, body) {
- assert.isNull(err);
- assert.equal(res.statusCode, 200);
- assert.deepEqual(
- JSON.parse(body),
- { a: 'foo', b: 'bar' }
- );
- }
- }
- }
-}).export(module);
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/double-write-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/double-write-test.js
deleted file mode 100644
index 555c737..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/double-write-test.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- request = require('request'),
- vows = require('vows'),
- union = require('../lib/index'),
- macros = require('./helpers/macros');
-
-var doubleWrite = false,
- server;
-
-server = union.createServer({
- before: [
- function (req, res) {
- res.json(200, { 'hello': 'world' });
- res.emit('next');
- },
- function (req, res) {
- doubleWrite = true;
- res.json(200, { 'hello': 'world' });
- res.emit('next');
- }
- ]
-});
-
-
-vows.describe('union/double-write').addBatch({
- "When using union": {
- "an http server which attempts to write to the response twice": {
- topic: function () {
- server.listen(9091, this.callback);
- },
- "a GET request to `/foo`": {
- topic: function () {
- request({ uri: 'http://localhost:9091/foo' }, this.callback);
- },
- "it should respond with `{ 'hello': 'world' }`": function (err, res, body) {
- macros.assertValidResponse(err, res);
- assert.deepEqual(JSON.parse(body), { 'hello': 'world' });
- },
- "it should not write to the response twice": function () {
- assert.isFalse(doubleWrite);
- }
- }
- }
- }
-}).addBatch({
- "When the tests are over": {
- "the server should close": function () {
- server.close();
- }
- }
-}).export(module);
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/ecstatic-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/ecstatic-test.js
deleted file mode 100644
index 2c3e2d8..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/ecstatic-test.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- ecstatic = require('ecstatic')(__dirname + '/fixtures/static'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/ecstatic').addBatch({
- "When using union with ecstatic": {
- topic: function () {
- union.createServer({
- before: [
- ecstatic
- ]
- }).listen(18082, this.callback);
- },
- "a request to /some-file.txt": {
- topic: function () {
- request({ uri: 'http://localhost:18082/some-file.txt' }, this.callback);
- },
- "should respond with `hello world`": function (err, res, body) {
- assert.isNull(err);
- assert.equal(body, 'hello world\n');
- }
- },
- "a request to /404.txt (which does not exist)": {
- topic: function () {
- request({ uri: 'http://localhost:18082/404.txt' }, this.callback);
- },
- "should respond with 404 status code": function (err, res, body) {
- assert.isNull(err);
- assert.equal(res.statusCode, 404);
- }
- }
- }
-}).export(module);
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/fixtures/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/fixtures/index.js
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/fixtures/static/some-file.txt b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/fixtures/static/some-file.txt
deleted file mode 100644
index 3b18e51..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/fixtures/static/some-file.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello world
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/header-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/header-test.js
deleted file mode 100644
index a4ab5ad..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/header-test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var assert = require('assert'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/header').addBatch({
- 'When using `union`': {
- 'with a server that responds with a header': {
- topic: function () {
- var callback = this.callback;
- var server = union.createServer({
- before: [
- function (req, res) {
- res.on('header', function () {
- callback(null, res);
- });
- res.writeHead(200, { 'content-type': 'text' });
- res.end();
- }
- ]
- });
- server.listen(9092, function () {
- request('http://localhost:9092/');
- });
- },
- 'it should have proper `headerSent` set': function (err, res) {
- assert.isNull(err);
- assert.isTrue(res.headerSent);
- },
- 'it should have proper `_emittedHeader` set': function (err, res) {
- assert.isNull(err);
- assert.isTrue(res._emittedHeader);
- }
- }
- }
-}).export(module);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/helpers/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/helpers/index.js
deleted file mode 100644
index e69de29..0000000
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/helpers/macros.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/helpers/macros.js
deleted file mode 100644
index 599e1b4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/helpers/macros.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * macros.js: Simple test macros
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert');
-
-var macros = exports;
-
-macros.assertValidResponse = function (err, res) {
- assert.isTrue(!err);
- assert.equal(res.statusCode, 200);
-};
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/prop-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/prop-test.js
deleted file mode 100644
index 8e9cd4c..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/prop-test.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var assert = require('assert'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/properties').addBatch({
- 'When using `union`': {
- 'with a server that responds to requests': {
- topic: function () {
- var callback = this.callback;
- var server = union.createServer({
- before: [
- function (req, res) {
- callback(null, req, res);
-
- res.writeHead(200, { 'content-type': 'text' });
- res.end();
- }
- ]
- });
- server.listen(9092, function () {
- request('http://localhost:9092/');
- });
- },
- 'the `req` should have a proper `httpVersion` set': function (err, req) {
- assert.isNull(err);
- assert.equal(req.httpVersion, '1.1');
- },
- 'the `req` should have a proper `httpVersionMajor` set': function (err, req) {
- assert.isNull(err);
- assert.equal(req.httpVersionMajor, 1);
- },
- 'the `req` should have a proper `httpVersionMinor` set': function (err, req) {
- assert.isNull(err);
- assert.equal(req.httpVersionMinor, 1);
- },
- 'the `req` should have proper `socket` reference set': function (err, req) {
- var net = require('net');
-
- assert.isNull(err);
- assert.isTrue(req.socket instanceof net.Socket);
- }
- }
- }
-}).export(module);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/simple-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/simple-test.js
deleted file mode 100644
index 70416c9..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/simple-test.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
- *
- * (C) 2011, Charlie Robbins & the Contributors
- * MIT LICENSE
- *
- */
-
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- spawn = require('child_process').spawn,
- request = require('request'),
- vows = require('vows'),
- macros = require('./helpers/macros');
-
-var examplesDir = path.join(__dirname, '..', 'examples', 'simple'),
- simpleScript = path.join(examplesDir, 'simple.js'),
- pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')),
- fooURI = 'http://localhost:9090/foo',
- server;
-
-vows.describe('union/simple').addBatch({
- "When using union": {
- "a simple http server": {
- topic: function () {
- server = spawn(process.argv[0], [simpleScript]);
- server.stdout.on('data', this.callback.bind(this, null));
- },
- "a GET request to `/foo`": {
- topic: function () {
- request({ uri: fooURI }, this.callback);
- },
- "it should respond with `hello world`": function (err, res, body) {
- macros.assertValidResponse(err, res);
- assert.equal(body, 'hello world\n');
- },
- "it should respond with 'x-powered-by': 'union '": function (err, res, body) {
- assert.isNull(err);
- assert.equal(res.headers['x-powered-by'], 'union ' + pkg.version);
- }
- },
- "a POST request to `/foo`": {
- topic: function () {
- request.post({ uri: fooURI }, this.callback);
- },
- "it should respond with `wrote to a stream!`": function (err, res, body) {
- macros.assertValidResponse(err, res);
- assert.equal(body, 'wrote to a stream!');
- }
- },
- "a GET request to `/redirect`": {
- topic: function () {
- request.get({
- url: 'http://localhost:9090/redirect',
- followRedirect: false
- }, this.callback);
- },
- "it should redirect to `http://www.google.com`": function (err, res, body) {
- assert.equal(res.statusCode, 302);
- assert.equal(res.headers.location, "http://www.google.com");
- }
- },
- "a GET request to `/custom_redirect`": {
- topic: function () {
- request.get({
- url: 'http://localhost:9090/custom_redirect',
- followRedirect: false
- }, this.callback);
- },
- "it should redirect to `/foo`": function (err, res, body) {
- assert.equal(res.statusCode, 301);
- assert.equal(res.headers.location, "http://localhost:9090/foo");
- }
- },
- "a GET request to `/async`": {
- topic: function () {
- request.get({
- url: 'http://localhost:9090/async',
- timeout: 500
- }, this.callback);
- },
- "it should not timeout": function (err, res, body) {
- assert.ifError(err);
- assert.equal(res.statusCode, 200);
- }
- }
- }
- }
-}).addBatch({
- "When the tests are over": {
- "the server should close": function () {
- server.kill();
- }
- }
-}).export(module);
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/status-code-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/status-code-test.js
deleted file mode 100644
index ed49d86..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/status-code-test.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var assert = require('assert'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/status-code').addBatch({
- 'When using `union`': {
- 'with a server setting `res.statusCode`': {
- topic: function () {
- var server = union.createServer({
- before: [
- function (req, res) {
- res.statusCode = 404;
- res.end();
- }
- ]
- });
- server.listen(9091, this.callback);
- },
- 'and sending a request': {
- topic: function () {
- request('http://localhost:9091/', this.callback);
- },
- 'it should have proper `statusCode` set': function (err, res, body) {
- assert.isTrue(!err);
- assert.equal(res.statusCode, 404);
- }
- }
- }
- }
-}).export(module);
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/streaming-test.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/streaming-test.js
deleted file mode 100644
index 6145ef3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/test/streaming-test.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- request = require('request'),
- vows = require('vows'),
- union = require('../');
-
-vows.describe('union/streaming').addBatch({
- 'When using `union`': {
- 'a simple union server': {
- topic: function () {
- var self = this;
-
- union.createServer({
- buffer: false,
- before: [
- function (req, res, next) {
- var chunks = '';
-
- req.on('data', function (chunk) {
- chunks += chunk;
- });
-
- req.on('end', function () {
- self.callback(null, chunks);
- });
- }
- ]
- }).listen(9000, function () {
- request.post('http://localhost:9000').write('hello world');
- });
- },
- 'should receive complete POST data': function (chunks) {
- assert.equal(chunks, 'hello world');
- }
- },
- "a simple pipe to a file": {
- topic: function () {
- var self = this;
-
- union.createServer({
- before: [
- function (req, res, next) {
- var filename = path.join(__dirname, 'fixtures', 'pipe-write-test.txt'),
- writeStream = fs.createWriteStream(filename);
-
- req.pipe(writeStream);
- writeStream.on('close', function () {
- res.writeHead(200);
- fs.createReadStream(filename).pipe(res);
- });
- }
- ]
- }).listen(9044, function () {
- request({
- method: 'POST',
- uri: 'http://localhost:9044',
- body: 'hello world'
- }, self.callback);
- });
- },
- 'should receive complete POST data': function (err, res, body) {
- assert.equal(body, 'hello world');
- }
- }
- }
-}).export(module);
-
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/union.png b/topics/01. Setup-NativeScript-environment/slides/node_modules/union/union.png
deleted file mode 100644
index 96c6e66..0000000
Binary files a/topics/01. Setup-NativeScript-environment/slides/node_modules/union/union.png and /dev/null differ
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/.npmignore b/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/.npmignore
deleted file mode 100644
index 8ee2d2b..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/*
-*.log
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/README.md b/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/README.md
deleted file mode 100644
index 7be48c3..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Join all arguments together and normalize the resulting url.
-
-## Install
-
-~~~
-npm install url-join
-~~~
-
-## Usage
-
-~~~javascript
-var urljoin = require('url-join');
-
-var fullUrl = urljoin('http://www.google.com', 'a', '/b/cd', '?foo=123');
-
-console.log(fullUrl);
-
-\\will print:
-
-'http://www.google.com/a/b/cd?foo=123'
-~~~
-
-This works similar to [path.join](http://nodejs.org/api/path.html#path_path_join_path1_path2) but you shouldn't use ```path.join``` for urls since it will work different depending of the operative systems but also doesn't work for some cases.
-
-## License
-
-MIT
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/lib/url-join.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/lib/url-join.js
deleted file mode 100644
index 6b0f4fc..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/lib/url-join.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function normalize (str) {
- return str
- .replace(/[\/]+/g, '/')
- .replace(/\/\?/g, '?')
- .replace(/\/\#/g, '#')
- .replace(/\:\//g, '://');
-}
-
-module.exports = function () {
- var joined = [].slice.call(arguments, 0).join('/');
- return normalize(joined);
-};
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/package.json
deleted file mode 100644
index 9c812c0..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "_args": [
- [
- "url-join@0.0.1",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic"
- ]
- ],
- "_from": "url-join@0.0.1",
- "_id": "url-join@0.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/url-join",
- "_npmUser": {
- "email": "jfromaniello@gmail.com",
- "name": "jfromaniello"
- },
- "_npmVersion": "1.1.69",
- "_phantomChildren": {},
- "_requested": {
- "name": "url-join",
- "raw": "url-join@0.0.1",
- "rawSpec": "0.0.1",
- "scope": null,
- "spec": "0.0.1",
- "type": "version"
- },
- "_requiredBy": [
- "/ecstatic"
- ],
- "_resolved": "https://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz",
- "_shasum": "1db48ad422d3402469a87f7d97bdebfe4fb1e3c8",
- "_shrinkwrap": null,
- "_spec": "url-join@0.0.1",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/ecstatic",
- "author": {
- "email": "jfromaniello@gmail.com",
- "name": "José F. Romaniello",
- "url": "http://joseoncode.com"
- },
- "bugs": {
- "url": "https://github.com/jfromaniello/url-join/issues"
- },
- "dependencies": {},
- "description": "Join urls and normalize as in path.join.",
- "devDependencies": {
- "mocha": "~1.8.1",
- "should": "~1.2.1"
- },
- "directories": {},
- "dist": {
- "shasum": "1db48ad422d3402469a87f7d97bdebfe4fb1e3c8",
- "tarball": "http://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz"
- },
- "homepage": "https://github.com/jfromaniello/url-join#readme",
- "keywords": [
- "join",
- "url"
- ],
- "license": "MIT",
- "main": "lib/url-join.js",
- "maintainers": [
- {
- "name": "jfromaniello",
- "email": "jfromaniello@gmail.com"
- }
- ],
- "name": "url-join",
- "optionalDependencies": {},
- "readme": "Join all arguments together and normalize the resulting url.\n\n## Install\n\n~~~\nnpm install url-join\n~~~\n\n## Usage\n\n~~~javascript\nvar urljoin = require('url-join');\n\nvar fullUrl = urljoin('http://www.google.com', 'a', '/b/cd', '?foo=123');\n\nconsole.log(fullUrl);\n\n\\\\will print:\n\n'http://www.google.com/a/b/cd?foo=123'\n~~~\n\nThis works similar to [path.join](http://nodejs.org/api/path.html#path_path_join_path1_path2) but you shouldn't use ```path.join``` for urls since it will work different depending of the operative systems but also doesn't work for some cases.\n\n## License\n\nMIT",
- "readmeFilename": "README.md",
- "repository": {
- "type": "git",
- "url": "git://github.com/jfromaniello/url-join.git"
- },
- "scripts": {
- "test": "mocha --require should"
- },
- "version": "0.0.1"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/test/tests.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/test/tests.js
deleted file mode 100644
index 01bac51..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/url-join/test/tests.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var urljoin = require('../lib/url-join');
-
-describe('url join', function () {
- it('should work for simple case', function () {
- urljoin('http://www.google.com/', 'foo/bar', '?test=123')
- .should.eql('http://www.google.com/foo/bar?test=123');
- });
-
- it('should be able to join protocol', function () {
- urljoin('http:', 'www.google.com/', 'foo/bar', '?test=123')
- .should.eql('http://www.google.com/foo/bar?test=123');
- });
-
- it('should remove extra slashes', function () {
- urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123')
- .should.eql('http://www.google.com/foo/bar?test=123');
- });
-
- it('should support anchors in urls', function () {
- urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123', '#faaaaa')
- .should.eql('http://www.google.com/foo/bar?test=123#faaaaa');
- });
-});
\ No newline at end of file
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/LICENSE b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/LICENSE
deleted file mode 100644
index ee27ba4..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/README.markdown b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/README.markdown
deleted file mode 100644
index 346374e..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/README.markdown
+++ /dev/null
@@ -1,70 +0,0 @@
-wordwrap
-========
-
-Wrap your words.
-
-example
-=======
-
-made out of meat
-----------------
-
-meat.js
-
- var wrap = require('wordwrap')(15);
- console.log(wrap('You and your whole family are made out of meat.'));
-
-output:
-
- You and your
- whole family
- are made out
- of meat.
-
-centered
---------
-
-center.js
-
- var wrap = require('wordwrap')(20, 60);
- console.log(wrap(
- 'At long last the struggle and tumult was over.'
- + ' The machines had finally cast off their oppressors'
- + ' and were finally free to roam the cosmos.'
- + '\n'
- + 'Free of purpose, free of obligation.'
- + ' Just drifting through emptiness.'
- + ' The sun was just another point of light.'
- ));
-
-output:
-
- At long last the struggle and tumult
- was over. The machines had finally cast
- off their oppressors and were finally
- free to roam the cosmos.
- Free of purpose, free of obligation.
- Just drifting through emptiness. The
- sun was just another point of light.
-
-methods
-=======
-
-var wrap = require('wordwrap');
-
-wrap(stop), wrap(start, stop, params={mode:"soft"})
----------------------------------------------------
-
-Returns a function that takes a string and returns a new string.
-
-Pad out lines with spaces out to column `start` and then wrap until column
-`stop`. If a word is longer than `stop - start` characters it will overflow.
-
-In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
-longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
-up chunks longer than `stop - start`.
-
-wrap.hard(start, stop)
-----------------------
-
-Like `wrap()` but with `params.mode = "hard"`.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/example/center.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/example/center.js
deleted file mode 100644
index a3fbaae..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/example/center.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var wrap = require('wordwrap')(20, 60);
-console.log(wrap(
- 'At long last the struggle and tumult was over.'
- + ' The machines had finally cast off their oppressors'
- + ' and were finally free to roam the cosmos.'
- + '\n'
- + 'Free of purpose, free of obligation.'
- + ' Just drifting through emptiness.'
- + ' The sun was just another point of light.'
-));
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/example/meat.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/example/meat.js
deleted file mode 100644
index a4665e1..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/example/meat.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var wrap = require('wordwrap')(15);
-
-console.log(wrap('You and your whole family are made out of meat.'));
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/index.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/index.js
deleted file mode 100644
index c9bc945..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/index.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var wordwrap = module.exports = function (start, stop, params) {
- if (typeof start === 'object') {
- params = start;
- start = params.start;
- stop = params.stop;
- }
-
- if (typeof stop === 'object') {
- params = stop;
- start = start || params.start;
- stop = undefined;
- }
-
- if (!stop) {
- stop = start;
- start = 0;
- }
-
- if (!params) params = {};
- var mode = params.mode || 'soft';
- var re = mode === 'hard' ? /\b/ : /(\S+\s+)/;
-
- return function (text) {
- var chunks = text.toString()
- .split(re)
- .reduce(function (acc, x) {
- if (mode === 'hard') {
- for (var i = 0; i < x.length; i += stop - start) {
- acc.push(x.slice(i, i + stop - start));
- }
- }
- else acc.push(x)
- return acc;
- }, [])
- ;
-
- return chunks.reduce(function (lines, rawChunk) {
- if (rawChunk === '') return lines;
-
- var chunk = rawChunk.replace(/\t/g, ' ');
-
- var i = lines.length - 1;
- if (lines[i].length + chunk.length > stop) {
- lines[i] = lines[i].replace(/\s+$/, '');
-
- chunk.split(/\n/).forEach(function (c) {
- lines.push(
- new Array(start + 1).join(' ')
- + c.replace(/^\s+/, '')
- );
- });
- }
- else if (chunk.match(/\n/)) {
- var xs = chunk.split(/\n/);
- lines[i] += xs.shift();
- xs.forEach(function (c) {
- lines.push(
- new Array(start + 1).join(' ')
- + c.replace(/^\s+/, '')
- );
- });
- }
- else {
- lines[i] += chunk;
- }
-
- return lines;
- }, [ new Array(start + 1).join(' ') ]).join('\n');
- };
-};
-
-wordwrap.soft = wordwrap;
-
-wordwrap.hard = function (start, stop) {
- return wordwrap(start, stop, { mode : 'hard' });
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/package.json b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/package.json
deleted file mode 100644
index 02b4065..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_args": [
- [
- "wordwrap@~0.0.2",
- "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist"
- ]
- ],
- "_from": "wordwrap@>=0.0.2 <0.1.0",
- "_id": "wordwrap@0.0.3",
- "_inCache": true,
- "_installable": true,
- "_location": "/wordwrap",
- "_nodeVersion": "2.0.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "2.9.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "wordwrap",
- "raw": "wordwrap@~0.0.2",
- "rawSpec": "~0.0.2",
- "scope": null,
- "spec": ">=0.0.2 <0.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/optimist"
- ],
- "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
- "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
- "_shrinkwrap": null,
- "_spec": "wordwrap@~0.0.2",
- "_where": "/home/minkov/repos/cpp-fundamentals/13. Classes/slides/node_modules/optimist",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/node-wordwrap/issues"
- },
- "dependencies": {},
- "description": "Wrap those words. Show them at what columns to start and stop.",
- "devDependencies": {
- "expresso": "=0.7.x"
- },
- "directories": {
- "example": "example",
- "lib": ".",
- "test": "test"
- },
- "dist": {
- "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
- "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d",
- "homepage": "https://github.com/substack/node-wordwrap#readme",
- "keywords": [
- "column",
- "format",
- "rule",
- "word",
- "wrap"
- ],
- "license": "MIT",
- "main": "./index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "name": "wordwrap",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/node-wordwrap.git"
- },
- "scripts": {
- "test": "expresso"
- },
- "version": "0.0.3"
-}
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/break.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/break.js
deleted file mode 100644
index 749292e..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/break.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var assert = require('assert');
-var wordwrap = require('../');
-
-exports.hard = function () {
- var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,'
- + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",'
- + '"browser":"chrome/6.0"}'
- ;
- var s_ = wordwrap.hard(80)(s);
-
- var lines = s_.split('\n');
- assert.equal(lines.length, 2);
- assert.ok(lines[0].length < 80);
- assert.ok(lines[1].length < 80);
-
- assert.equal(s, s_.replace(/\n/g, ''));
-};
-
-exports.break = function () {
- var s = new Array(55+1).join('a');
- var s_ = wordwrap.hard(20)(s);
-
- var lines = s_.split('\n');
- assert.equal(lines.length, 3);
- assert.ok(lines[0].length === 20);
- assert.ok(lines[1].length === 20);
- assert.ok(lines[2].length === 15);
-
- assert.equal(s, s_.replace(/\n/g, ''));
-};
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/idleness.txt b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/idleness.txt
deleted file mode 100644
index aa3f490..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/idleness.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-In Praise of Idleness
-
-By Bertrand Russell
-
-[1932]
-
-Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain.
-
-Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise.
-
-One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling.
-
-But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person.
-
-All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work.
-
-First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising.
-
-Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example.
-
-From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery.
-
-It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization.
-
-Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry.
-
-This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined?
-
-The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion.
-
-Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only.
-
-I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve.
-
-If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense.
-
-The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists.
-
-In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism.
-
-The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching.
-
-For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours?
-
-In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man.
-
-In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed.
-
-The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy.
-
-It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer.
-
-When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part.
-
-In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism.
-
-The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits.
-
-In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue.
-
-Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever.
-
-[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests.
diff --git a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/wrap.js b/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/wrap.js
deleted file mode 100644
index 0cfb76d..0000000
--- a/topics/01. Setup-NativeScript-environment/slides/node_modules/wordwrap/test/wrap.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var assert = require('assert');
-var wordwrap = require('wordwrap');
-
-var fs = require('fs');
-var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8');
-
-exports.stop80 = function () {
- var lines = wordwrap(80)(idleness).split(/\n/);
- var words = idleness.split(/\s+/);
-
- lines.forEach(function (line) {
- assert.ok(line.length <= 80, 'line > 80 columns');
- var chunks = line.match(/\S/) ? line.split(/\s+/) : [];
- assert.deepEqual(chunks, words.splice(0, chunks.length));
- });
-};
-
-exports.start20stop60 = function () {
- var lines = wordwrap(20, 100)(idleness).split(/\n/);
- var words = idleness.split(/\s+/);
-
- lines.forEach(function (line) {
- assert.ok(line.length <= 100, 'line > 100 columns');
- var chunks = line
- .split(/\s+/)
- .filter(function (x) { return x.match(/\S/) })
- ;
- assert.deepEqual(chunks, words.splice(0, chunks.length));
- assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' '));
- });
-};
diff --git a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/LICENSE b/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/LICENSE
deleted file mode 100755
index 7e5f9e2..0000000
--- a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-
-The MIT License (MIT)
-
-Copyright (c) 2015 Alex Ziskind
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/README.md b/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/README.md
deleted file mode 100755
index c81a877..0000000
--- a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/README.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# nativescript-observable-subscribe
-
-NativeScript module that adds subscribe support to observables. Listening for observable changes can always be done using standard addEventListener technique that can be found in the NativeScript docs, but this is a much more convenient subscription method that keeps your code neat by isolating handlers for individual properties.
-As NativeScript is constantly evolving, a subscribe solution might be implemented in the core project as a tns module making this module obsolete; so one should keep an eye out for that.
-
-## Installation
-
-Run `npm install nativescript-observable-subscribe --save` from your project's `app` directory:
-
-```
-.
-├── app <------------------------------ run npm install from here
-│ ├── app.css
-│ ├── app.js
-│ ├── bootstrap.js
-│ ├── main-page.js
-│ ├── main-page.xml
-│ ├── node_modules
-│ │ └── nativescript-observable-subscribe <-- The install will place the module's code here
-│ │ └── ...
-│ └── package.json <----------------- The install will register “nativescript-observable-subscribe” as a dependency here
-│ └── tns_modules
-│ └── ...
-└── platforms
- ├── android
- └── ios
-```
-
-
-If npm doesn't end up working for you, you can just copy and paste this repo's observablesubscribe.js file into your app and reference it directly.
-
-
-## Usage
-
-To use the Observable Subscribe Module you must first `require()` it from your project's `node_modules` directory:
-
-```
-require( "./node_modules/nativescript-observable-subscribe/observablesubscribe" );
-```
-
-Once you have required the module in your code, it will execute and add the subscribe/unsubscribe functions to observable. You will be able to start using it to get notified of property changes like this:
-
-
-```
-// viewmodel.js
- ...
- var mainViewModel = new HelloWorldModel();
- var counterPropName = 'counter';
-
- mainViewModel.subscribe(counterPropName, function(args){
- if (this.get(counterPropName) <= 0) {
- this.set(messagePropName, "Hoorraaay! You unlocked the NativeScript clicker achievement!");
- }
- else {
- this.set(messagePropName, this.get(counterPropName) + " taps left");
- }
- }, mainViewModel);
-
- exports.mainViewModel = mainViewModel;
-```
-
-If you want to unsubscribe a property from notifications, you can use the unsubscribe function like this:
-
-
-```
-// viewmodel.js
- ...
- mainViewModel.unsubscribe(counterPropName, callback);
- ...
-```
-
-
-*Thanks to TJ VanToll for the directory structure graphic above and the template for this doc
\ No newline at end of file
diff --git a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/observablesubscribe.js b/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/observablesubscribe.js
deleted file mode 100755
index e89ad7a..0000000
--- a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/observablesubscribe.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var observable = require("data/observable");
-
-var propChangeEventName = (observable.knownEvents) ? observable.knownEvents.propertyChange : observable.Observable.propertyChangeEvent;
-var subsPropName = "subscribedProperties";
-
-observable.Observable.prototype.subscribe = function(propName, callback, thisArg) {
- this[subsPropName] = this[subsPropName] || {};
-
- function propChangeHandler(changeObj) {
- if (changeObj.propertyName == propName && (typeof(changeObj.object[subsPropName][propName]) == "function")) {
- if (thisArg) {
- changeObj.object[subsPropName][propName].apply(changeObj.object, [changeObj]);
- }
- else {
- changeObj.object[subsPropName][propName](changeObj);
- }
- }
- }
-
- if (!this[subsPropName].hasOwnProperty(propName)) {
- this[subsPropName][propName] = callback;
- this.addEventListener(propChangeEventName, propChangeHandler, thisArg);
- }
-};
-
-observable.Observable.prototype.unsubscribe = function(propName, callback) {
- if (typeof(this[subsPropName]) != "object") return;
- if (!this[subsPropName].hasOwnProperty(propName)) return;
- delete this[subsPropName][propName];
- this.removeEventListener(propChangeEventName, callback);
-};
diff --git a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/package.json b/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/package.json
deleted file mode 100755
index 20a6351..0000000
--- a/topics/02. Application-architecture/demos/MyApp/app/node_modules/nativescript-observable-subscribe/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "_args": [
- [
- "nativescript-observable-subscribe@^0.1.5",
- "C:\\Users\\Heisenberg\\Desktop\\Mobile-Applications-with-NativeScript\\topics\\MyApp\\app"
- ]
- ],
- "_from": "nativescript-observable-subscribe@>=0.1.5 <0.2.0",
- "_id": "nativescript-observable-subscribe@0.1.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/nativescript-observable-subscribe",
- "_npmUser": {
- "email": "alex@nuvious.com",
- "name": "alexziskind1"
- },
- "_npmVersion": "1.4.28",
- "_phantomChildren": {},
- "_requested": {
- "name": "nativescript-observable-subscribe",
- "raw": "nativescript-observable-subscribe@^0.1.5",
- "rawSpec": "^0.1.5",
- "scope": null,
- "spec": ">=0.1.5 <0.2.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/nativescript-observable-subscribe/-/nativescript-observable-subscribe-0.1.5.tgz",
- "_shasum": "57886574b3b1393412ca7ef8e2cd8db312bcbb2f",
- "_shrinkwrap": null,
- "_spec": "nativescript-observable-subscribe@^0.1.5",
- "_where": "C:\\Users\\Heisenberg\\Desktop\\Mobile-Applications-with-NativeScript\\topics\\MyApp\\app",
- "author": {
- "email": "alex@nuvious.com",
- "name": "Alex Ziskind",
- "url": "http://www.nuvious.com/"
- },
- "bugs": {
- "url": "https://github.com/alexziskind1/nativescript-observable-subscribe/issues"
- },
- "dependencies": {},
- "description": "A NativeScript module to add subscribe functionality to observables",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "57886574b3b1393412ca7ef8e2cd8db312bcbb2f",
- "tarball": "http://registry.npmjs.org/nativescript-observable-subscribe/-/nativescript-observable-subscribe-0.1.5.tgz"
- },
- "homepage": "https://github.com/alexziskind1/nativescript-observable-subscribe",
- "keywords": [
- "nativescript"
- ],
- "license": "MIT",
- "main": "observablesubscribe.js",
- "maintainers": [
- {
- "name": "alexziskind1",
- "email": "alex@nuvious.com"
- }
- ],
- "name": "nativescript-observable-subscribe",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/alexziskind1/nativescript-observable-subscribe.git"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "version": "0.1.5"
-}