15 |
16 |
19 |
--------------------------------------------------------------------------------
/app/pages/login/login.ts:
--------------------------------------------------------------------------------
1 | import {Page, ViewController} from 'ionic-angular';
2 | import {Inject} from 'angular2/core';
3 |
4 | import {AngularFire, FirebaseListObservable, FirebaseObjectObservable, FirebaseRef} from 'angularfire2';
5 | import {Observable} from 'rxjs/Observable';
6 |
7 | @Page({
8 | templateUrl: 'build/pages/login/login.html'
9 | })
10 | export class LoginPage {
11 |
12 | username: string = '';
13 | ref: Firebase;
14 | users: FirebaseListObservable;
15 | //
16 | constructor(private af: AngularFire, private viewCtrl: ViewController, @Inject(FirebaseRef) ref:Firebase){
17 | this.users = this.af.list('/users');
18 | this.ref = ref;
19 | }
20 |
21 | login(): void {
22 | console.log(`Adding user to users in chat room: ${this.username} `);
23 |
24 | let users: Firebase = this.ref.child('/users');
25 | // We need to check is user exists in DB
26 | users.child(this.username).on('value', (snaphot:FirebaseDataSnapshot) => {
27 | let name = snaphot.val();
28 | console.log(name);
29 | if (name) {
30 | // User exists
31 | this.viewCtrl.dismiss(this.username);
32 | } else {
33 | // User must be created
34 | // push(value?: any, onComplete?: (error: any) => void): FirebaseWithPromise;
35 | users.push({
36 | name: this.username
37 | }).then((value: any) => {
38 | this.viewCtrl.dismiss(this.username);
39 | }, (error: any) => {
40 | console.log('Error', error);
41 | });
42 | }
43 | }, (error: any) => {
44 | console.log('Error', error);
45 | });
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/pages/media/media.html:
--------------------------------------------------------------------------------
1 |
2 |
5 | Peer connecton
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/pages/media/media.ts:
--------------------------------------------------------------------------------
1 | import {Page, Platform} from 'ionic-angular';
2 |
3 | import {AngularFire, FirebaseListObservable} from 'angularfire2';
4 | import {Observable} from 'rxjs/Observable';
5 |
6 | import {WebRTCService} from '../../common/webrtc.service';
7 |
8 | @Page({
9 | templateUrl: 'build/pages/home/home.html'
10 | })
11 | export class MediaPage {
12 |
13 | users: FirebaseListObservable;
14 |
15 | constructor(private platform: Platform, private af: AngularFire, private rtc:WebRTCService){
16 | this.users = this.af.list('/users');
17 | }
18 |
19 | join(task : HTMLInputElement): void {
20 |
21 | console.log(`Adding user to users in chat room: ${task.value} `);
22 | this.users.add(task.value);
23 | }
24 |
25 | leave(id){
26 | this.users.remove(id);
27 | }
28 |
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/pages/tabs/tabs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/pages/tabs/tabs.ts:
--------------------------------------------------------------------------------
1 | import {Page} from 'ionic-angular';
2 | import {ChatPage} from '../chat/chat';
3 |
4 |
5 | @Page({
6 | templateUrl: 'build/pages/tabs/tabs.html'
7 | })
8 | export class TabsPage {
9 | // this tells the tabs component which Pages
10 | // should be each tab's root Page
11 | chatPage: any = ChatPage;
12 | }
13 |
--------------------------------------------------------------------------------
/app/pages/users/users.html:
--------------------------------------------------------------------------------
1 |
2 | Online Users
3 |
4 |
5 |
6 |
7 | {{user.$value}}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/pages/users/users.ts:
--------------------------------------------------------------------------------
1 | import {Page, ViewController, NavController} from 'ionic-angular';
2 | import {COMMON_DIRECTIVES} from 'angular2/common';
3 |
4 | import {AngularFire, FirebaseRef, FirebaseListObservable, FirebaseObjectObservable} from 'angularfire2';
5 |
6 | import {UserService} from '../../common/user.service';
7 | import {User, OtherUser, AuthService} from '../../common/auth.service';
8 |
9 | @Page({
10 | templateUrl: 'build/pages/users/users.html',
11 | directives: [COMMON_DIRECTIVES]
12 | })
13 | export class UsersPage {
14 |
15 | me: User;
16 | users: FirebaseListObservable;
17 |
18 | constructor(private userService: UserService, private authService: AuthService,
19 | private viewCtrl: ViewController) {
20 | this.me = authService.user;
21 | this.users = userService.asList();
22 | }
23 |
24 | chooseUser(user: any) {
25 | console.log('Choose user', user);
26 | this.viewCtrl.dismiss(new OtherUser(user.$value, user.$key));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/theme/app.core.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 |
3 |
4 | // App Shared Imports
5 | // --------------------------------------------------
6 | // These are the imports which make up the design of this app.
7 | // By default each design mode includes these shared imports.
8 | // App Shared Sass variables belong in app.variables.scss.
9 |
10 | @import '../pages/home/home';
11 |
--------------------------------------------------------------------------------
/app/theme/app.ios.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 |
3 |
4 | // App Shared Variables
5 | // --------------------------------------------------
6 | // Shared Sass variables go in the app.variables.scss file
7 | @import 'app.variables';
8 |
9 |
10 | // App iOS Variables
11 | // --------------------------------------------------
12 | // iOS only Sass variables can go here
13 |
14 |
15 | // Ionic iOS Sass
16 | // --------------------------------------------------
17 | // Custom App variables must be declared before importing Ionic.
18 | // Ionic will use its default values when a custom variable isn't provided.
19 | @import 'ionic.ios';
20 |
21 |
22 | // App Shared Sass
23 | // --------------------------------------------------
24 | // All Sass files that make up this app goes into the app.core.scss file.
25 | // For simpler CSS overrides, custom app CSS must come after Ionic's CSS.
26 | @import 'app.core';
27 |
28 |
29 | // App iOS Only Sass
30 | // --------------------------------------------------
31 | // CSS that should only apply to the iOS app
32 |
--------------------------------------------------------------------------------
/app/theme/app.md.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 |
3 |
4 | // App Shared Variables
5 | // --------------------------------------------------
6 | // Shared Sass variables go in the app.variables.scss file
7 | @import 'app.variables';
8 |
9 |
10 | // App Material Design Variables
11 | // --------------------------------------------------
12 | // Material Design only Sass variables can go here
13 |
14 |
15 | // Ionic Material Design Sass
16 | // --------------------------------------------------
17 | // Custom App variables must be declared before importing Ionic.
18 | // Ionic will use its default values when a custom variable isn't provided.
19 | @import 'ionic.md';
20 |
21 |
22 | // App Shared Sass
23 | // --------------------------------------------------
24 | // All Sass files that make up this app goes into the app.core.scss file.
25 | // For simpler CSS overrides, custom app CSS must come after Ionic's CSS.
26 | @import 'app.core';
27 |
28 |
29 | // App Material Design Only Sass
30 | // --------------------------------------------------
31 | // CSS that should only apply to the Material Design app
32 |
--------------------------------------------------------------------------------
/app/theme/app.variables.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 |
3 |
4 | // App Shared Variables
5 | // --------------------------------------------------
6 | // To customize the look and feel of this app, you can override
7 | // the Sass variables found in Ionic's source scss files. Setting
8 | // variables before Ionic's Sass will use these variables rather than
9 | // Ionic's default Sass variable values. App Shared Sass imports belong
10 | // in the app.core.scss file and not this file. Sass variables specific
11 | // to the mode belong in either the app.ios.scss or app.md.scss files.
12 |
13 |
14 | // App Shared Color Variables
15 | // --------------------------------------------------
16 | // It's highly recommended to change the default colors
17 | // to match your app's branding. Ionic uses a Sass map of
18 | // colors so you can add, rename and remove colors as needed.
19 | // The "primary" color is the only required color in the map.
20 | // Both iOS and MD colors can be further customized if colors
21 | // are different per mode.
22 |
23 | $colors: (
24 | primary: #387ef5,
25 | secondary: #32db64,
26 | danger: #f53d3d,
27 | light: #f4f4f4,
28 | dark: #222,
29 | favorite: #69BB7B
30 | );
31 |
--------------------------------------------------------------------------------
/app/theme/app.wp.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 |
3 |
4 | // App Shared Variables
5 | // --------------------------------------------------
6 | // Shared Sass variables go in the app.variables.scss file
7 | @import 'app.variables';
8 |
9 |
10 | // App Windows Variables
11 | // --------------------------------------------------
12 | // Windows only Sass variables can go here
13 |
14 |
15 | // Ionic Windows Sass
16 | // --------------------------------------------------
17 | // Custom App variables must be declared before importing Ionic.
18 | // Ionic will use its default values when a custom variable isn't provided.
19 | @import "ionic.wp";
20 |
21 |
22 | // App Shared Sass
23 | // --------------------------------------------------
24 | // All Sass files that make up this app goes into the app.core.scss file.
25 | // For simpler CSS overrides, custom app CSS must come after Ionic's CSS.
26 | @import 'app.core';
27 |
28 |
29 | // App Windows Only Sass
30 | // --------------------------------------------------
31 | // CSS that should only apply to the Windows app
32 |
--------------------------------------------------------------------------------
/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ionic2-firebase-sample
4 | An Ionic Framework and Cordova project.
5 | Ionic Framework Team
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp'),
2 | gulpWatch = require('gulp-watch'),
3 | del = require('del'),
4 | argv = process.argv;
5 |
6 | /**
7 | * Ionic Gulp tasks, for more information on each see
8 | * https://github.com/driftyco/ionic-gulp-tasks
9 | */
10 | var buildWebpack = require('ionic-gulp-webpack-build');
11 | var buildSass = require('ionic-gulp-sass-build');
12 | var copyHTML = require('ionic-gulp-html-copy');
13 | var copyFonts = require('ionic-gulp-fonts-copy');
14 |
15 | gulp.task('watch', ['sass', 'html', 'fonts'], function(){
16 | gulpWatch('app/**/*.scss', function(){ gulp.start('sass'); });
17 | gulpWatch('app/**/*.html', function(){ gulp.start('html'); });
18 | return buildWebpack({ watch: true });
19 | });
20 | gulp.task('build', ['sass', 'html', 'fonts'], buildWebpack);
21 | gulp.task('sass', buildSass);
22 | gulp.task('html', copyHTML);
23 | gulp.task('fonts', copyFonts);
24 | gulp.task('clean', function(done){
25 | del('www/build', done);
26 | });
27 |
28 | /**
29 | * Ionic hooks
30 | * Add ':before' or ':after' to any Ionic project command name to run the specified
31 | * tasks before or after the command.
32 | */
33 | gulp.task('serve:before', ['watch']);
34 | gulp.task('emulate:before', ['build']);
35 | gulp.task('deploy:before', ['build']);
36 |
37 | // we want to 'watch' when livereloading
38 | var shouldWatch = argv.indexOf('-l') > -1 || argv.indexOf('--livereload') > -1;
39 | gulp.task('run:before', [shouldWatch ? 'watch' : 'build']);
--------------------------------------------------------------------------------
/hooks/README.md:
--------------------------------------------------------------------------------
1 |
21 | # Cordova Hooks
22 |
23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. Hook scripts could be defined by adding them to the special predefined folder (`/hooks`) or via configuration files (`config.xml` and `plugin.xml`) and run serially in the following order:
24 | * Application hooks from `/hooks`;
25 | * Application hooks from `config.xml`;
26 | * Plugin hooks from `plugins/.../plugin.xml`.
27 |
28 | __Remember__: Make your scripts executable.
29 |
30 | __Note__: `.cordova/hooks` directory is also supported for backward compatibility, but we don't recommend using it as it is deprecated.
31 |
32 | ## Supported hook types
33 | The following hook types are supported:
34 |
35 | after_build/
36 | after_compile/
37 | after_docs/
38 | after_emulate/
39 | after_platform_add/
40 | after_platform_rm/
41 | after_platform_ls/
42 | after_plugin_add/
43 | after_plugin_ls/
44 | after_plugin_rm/
45 | after_plugin_search/
46 | after_plugin_install/ <-- Plugin hooks defined in plugin.xml are executed exclusively for a plugin being installed
47 | after_prepare/
48 | after_run/
49 | after_serve/
50 | before_build/
51 | before_compile/
52 | before_docs/
53 | before_emulate/
54 | before_platform_add/
55 | before_platform_rm/
56 | before_platform_ls/
57 | before_plugin_add/
58 | before_plugin_ls/
59 | before_plugin_rm/
60 | before_plugin_search/
61 | before_plugin_install/ <-- Plugin hooks defined in plugin.xml are executed exclusively for a plugin being installed
62 | before_plugin_uninstall/ <-- Plugin hooks defined in plugin.xml are executed exclusively for a plugin being uninstalled
63 | before_prepare/
64 | before_run/
65 | before_serve/
66 | pre_package/ <-- Windows 8 and Windows Phone only.
67 |
68 | ## Ways to define hooks
69 | ### Via '/hooks' directory
70 | To execute custom action when corresponding hook type is fired, use hook type as a name for a subfolder inside 'hooks' directory and place you script file here, for example:
71 |
72 | # script file will be automatically executed after each build
73 | hooks/after_build/after_build_custom_action.js
74 |
75 |
76 | ### Config.xml
77 |
78 | Hooks can be defined in project's `config.xml` using `` elements, for example:
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | ...
89 |
90 |
91 |
92 |
93 |
94 |
95 | ...
96 |
97 |
98 | ### Plugin hooks (plugin.xml)
99 |
100 | As a plugin developer you can define hook scripts using `` elements in a `plugin.xml` like that:
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | ...
109 |
110 |
111 | `before_plugin_install`, `after_plugin_install`, `before_plugin_uninstall` plugin hooks will be fired exclusively for the plugin being installed/uninstalled.
112 |
113 | ## Script Interface
114 |
115 | ### Javascript
116 |
117 | If you are writing hooks in Javascript you should use the following module definition:
118 | ```javascript
119 | module.exports = function(context) {
120 | ...
121 | }
122 | ```
123 |
124 | You can make your scipts async using Q:
125 | ```javascript
126 | module.exports = function(context) {
127 | var Q = context.requireCordovaModule('q');
128 | var deferral = new Q.defer();
129 |
130 | setTimeout(function(){
131 | console.log('hook.js>> end');
132 | deferral.resolve();
133 | }, 1000);
134 |
135 | return deferral.promise;
136 | }
137 | ```
138 |
139 | `context` object contains hook type, executed script full path, hook options, command-line arguments passed to Cordova and top-level "cordova" object:
140 | ```json
141 | {
142 | "hook": "before_plugin_install",
143 | "scriptLocation": "c:\\script\\full\\path\\appBeforePluginInstall.js",
144 | "cmdLine": "The\\exact\\command\\cordova\\run\\with arguments",
145 | "opts": {
146 | "projectRoot":"C:\\path\\to\\the\\project",
147 | "cordova": {
148 | "platforms": ["wp8"],
149 | "plugins": ["com.plugin.withhooks"],
150 | "version": "0.21.7-dev"
151 | },
152 | "plugin": {
153 | "id": "com.plugin.withhooks",
154 | "pluginInfo": {
155 | ...
156 | },
157 | "platform": "wp8",
158 | "dir": "C:\\path\\to\\the\\project\\plugins\\com.plugin.withhooks"
159 | }
160 | },
161 | "cordova": {...}
162 | }
163 |
164 | ```
165 | `context.opts.plugin` object will only be passed to plugin hooks scripts.
166 |
167 | You can also require additional Cordova modules in your script using `context.requireCordovaModule` in the following way:
168 | ```javascript
169 | var Q = context.requireCordovaModule('q');
170 | ```
171 |
172 | __Note__: new module loader script interface is used for the `.js` files defined via `config.xml` or `plugin.xml` only.
173 | For compatibility reasons hook files specified via `/hooks` folders are run via Node child_process spawn, see 'Non-javascript' section below.
174 |
175 | ### Non-javascript
176 |
177 | Non-javascript scripts are run via Node child_process spawn from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:
178 |
179 | * CORDOVA_VERSION - The version of the Cordova-CLI.
180 | * CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
181 | * CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
182 | * CORDOVA_HOOK - Path to the hook that is being executed.
183 | * CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)
184 |
185 | If a script returns a non-zero exit code, then the parent cordova command will be aborted.
186 |
187 | ## Writing hooks
188 |
189 | We highly recommend writing your hooks using Node.js so that they are
190 | cross-platform. Some good examples are shown here:
191 |
192 | [http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
193 |
194 | Also, note that even if you are working on Windows, and in case your hook scripts aren't bat files (which is recommended, if you want your scripts to work in non-Windows operating systems) Cordova CLI will expect a shebang line as the first line for it to know the interpreter it needs to use to launch the script. The shebang line should match the following example:
195 |
196 | #!/usr/bin/env [name_of_interpreter_executable]
197 |
--------------------------------------------------------------------------------
/hooks/after_prepare/010_add_platform_class.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | // Add Platform Class
4 | // v1.0
5 | // Automatically adds the platform class to the body tag
6 | // after the `prepare` command. By placing the platform CSS classes
7 | // directly in the HTML built for the platform, it speeds up
8 | // rendering the correct layout/style for the specific platform
9 | // instead of waiting for the JS to figure out the correct classes.
10 |
11 | var fs = require('fs');
12 | var path = require('path');
13 |
14 | var rootdir = process.argv[2];
15 |
16 | function addPlatformBodyTag(indexPath, platform) {
17 | // add the platform class to the body tag
18 | try {
19 | var platformClass = 'platform-' + platform;
20 | var cordovaClass = 'platform-cordova platform-webview';
21 |
22 | var html = fs.readFileSync(indexPath, 'utf8');
23 |
24 | var bodyTag = findBodyTag(html);
25 | if(!bodyTag) return; // no opening body tag, something's wrong
26 |
27 | if(bodyTag.indexOf(platformClass) > -1) return; // already added
28 |
29 | var newBodyTag = bodyTag;
30 |
31 | var classAttr = findClassAttr(bodyTag);
32 | if(classAttr) {
33 | // body tag has existing class attribute, add the classname
34 | var endingQuote = classAttr.substring(classAttr.length-1);
35 | var newClassAttr = classAttr.substring(0, classAttr.length-1);
36 | newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
37 | newBodyTag = bodyTag.replace(classAttr, newClassAttr);
38 |
39 | } else {
40 | // add class attribute to the body tag
41 | newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
42 | }
43 |
44 | html = html.replace(bodyTag, newBodyTag);
45 |
46 | fs.writeFileSync(indexPath, html, 'utf8');
47 |
48 | process.stdout.write('add to body class: ' + platformClass + '\n');
49 | } catch(e) {
50 | process.stdout.write(e);
51 | }
52 | }
53 |
54 | function findBodyTag(html) {
55 | // get the body tag
56 | try{
57 | return html.match(/])(.*?)>/gi)[0];
58 | }catch(e){}
59 | }
60 |
61 | function findClassAttr(bodyTag) {
62 | // get the body tag's class attribute
63 | try{
64 | return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
65 | }catch(e){}
66 | }
67 |
68 | if (rootdir) {
69 |
70 | // go through each of the platform directories that have been prepared
71 | var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
72 |
73 | for(var x=0; x
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/typings/browser/ambient/es6-shim/es6-shim.d.ts:
--------------------------------------------------------------------------------
1 | // Compiled using typings@0.6.8
2 | // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/4de74cb527395c13ba20b438c3a7a419ad931f1c/es6-shim/es6-shim.d.ts
3 | // Type definitions for es6-shim v0.31.2
4 | // Project: https://github.com/paulmillr/es6-shim
5 | // Definitions by: Ron Buckton
6 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
7 |
8 | declare type PropertyKey = string | number | symbol;
9 |
10 | interface IteratorResult {
11 | done: boolean;
12 | value?: T;
13 | }
14 |
15 | interface IterableShim {
16 | /**
17 | * Shim for an ES6 iterable. Not intended for direct use by user code.
18 | */
19 | "_es6-shim iterator_"(): Iterator;
20 | }
21 |
22 | interface Iterator {
23 | next(value?: any): IteratorResult;
24 | return?(value?: any): IteratorResult;
25 | throw?(e?: any): IteratorResult;
26 | }
27 |
28 | interface IterableIteratorShim extends IterableShim, Iterator {
29 | /**
30 | * Shim for an ES6 iterable iterator. Not intended for direct use by user code.
31 | */
32 | "_es6-shim iterator_"(): IterableIteratorShim;
33 | }
34 |
35 | interface StringConstructor {
36 | /**
37 | * Return the String value whose elements are, in order, the elements in the List elements.
38 | * If length is 0, the empty string is returned.
39 | */
40 | fromCodePoint(...codePoints: number[]): string;
41 |
42 | /**
43 | * String.raw is intended for use as a tag function of a Tagged Template String. When called
44 | * as such the first argument will be a well formed template call site object and the rest
45 | * parameter will contain the substitution values.
46 | * @param template A well-formed template string call site representation.
47 | * @param substitutions A set of substitution values.
48 | */
49 | raw(template: TemplateStringsArray, ...substitutions: any[]): string;
50 | }
51 |
52 | interface String {
53 | /**
54 | * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
55 | * value of the UTF-16 encoded code point starting at the string element at position pos in
56 | * the String resulting from converting this object to a String.
57 | * If there is no element at that position, the result is undefined.
58 | * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
59 | */
60 | codePointAt(pos: number): number;
61 |
62 | /**
63 | * Returns true if searchString appears as a substring of the result of converting this
64 | * object to a String, at one or more positions that are
65 | * greater than or equal to position; otherwise, returns false.
66 | * @param searchString search string
67 | * @param position If position is undefined, 0 is assumed, so as to search all of the String.
68 | */
69 | includes(searchString: string, position?: number): boolean;
70 |
71 | /**
72 | * Returns true if the sequence of elements of searchString converted to a String is the
73 | * same as the corresponding elements of this object (converted to a String) starting at
74 | * endPosition – length(this). Otherwise returns false.
75 | */
76 | endsWith(searchString: string, endPosition?: number): boolean;
77 |
78 | /**
79 | * Returns a String value that is made from count copies appended together. If count is 0,
80 | * T is the empty String is returned.
81 | * @param count number of copies to append
82 | */
83 | repeat(count: number): string;
84 |
85 | /**
86 | * Returns true if the sequence of elements of searchString converted to a String is the
87 | * same as the corresponding elements of this object (converted to a String) starting at
88 | * position. Otherwise returns false.
89 | */
90 | startsWith(searchString: string, position?: number): boolean;
91 |
92 | /**
93 | * Returns an HTML anchor element and sets the name attribute to the text value
94 | * @param name
95 | */
96 | anchor(name: string): string;
97 |
98 | /** Returns a HTML element */
99 | big(): string;
100 |
101 | /** Returns a