├── .gitignore ├── Advanced ├── Generics.ts ├── class.ts └── tuple_ts.ts ├── Basic ├── declare.ts ├── interface.ts ├── new.ts └── overloads.ts ├── README.md ├── package-lock.json ├── package.json ├── src ├── Todo.ts ├── index.css ├── index.html ├── index.ts └── lib │ ├── Todo.js │ └── index.js └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | ./build 2 | /node_modules -------------------------------------------------------------------------------- /Advanced/Generics.ts: -------------------------------------------------------------------------------- 1 | // 泛型~ 可以简单理解为 参数是type的函数,以type作为一个变量贯穿定义,使用时变成实际类型 2 | function createArray(length: number, value: T): T[] { 3 | let result: T[] = []; 4 | for (let i = 0; i < length; i++) { 5 | result[i] = value; 6 | } 7 | return result; 8 | } 9 | 10 | // 保证用这个函数的时候就知道传入和返回的值的类型 11 | createArray(4, 'x'); 12 | createArray(4, 5); 13 | 14 | // 使用多个泛型完成逻辑 15 | function swap(tuple: [T, U]): [U, T] { 16 | return [tuple[1], tuple[0]]; 17 | } 18 | 19 | swap([7, 'seven']); 20 | 21 | // 那有一种情况,我们还得对泛型的属性和方法进行操作,编译报错怎么办 22 | // 解决方法,定义接口,从而提前约定需要的属性和方法,而后用extends关键字来约束泛型 23 | 24 | interface TypeWise { 25 | length: number; 26 | foo(bar: string): void; 27 | } 28 | 29 | function tempIdentity(arg: T): T { 30 | console.log(arg.length); 31 | arg.foo('hi'); 32 | return arg 33 | } -------------------------------------------------------------------------------- /Advanced/class.ts: -------------------------------------------------------------------------------- 1 | class Animal { 2 | private name; 3 | public constructor(name: string) { 4 | this.name = name; 5 | } 6 | } 7 | let abc: Animal 8 | abc = new Animal('jack'); 9 | // console.log(abc.name); 10 | // abc.name = 'Tom'; 11 | 12 | // ts中类的三个关键字:public private protected 13 | 14 | class Animal2 { 15 | protected name; 16 | public constructor(name) { 17 | this.name = name; 18 | } 19 | } 20 | 21 | class Cat extends Animal2 { 22 | constructor(name) { 23 | super(name); 24 | console.log(this.name) 25 | } 26 | } 27 | 28 | // ts的抽象类关键字 abstract 29 | // 抽象类不允许实例化,只定义方法名和变量名 但不会具体赋值 30 | 31 | abstract class Person { 32 | public names: string; 33 | public constructor(names: string) { 34 | this.names = names; 35 | } 36 | public abstract sayHi(); 37 | } 38 | 39 | class Karl extends Person { 40 | public eat(): void { 41 | console.log(`${this.names} is eating.`) 42 | } 43 | public sayHi():string { 44 | return `I am ${this.names}, Hi` 45 | } 46 | } 47 | 48 | // 接口类型,用于定义类/函数/接口 可以继承 49 | // ts改动最好的部分就是类与接口 以及泛型相关 要多看一下 50 | 51 | // 一般情况下一个类只能继承自另外一个类,不同类之间可能有些共同特性,从而把特性提取成接口,用implements关键字来实现 52 | 53 | interface Alarm { 54 | alert(); 55 | } 56 | 57 | class Door { 58 | 59 | } 60 | 61 | class SecurityDoor extends Door implements Alarm { 62 | alert(): void { 63 | console.log('SecurityDoor alert') 64 | } 65 | } 66 | 67 | interface Light { 68 | lightOn: (x?, y?) => void; 69 | lightOff: () => void; 70 | } 71 | 72 | class Car implements Alarm, Light { 73 | alert() { 74 | console.log('car alert') 75 | } 76 | lightOn() { 77 | console.log('open car light') 78 | } 79 | lightOff() { 80 | console.log('turn car light off') 81 | } 82 | } 83 | 84 | interface LightableAlarm extends Alarm, Light { //接口可以继承其他多个接口 85 | x: number 86 | } 87 | 88 | class plane implements LightableAlarm { 89 | x=1; 90 | alert() { 91 | console.log('plane alert') 92 | } 93 | lightOn() { 94 | console.log('open plane light') 95 | } 96 | lightOff() { 97 | console.log('turn plane light off') 98 | } 99 | } 100 | 101 | // 接口高级用法,用于定义一个函数需要的形状(也即指定函数这个对象需要挂载的某些变量和方法) 大招 102 | // 函数本质也是对象 表现得淋漓尽致 103 | 104 | interface Counter { // 注意这三种写法 105 | (start: number): string; //这种写法表征这个满足这个接口的变量本身得是一个函数 括号里面是参数,返回是字符串 106 | interval: number; // 这个函数变量自身要挂载interval这个变量 107 | reset(): void; // 这个函数变量自身要挂载reset这个方法 108 | } 109 | 110 | function getCounter(time: number): Counter { 111 | let counter = function (start: number) {}; 112 | counter.interval = time; 113 | counter.reset = function() {}; 114 | return counter; 115 | } 116 | 117 | let c:Counter = getCounter(9); 118 | c(10) 119 | c.reset() 120 | console.log(c.interval) -------------------------------------------------------------------------------- /Advanced/tuple_ts.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ts中的元组与ES6的元组有区别 3 | * 数组用于合并相同类型的对象,元组用于合并不同类型的对象 4 | */ 5 | 6 | let xcatliu: [string, number] = ['Xcat Liu', 25]; 7 | 8 | // 赋值或访问已知索引的元素,会得到正确的类型 9 | xcatliu[0].slice(1) 10 | xcatliu[1].toFixed(2) 11 | 12 | // 直接赋值,必须提供元组中全部指定的项 13 | // 当越界时,超出的元素被限制为此元组包含的所有类型的联合类型 string | number 14 | // 而联合类型要记住,只能对它使用包含类型的公共的方法 -------------------------------------------------------------------------------- /Basic/declare.ts: -------------------------------------------------------------------------------- 1 | // 声明语句 2 | /** 3 | * 当引用外部第三方库时,由于没有定义类型,ts编译时会报错,为此引入declare关键字 4 | * 现在成熟的第三方库为了兼容ts, 都衍生除了.d.ts为后缀的声明文件,推荐使用@types来管理 5 | */ 6 | 7 | declare var $: (string) => any; //declare关键字定义的语句 编译结果中会删除 8 | $('#foo') 9 | 10 | // npm install @types/jquery --save-dev 11 | 12 | // 字符串字面量类型 13 | type EventNames = 'click' | 'scroll' | 'mousemove'; // 某一变量只能是这三者之一 14 | function handleEvent(ele: Element, event: EventNames) { 15 | // do something 16 | } 17 | 18 | handleEvent(document.getElementById('hello'), 'scroll') 19 | handleEvent(document.getElementById('world'), 'click') 20 | 21 | // alias and string type are all use type to singature -------------------------------------------------------------------------------- /Basic/interface.ts: -------------------------------------------------------------------------------- 1 | interface Person1 { 2 | name?: string; 3 | age?: number; // 可选属性 4 | [propName: string]: any; //任意属性 5 | } 6 | // 若定义了任意属性,确定属性和可选属性都得是它的子属性(任意属性的类型往往是any) 7 | let tom: Person1 = { 8 | name: 'Tom', 9 | gender: 'male' 10 | } 11 | 12 | // 数组的类型 13 | let fibonacci: number[] = [1, 1, 2, 3, 5]; 14 | 15 | let fibonacci_temp: Array = [1, 0, 2, 3]; 16 | 17 | // 类数组不是数组 18 | // IArguments(函数参数) NodeList HTMLCollection 这些都是内置的接口类 19 | 20 | function sum() { 21 | let args: IArguments = arguments 22 | } 23 | 24 | interface Cube { 25 | kind: 'cube'; // 接口类型的标识字段 26 | size: number; 27 | } 28 | 29 | interface Cuboid { 30 | kind: 'cuboid'; // 接口类型的标识字段 31 | width: number; 32 | depth: number; 33 | height: number; 34 | } 35 | 36 | type Prism = Cube | Cuboid; 37 | 38 | function assertNever(arg: never): never { 39 | throw new Error("Possible new tagged type: " + arg); 40 | } 41 | 42 | function volume(prism: Prism): number { 43 | switch(prism.kind) { 44 | case 'cube': 45 | return prism.size * prism.size * prism.size; 46 | case 'cuboid': 47 | return prism.width * prism.depth * prism.height; 48 | default: 49 | assertNever(prism); 50 | break; 51 | } 52 | } 53 | // 枚举类型 查看生成的代码可以发现 这个枚举是双线赋值 即 Size.S = 1 && Size[1] = 'S' 54 | enum Size { 55 | S, 56 | M, 57 | L, 58 | XL 59 | } 60 | 61 | var size = Size.S; 62 | ++size; 63 | console.log(Size[size]) 64 | 65 | size = Size.XL; 66 | --size; 67 | console.log(Size[size]) 68 | 69 | size = Size.XL; 70 | ++size; 71 | console.log(Size[size]) 72 | 73 | let mySum: (x: number, y: number) => number = function(x: number, y:number): number { 74 | return x + y; 75 | } 76 | 77 | interface SearchFunc { 78 | (source: string, subString: string): boolean; 79 | } 80 | 81 | let mySearch: SearchFunc; 82 | mySearch = function(source: string, subString: string) { 83 | return source.search(subString) !== -1; 84 | } 85 | 86 | function push(array: any[], ...items: any[]) { 87 | items.forEach(function(item) { 88 | array.push(item); 89 | }); 90 | } 91 | 92 | let a = []; 93 | push(a, 1, 2, 3); -------------------------------------------------------------------------------- /Basic/new.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Variables 3 | */ 4 | 5 | let globalScope: number = 1; 6 | { 7 | let blockScope: string = '123'; 8 | 9 | globalScope = 100; 10 | 11 | } 12 | 13 | const name1: string = 'Steve'; 14 | const heightInCentimeters: number = 182.33; 15 | const isActive: boolean = true; 16 | 17 | const names: string[] = ['James', 'Nick', 'Rebecca', 'Lily']; 18 | let sayHello: (name: string) => string; 19 | sayHello = function(name) { 20 | return 'Hello ' + name 21 | }; 22 | 23 | let person: { name: string; heightInCentimeters: number;}; 24 | person = { 25 | name: 'Mark', 26 | heightInCentimeters: 188 27 | } 28 | 29 | /** 30 | * Although many languates specify the type before the identifier, the placement of type annotations in TypeScript after the identifier helps 31 | * to reinforce that the type annotation is optional. It also allows you to use the full range of variable statements, including const and let 32 | * This style of type annotation is also inspired by type theory 33 | */ 34 | 35 | /** 36 | * If a type annotation becomes too complex , use interface or type aliases 37 | * an interface can do that a type alias cannot do 38 | */ 39 | 40 | interface PersonInterface { 41 | name: string; 42 | heightInCentimeters: number; 43 | } 44 | 45 | const sherlock: PersonInterface = { 46 | name: 'Bendict', 47 | heightInCentimeters: 183 48 | } 49 | 50 | // Type Alias 51 | 52 | type PersonType = { 53 | name: string; 54 | heightIncentimeters: number; 55 | }; 56 | 57 | const john: PersonType = { 58 | name: 'Martin', 59 | heightIncentimeters: 169 60 | } 61 | 62 | enum VehicleType { 63 | john, //0 64 | Lorry //1 65 | } 66 | 67 | let union: boolean | number; 68 | union = 5; 69 | union = true; 70 | // union = 'string' 71 | type StringOrError = string | Error; 72 | type SeriesOfTypes = string | number | boolean | Error; 73 | // A union can be created using any types available in your program, not just primitive types 74 | 75 | // String literal type 76 | type Kingdom = 'Bacteria' | 'Protozoa' | 'Chromista' | 'Plantae' | 'Fungi' | 'Animalia'; 77 | let kingdom: Kingdom; 78 | 79 | kingdom = 'Bacteria'; 80 | 81 | // kingdom = 'Protista'; 82 | 83 | type Randoms = 'Text' | 10 | false; 84 | 85 | let random: Randoms; 86 | 87 | random = 'Text'; 88 | random = 10; 89 | random = false; 90 | 91 | interface Skier { 92 | slide(): void; 93 | } 94 | 95 | interface Shooter { 96 | shoot(): void; 97 | } 98 | 99 | type Biathelete = Skier & Shooter; // Intersection Types 100 | 101 | // Typed arrays 102 | 103 | interface Monument { 104 | name: string; 105 | heightInMeters: number; 106 | } 107 | 108 | const monuments: Monument[] = []; 109 | 110 | monuments.push({ 111 | name: 'Statue of Liberty', 112 | heightInMeters: 46 113 | }) 114 | 115 | monuments.push({ 116 | name: 'Peter the Great', 117 | heightInMeters: 96 118 | }); 119 | 120 | monuments.push({ 121 | name: 'Angel of the North', 122 | heightInMeters: 20 123 | }); 124 | 125 | function compareMonumentHeights(a: Monument, b: Monument) { 126 | return b.heightInMeters - a.heightInMeters 127 | } 128 | 129 | const monumentsOrderedByHeight = monuments.sort(compareMonumentHeights); 130 | const tallestMonument = monumentsOrderedByHeight[0]; 131 | 132 | console.log(tallestMonument.name) 133 | 134 | // Tuple Types 元组与ES6的小括号不同,是用数组的中括号表示的 135 | 136 | let poem: [number, boolean, string]; 137 | 138 | poem = [1, true, 'love'] 139 | 140 | interface Cephalopod { 141 | hasInk: boolean; 142 | arms: number; 143 | tentacles: number; 144 | } 145 | 146 | interface CephalopodDictionary { 147 | [index: string]: Cephalopod; 148 | } 149 | 150 | let dictionary: CephalopodDictionary = {}; 151 | dictionary['octopus'] = {hasInk: true, arms: 8, tentacles: 0}; 152 | dictionary['loligo'] = {hasInk: true, arms: 8, tentacles: 2}; 153 | 154 | // dictionary[0] = {hasInk: true} 155 | const octopus = dictionary['octopus'] 156 | 157 | console.log(octopus.tentacles) 158 | delete dictionary['octopus'] 159 | 160 | interface Options { 161 | material: string; 162 | backlight: boolean; 163 | } 164 | 165 | // Mapped types 166 | type ReadOnly = {readonly [k in keyof T]: T[k];} 167 | type Optional = {[k in keyof T]?: T[k];} 168 | type Nullable = {[k in keyof T]: T[k] | null} 169 | 170 | type ReadonlyOptions = Readonly; 171 | type OptionalOptions = Optional; 172 | type NullableOptions = Nullable; 173 | 174 | function alertName(): void { 175 | alert('My name is Karl') 176 | } 177 | 178 | let u: undefined = undefined 179 | let n: null = null 180 | 181 | // 在ts种 null和undefined是所有类型的子类型 182 | // any表示任意值,声明某变量为任意值后,任何操作返回的内容类型都是any 183 | 184 | // 接口的实质就是对象的类型 -------------------------------------------------------------------------------- /Basic/overloads.ts: -------------------------------------------------------------------------------- 1 | // 函数重载,允许一个函数接受不同数量或类型的参数时,作出不同处理 2 | 3 | /** 4 | * 输入数字123 返回翻转的数字321 5 | * 输入字符串'hello' 返回翻转的字符串'olleh' 6 | * 利用typeScript的函数重载功能实现 7 | */ 8 | 9 | function reverse(x: string): string; 10 | function reverse(x: number): number; 11 | function reverse(x: number | string): number | string { 12 | if (typeof x === 'number') { 13 | return Number(x.toString().split('').reverse().join('')); 14 | } else if (typeof x === 'string') { 15 | return x.split('').reverse().join(''); 16 | } 17 | } 18 | 19 | // 上面的类型判断也可以用断言实现 20 | function getLength(something: string | number): number { 21 | if ((something).length) { 22 | return (something).length; 23 | } else { 24 | return something.toString().length; 25 | } 26 | } 27 | // 即为多次定义函数reverse,最后一次是函数实现。 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TypeScript学习 2 | 3 | > 参考的`gitbook` 4 | 5 | - [官方手册](https://legacy.gitbook.com/book/zhongsp/typescript-handbook/details) 6 | - [TypeScript 入门教程](https://legacy.gitbook.com/book/xcatliu/typescript-tutorial/details) 7 | 8 | 其实TS用的很多东西跟ES6是高度重合的,包括箭头函数/解构赋值/模块/类的部分特性 9 | 不重合的是类型声明 接口的灵活实现 还有一些补充的 关键字/抽象类/函数重载/泛型 10 | 11 | 写了一些语法`demo`,供大家研究 12 | 13 | 1. 如果你是一名在行人员 强烈建议阅读英语,以获取第一手资料 14 | 2. 目前本仓库没增加编译工具,仅是研究了一下`TS`的语法 15 | 3. 欢迎加我微信交流(微信名:`kashao3824`) 16 | 17 | 学习todo的写法 18 | 19 | - 使用browser-sync来托管静态服务器 (`npm run serve`看效果) 20 | - 添加了中划线样式 21 | - 添加了全部完成功能 22 | - 添加了删除功能 -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn_ts", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "accepts": { 8 | "version": "1.3.5", 9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", 10 | "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", 11 | "dev": true, 12 | "requires": { 13 | "mime-types": "2.1.18", 14 | "negotiator": "0.6.1" 15 | } 16 | }, 17 | "after": { 18 | "version": "0.8.2", 19 | "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", 20 | "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", 21 | "dev": true 22 | }, 23 | "ansi-regex": { 24 | "version": "2.1.1", 25 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 26 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 27 | "dev": true 28 | }, 29 | "ansi-styles": { 30 | "version": "2.2.1", 31 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 32 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", 33 | "dev": true 34 | }, 35 | "anymatch": { 36 | "version": "1.3.2", 37 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", 38 | "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", 39 | "dev": true, 40 | "requires": { 41 | "micromatch": "2.3.11", 42 | "normalize-path": "2.1.1" 43 | } 44 | }, 45 | "arr-diff": { 46 | "version": "2.0.0", 47 | "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", 48 | "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", 49 | "dev": true, 50 | "requires": { 51 | "arr-flatten": "1.1.0" 52 | } 53 | }, 54 | "arr-flatten": { 55 | "version": "1.1.0", 56 | "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", 57 | "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", 58 | "dev": true 59 | }, 60 | "array-unique": { 61 | "version": "0.2.1", 62 | "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", 63 | "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", 64 | "dev": true 65 | }, 66 | "arraybuffer.slice": { 67 | "version": "0.0.7", 68 | "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", 69 | "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", 70 | "dev": true 71 | }, 72 | "async": { 73 | "version": "1.5.2", 74 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 75 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", 76 | "dev": true 77 | }, 78 | "async-each": { 79 | "version": "1.0.1", 80 | "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", 81 | "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", 82 | "dev": true 83 | }, 84 | "async-each-series": { 85 | "version": "0.1.1", 86 | "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", 87 | "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", 88 | "dev": true 89 | }, 90 | "async-limiter": { 91 | "version": "1.0.0", 92 | "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", 93 | "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", 94 | "dev": true 95 | }, 96 | "axios": { 97 | "version": "0.17.1", 98 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", 99 | "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", 100 | "dev": true, 101 | "requires": { 102 | "follow-redirects": "1.5.0", 103 | "is-buffer": "1.1.6" 104 | } 105 | }, 106 | "backo2": { 107 | "version": "1.0.2", 108 | "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", 109 | "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", 110 | "dev": true 111 | }, 112 | "balanced-match": { 113 | "version": "1.0.0", 114 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 115 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 116 | "dev": true 117 | }, 118 | "base64-arraybuffer": { 119 | "version": "0.1.5", 120 | "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", 121 | "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", 122 | "dev": true 123 | }, 124 | "base64id": { 125 | "version": "1.0.0", 126 | "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", 127 | "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", 128 | "dev": true 129 | }, 130 | "batch": { 131 | "version": "0.5.3", 132 | "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz", 133 | "integrity": "sha1-PzQU84AyF0O/wQQvmoP/HVgk1GQ=", 134 | "dev": true 135 | }, 136 | "better-assert": { 137 | "version": "1.0.2", 138 | "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", 139 | "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", 140 | "dev": true, 141 | "requires": { 142 | "callsite": "1.0.0" 143 | } 144 | }, 145 | "binary-extensions": { 146 | "version": "1.11.0", 147 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", 148 | "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", 149 | "dev": true 150 | }, 151 | "blob": { 152 | "version": "0.0.4", 153 | "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", 154 | "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", 155 | "dev": true 156 | }, 157 | "brace-expansion": { 158 | "version": "1.1.11", 159 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 160 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 161 | "dev": true, 162 | "requires": { 163 | "balanced-match": "1.0.0", 164 | "concat-map": "0.0.1" 165 | } 166 | }, 167 | "braces": { 168 | "version": "1.8.5", 169 | "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", 170 | "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", 171 | "dev": true, 172 | "requires": { 173 | "expand-range": "1.8.2", 174 | "preserve": "0.2.0", 175 | "repeat-element": "1.1.2" 176 | } 177 | }, 178 | "browser-sync": { 179 | "version": "2.24.4", 180 | "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.24.4.tgz", 181 | "integrity": "sha512-qfXv8vQA/Dctub2v44v/vPuvfC4XNd6bn+W5vWZVuhuy6w91lPsdY6qhalT2s2PjnJ3FR6kWq5wkTQgN26eKzA==", 182 | "dev": true, 183 | "requires": { 184 | "browser-sync-ui": "1.0.1", 185 | "bs-recipes": "1.3.4", 186 | "chokidar": "1.7.0", 187 | "connect": "3.5.0", 188 | "connect-history-api-fallback": "1.5.0", 189 | "dev-ip": "1.0.1", 190 | "easy-extender": "2.3.2", 191 | "eazy-logger": "3.0.2", 192 | "etag": "1.8.1", 193 | "fresh": "0.5.2", 194 | "fs-extra": "3.0.1", 195 | "http-proxy": "1.15.2", 196 | "immutable": "3.8.2", 197 | "localtunnel": "1.9.0", 198 | "micromatch": "2.3.11", 199 | "opn": "4.0.2", 200 | "portscanner": "2.1.1", 201 | "qs": "6.2.3", 202 | "raw-body": "2.3.3", 203 | "resp-modifier": "6.0.2", 204 | "rx": "4.1.0", 205 | "serve-index": "1.8.0", 206 | "serve-static": "1.13.2", 207 | "server-destroy": "1.0.1", 208 | "socket.io": "2.0.4", 209 | "ua-parser-js": "0.7.17", 210 | "yargs": "6.4.0" 211 | } 212 | }, 213 | "browser-sync-ui": { 214 | "version": "1.0.1", 215 | "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-1.0.1.tgz", 216 | "integrity": "sha512-RIxmwVVcUFhRd1zxp7m2FfLnXHf59x4Gtj8HFwTA//3VgYI3AKkaQAuDL8KDJnE59XqCshxZa13JYuIWtZlKQg==", 217 | "dev": true, 218 | "requires": { 219 | "async-each-series": "0.1.1", 220 | "connect-history-api-fallback": "1.5.0", 221 | "immutable": "3.8.2", 222 | "server-destroy": "1.0.1", 223 | "socket.io-client": "2.0.4", 224 | "stream-throttle": "0.1.3" 225 | } 226 | }, 227 | "bs-recipes": { 228 | "version": "1.3.4", 229 | "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", 230 | "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", 231 | "dev": true 232 | }, 233 | "builtin-modules": { 234 | "version": "1.1.1", 235 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 236 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", 237 | "dev": true 238 | }, 239 | "bytes": { 240 | "version": "3.0.0", 241 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", 242 | "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", 243 | "dev": true 244 | }, 245 | "callsite": { 246 | "version": "1.0.0", 247 | "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", 248 | "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", 249 | "dev": true 250 | }, 251 | "camelcase": { 252 | "version": "3.0.0", 253 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", 254 | "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", 255 | "dev": true 256 | }, 257 | "chalk": { 258 | "version": "1.1.3", 259 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 260 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", 261 | "dev": true, 262 | "requires": { 263 | "ansi-styles": "2.2.1", 264 | "escape-string-regexp": "1.0.5", 265 | "has-ansi": "2.0.0", 266 | "strip-ansi": "3.0.1", 267 | "supports-color": "2.0.0" 268 | } 269 | }, 270 | "chokidar": { 271 | "version": "1.7.0", 272 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", 273 | "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", 274 | "dev": true, 275 | "requires": { 276 | "anymatch": "1.3.2", 277 | "async-each": "1.0.1", 278 | "glob-parent": "2.0.0", 279 | "inherits": "2.0.3", 280 | "is-binary-path": "1.0.1", 281 | "is-glob": "2.0.1", 282 | "path-is-absolute": "1.0.1", 283 | "readdirp": "2.1.0" 284 | } 285 | }, 286 | "cliui": { 287 | "version": "3.2.0", 288 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", 289 | "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", 290 | "dev": true, 291 | "requires": { 292 | "string-width": "1.0.2", 293 | "strip-ansi": "3.0.1", 294 | "wrap-ansi": "2.1.0" 295 | } 296 | }, 297 | "code-point-at": { 298 | "version": "1.1.0", 299 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 300 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", 301 | "dev": true 302 | }, 303 | "commander": { 304 | "version": "2.15.1", 305 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", 306 | "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", 307 | "dev": true 308 | }, 309 | "component-bind": { 310 | "version": "1.0.0", 311 | "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", 312 | "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", 313 | "dev": true 314 | }, 315 | "component-emitter": { 316 | "version": "1.2.1", 317 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", 318 | "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", 319 | "dev": true 320 | }, 321 | "component-inherit": { 322 | "version": "0.0.3", 323 | "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", 324 | "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", 325 | "dev": true 326 | }, 327 | "concat-map": { 328 | "version": "0.0.1", 329 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 330 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 331 | "dev": true 332 | }, 333 | "connect": { 334 | "version": "3.5.0", 335 | "resolved": "https://registry.npmjs.org/connect/-/connect-3.5.0.tgz", 336 | "integrity": "sha1-s1dSWgtMH1BZnNmD4dnv7qlncZg=", 337 | "dev": true, 338 | "requires": { 339 | "debug": "2.2.0", 340 | "finalhandler": "0.5.0", 341 | "parseurl": "1.3.2", 342 | "utils-merge": "1.0.0" 343 | }, 344 | "dependencies": { 345 | "debug": { 346 | "version": "2.2.0", 347 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", 348 | "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", 349 | "dev": true, 350 | "requires": { 351 | "ms": "0.7.1" 352 | } 353 | }, 354 | "ms": { 355 | "version": "0.7.1", 356 | "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", 357 | "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", 358 | "dev": true 359 | } 360 | } 361 | }, 362 | "connect-history-api-fallback": { 363 | "version": "1.5.0", 364 | "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", 365 | "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", 366 | "dev": true 367 | }, 368 | "cookie": { 369 | "version": "0.3.1", 370 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", 371 | "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", 372 | "dev": true 373 | }, 374 | "core-util-is": { 375 | "version": "1.0.2", 376 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 377 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", 378 | "dev": true 379 | }, 380 | "debug": { 381 | "version": "2.6.9", 382 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 383 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 384 | "dev": true, 385 | "requires": { 386 | "ms": "2.0.0" 387 | } 388 | }, 389 | "decamelize": { 390 | "version": "1.2.0", 391 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 392 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 393 | "dev": true 394 | }, 395 | "depd": { 396 | "version": "1.1.2", 397 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 398 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", 399 | "dev": true 400 | }, 401 | "destroy": { 402 | "version": "1.0.4", 403 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 404 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", 405 | "dev": true 406 | }, 407 | "dev-ip": { 408 | "version": "1.0.1", 409 | "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", 410 | "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=", 411 | "dev": true 412 | }, 413 | "easy-extender": { 414 | "version": "2.3.2", 415 | "resolved": "https://registry.npmjs.org/easy-extender/-/easy-extender-2.3.2.tgz", 416 | "integrity": "sha1-PTJI/r4rFZYHMW2PnPSRwWZIIh0=", 417 | "dev": true, 418 | "requires": { 419 | "lodash": "3.10.1" 420 | } 421 | }, 422 | "eazy-logger": { 423 | "version": "3.0.2", 424 | "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.0.2.tgz", 425 | "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", 426 | "dev": true, 427 | "requires": { 428 | "tfunk": "3.1.0" 429 | } 430 | }, 431 | "ee-first": { 432 | "version": "1.1.1", 433 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 434 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", 435 | "dev": true 436 | }, 437 | "encodeurl": { 438 | "version": "1.0.2", 439 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 440 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", 441 | "dev": true 442 | }, 443 | "engine.io": { 444 | "version": "3.1.5", 445 | "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", 446 | "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", 447 | "dev": true, 448 | "requires": { 449 | "accepts": "1.3.5", 450 | "base64id": "1.0.0", 451 | "cookie": "0.3.1", 452 | "debug": "3.1.0", 453 | "engine.io-parser": "2.1.2", 454 | "uws": "9.14.0", 455 | "ws": "3.3.3" 456 | }, 457 | "dependencies": { 458 | "debug": { 459 | "version": "3.1.0", 460 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 461 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 462 | "dev": true, 463 | "requires": { 464 | "ms": "2.0.0" 465 | } 466 | } 467 | } 468 | }, 469 | "engine.io-client": { 470 | "version": "3.1.6", 471 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", 472 | "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", 473 | "dev": true, 474 | "requires": { 475 | "component-emitter": "1.2.1", 476 | "component-inherit": "0.0.3", 477 | "debug": "3.1.0", 478 | "engine.io-parser": "2.1.2", 479 | "has-cors": "1.1.0", 480 | "indexof": "0.0.1", 481 | "parseqs": "0.0.5", 482 | "parseuri": "0.0.5", 483 | "ws": "3.3.3", 484 | "xmlhttprequest-ssl": "1.5.5", 485 | "yeast": "0.1.2" 486 | }, 487 | "dependencies": { 488 | "debug": { 489 | "version": "3.1.0", 490 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 491 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 492 | "dev": true, 493 | "requires": { 494 | "ms": "2.0.0" 495 | } 496 | } 497 | } 498 | }, 499 | "engine.io-parser": { 500 | "version": "2.1.2", 501 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.2.tgz", 502 | "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", 503 | "dev": true, 504 | "requires": { 505 | "after": "0.8.2", 506 | "arraybuffer.slice": "0.0.7", 507 | "base64-arraybuffer": "0.1.5", 508 | "blob": "0.0.4", 509 | "has-binary2": "1.0.3" 510 | } 511 | }, 512 | "error-ex": { 513 | "version": "1.3.1", 514 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", 515 | "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", 516 | "dev": true, 517 | "requires": { 518 | "is-arrayish": "0.2.1" 519 | } 520 | }, 521 | "escape-html": { 522 | "version": "1.0.3", 523 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 524 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", 525 | "dev": true 526 | }, 527 | "escape-string-regexp": { 528 | "version": "1.0.5", 529 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 530 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 531 | "dev": true 532 | }, 533 | "etag": { 534 | "version": "1.8.1", 535 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 536 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", 537 | "dev": true 538 | }, 539 | "eventemitter3": { 540 | "version": "1.2.0", 541 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", 542 | "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", 543 | "dev": true 544 | }, 545 | "expand-brackets": { 546 | "version": "0.1.5", 547 | "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", 548 | "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", 549 | "dev": true, 550 | "requires": { 551 | "is-posix-bracket": "0.1.1" 552 | } 553 | }, 554 | "expand-range": { 555 | "version": "1.8.2", 556 | "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", 557 | "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", 558 | "dev": true, 559 | "requires": { 560 | "fill-range": "2.2.4" 561 | } 562 | }, 563 | "extglob": { 564 | "version": "0.3.2", 565 | "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", 566 | "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", 567 | "dev": true, 568 | "requires": { 569 | "is-extglob": "1.0.0" 570 | } 571 | }, 572 | "filename-regex": { 573 | "version": "2.0.1", 574 | "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", 575 | "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", 576 | "dev": true 577 | }, 578 | "fill-range": { 579 | "version": "2.2.4", 580 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", 581 | "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", 582 | "dev": true, 583 | "requires": { 584 | "is-number": "2.1.0", 585 | "isobject": "2.1.0", 586 | "randomatic": "3.0.0", 587 | "repeat-element": "1.1.2", 588 | "repeat-string": "1.6.1" 589 | } 590 | }, 591 | "finalhandler": { 592 | "version": "0.5.0", 593 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.0.tgz", 594 | "integrity": "sha1-6VCKvs6bbbqHGmlCodeRG5GRGsc=", 595 | "dev": true, 596 | "requires": { 597 | "debug": "2.2.0", 598 | "escape-html": "1.0.3", 599 | "on-finished": "2.3.0", 600 | "statuses": "1.3.1", 601 | "unpipe": "1.0.0" 602 | }, 603 | "dependencies": { 604 | "debug": { 605 | "version": "2.2.0", 606 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", 607 | "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", 608 | "dev": true, 609 | "requires": { 610 | "ms": "0.7.1" 611 | } 612 | }, 613 | "ms": { 614 | "version": "0.7.1", 615 | "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", 616 | "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", 617 | "dev": true 618 | } 619 | } 620 | }, 621 | "find-up": { 622 | "version": "1.1.2", 623 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", 624 | "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", 625 | "dev": true, 626 | "requires": { 627 | "path-exists": "2.1.0", 628 | "pinkie-promise": "2.0.1" 629 | } 630 | }, 631 | "follow-redirects": { 632 | "version": "1.5.0", 633 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", 634 | "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", 635 | "dev": true, 636 | "requires": { 637 | "debug": "3.1.0" 638 | }, 639 | "dependencies": { 640 | "debug": { 641 | "version": "3.1.0", 642 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 643 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 644 | "dev": true, 645 | "requires": { 646 | "ms": "2.0.0" 647 | } 648 | } 649 | } 650 | }, 651 | "for-in": { 652 | "version": "1.0.2", 653 | "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", 654 | "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", 655 | "dev": true 656 | }, 657 | "for-own": { 658 | "version": "0.1.5", 659 | "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", 660 | "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", 661 | "dev": true, 662 | "requires": { 663 | "for-in": "1.0.2" 664 | } 665 | }, 666 | "fresh": { 667 | "version": "0.5.2", 668 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 669 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", 670 | "dev": true 671 | }, 672 | "fs-extra": { 673 | "version": "3.0.1", 674 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", 675 | "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", 676 | "dev": true, 677 | "requires": { 678 | "graceful-fs": "4.1.11", 679 | "jsonfile": "3.0.1", 680 | "universalify": "0.1.1" 681 | } 682 | }, 683 | "get-caller-file": { 684 | "version": "1.0.2", 685 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", 686 | "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", 687 | "dev": true 688 | }, 689 | "glob-base": { 690 | "version": "0.3.0", 691 | "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", 692 | "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", 693 | "dev": true, 694 | "requires": { 695 | "glob-parent": "2.0.0", 696 | "is-glob": "2.0.1" 697 | } 698 | }, 699 | "glob-parent": { 700 | "version": "2.0.0", 701 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", 702 | "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", 703 | "dev": true, 704 | "requires": { 705 | "is-glob": "2.0.1" 706 | } 707 | }, 708 | "graceful-fs": { 709 | "version": "4.1.11", 710 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", 711 | "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", 712 | "dev": true 713 | }, 714 | "has-ansi": { 715 | "version": "2.0.0", 716 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 717 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", 718 | "dev": true, 719 | "requires": { 720 | "ansi-regex": "2.1.1" 721 | } 722 | }, 723 | "has-binary2": { 724 | "version": "1.0.3", 725 | "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", 726 | "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", 727 | "dev": true, 728 | "requires": { 729 | "isarray": "2.0.1" 730 | } 731 | }, 732 | "has-cors": { 733 | "version": "1.1.0", 734 | "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", 735 | "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", 736 | "dev": true 737 | }, 738 | "hosted-git-info": { 739 | "version": "2.6.0", 740 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", 741 | "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", 742 | "dev": true 743 | }, 744 | "http-errors": { 745 | "version": "1.6.3", 746 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", 747 | "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", 748 | "dev": true, 749 | "requires": { 750 | "depd": "1.1.2", 751 | "inherits": "2.0.3", 752 | "setprototypeof": "1.1.0", 753 | "statuses": "1.5.0" 754 | }, 755 | "dependencies": { 756 | "statuses": { 757 | "version": "1.5.0", 758 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 759 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", 760 | "dev": true 761 | } 762 | } 763 | }, 764 | "http-proxy": { 765 | "version": "1.15.2", 766 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.2.tgz", 767 | "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", 768 | "dev": true, 769 | "requires": { 770 | "eventemitter3": "1.2.0", 771 | "requires-port": "1.0.0" 772 | } 773 | }, 774 | "iconv-lite": { 775 | "version": "0.4.23", 776 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", 777 | "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", 778 | "dev": true, 779 | "requires": { 780 | "safer-buffer": "2.1.2" 781 | } 782 | }, 783 | "immutable": { 784 | "version": "3.8.2", 785 | "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", 786 | "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", 787 | "dev": true 788 | }, 789 | "indexof": { 790 | "version": "0.0.1", 791 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", 792 | "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", 793 | "dev": true 794 | }, 795 | "inherits": { 796 | "version": "2.0.3", 797 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 798 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 799 | "dev": true 800 | }, 801 | "invert-kv": { 802 | "version": "1.0.0", 803 | "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", 804 | "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", 805 | "dev": true 806 | }, 807 | "is-arrayish": { 808 | "version": "0.2.1", 809 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", 810 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", 811 | "dev": true 812 | }, 813 | "is-binary-path": { 814 | "version": "1.0.1", 815 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", 816 | "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", 817 | "dev": true, 818 | "requires": { 819 | "binary-extensions": "1.11.0" 820 | } 821 | }, 822 | "is-buffer": { 823 | "version": "1.1.6", 824 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 825 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", 826 | "dev": true 827 | }, 828 | "is-builtin-module": { 829 | "version": "1.0.0", 830 | "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", 831 | "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", 832 | "dev": true, 833 | "requires": { 834 | "builtin-modules": "1.1.1" 835 | } 836 | }, 837 | "is-dotfile": { 838 | "version": "1.0.3", 839 | "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", 840 | "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", 841 | "dev": true 842 | }, 843 | "is-equal-shallow": { 844 | "version": "0.1.3", 845 | "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", 846 | "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", 847 | "dev": true, 848 | "requires": { 849 | "is-primitive": "2.0.0" 850 | } 851 | }, 852 | "is-extendable": { 853 | "version": "0.1.1", 854 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", 855 | "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", 856 | "dev": true 857 | }, 858 | "is-extglob": { 859 | "version": "1.0.0", 860 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", 861 | "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", 862 | "dev": true 863 | }, 864 | "is-fullwidth-code-point": { 865 | "version": "1.0.0", 866 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 867 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 868 | "dev": true, 869 | "requires": { 870 | "number-is-nan": "1.0.1" 871 | } 872 | }, 873 | "is-glob": { 874 | "version": "2.0.1", 875 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", 876 | "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", 877 | "dev": true, 878 | "requires": { 879 | "is-extglob": "1.0.0" 880 | } 881 | }, 882 | "is-number": { 883 | "version": "2.1.0", 884 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", 885 | "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", 886 | "dev": true, 887 | "requires": { 888 | "kind-of": "3.2.2" 889 | } 890 | }, 891 | "is-number-like": { 892 | "version": "1.0.8", 893 | "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz", 894 | "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", 895 | "dev": true, 896 | "requires": { 897 | "lodash.isfinite": "3.3.2" 898 | } 899 | }, 900 | "is-posix-bracket": { 901 | "version": "0.1.1", 902 | "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", 903 | "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", 904 | "dev": true 905 | }, 906 | "is-primitive": { 907 | "version": "2.0.0", 908 | "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", 909 | "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", 910 | "dev": true 911 | }, 912 | "is-utf8": { 913 | "version": "0.2.1", 914 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", 915 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", 916 | "dev": true 917 | }, 918 | "isarray": { 919 | "version": "2.0.1", 920 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", 921 | "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", 922 | "dev": true 923 | }, 924 | "isobject": { 925 | "version": "2.1.0", 926 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", 927 | "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", 928 | "dev": true, 929 | "requires": { 930 | "isarray": "1.0.0" 931 | }, 932 | "dependencies": { 933 | "isarray": { 934 | "version": "1.0.0", 935 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 936 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", 937 | "dev": true 938 | } 939 | } 940 | }, 941 | "jsonfile": { 942 | "version": "3.0.1", 943 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", 944 | "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", 945 | "dev": true, 946 | "requires": { 947 | "graceful-fs": "4.1.11" 948 | } 949 | }, 950 | "kind-of": { 951 | "version": "3.2.2", 952 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 953 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", 954 | "dev": true, 955 | "requires": { 956 | "is-buffer": "1.1.6" 957 | } 958 | }, 959 | "lcid": { 960 | "version": "1.0.0", 961 | "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", 962 | "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", 963 | "dev": true, 964 | "requires": { 965 | "invert-kv": "1.0.0" 966 | } 967 | }, 968 | "limiter": { 969 | "version": "1.1.3", 970 | "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.3.tgz", 971 | "integrity": "sha512-zrycnIMsLw/3ZxTbW7HCez56rcFGecWTx5OZNplzcXUUmJLmoYArC6qdJzmAN5BWiNXGcpjhF9RQ1HSv5zebEw==", 972 | "dev": true 973 | }, 974 | "load-json-file": { 975 | "version": "1.1.0", 976 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", 977 | "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", 978 | "dev": true, 979 | "requires": { 980 | "graceful-fs": "4.1.11", 981 | "parse-json": "2.2.0", 982 | "pify": "2.3.0", 983 | "pinkie-promise": "2.0.1", 984 | "strip-bom": "2.0.0" 985 | } 986 | }, 987 | "localtunnel": { 988 | "version": "1.9.0", 989 | "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.0.tgz", 990 | "integrity": "sha512-wCIiIHJ8kKIcWkTQE3m1VRABvsH2ZuOkiOpZUofUCf6Q42v3VIZ+Q0YfX1Z4sYDRj0muiKL1bLvz1FeoxsPO0w==", 991 | "dev": true, 992 | "requires": { 993 | "axios": "0.17.1", 994 | "debug": "2.6.8", 995 | "openurl": "1.1.1", 996 | "yargs": "6.6.0" 997 | }, 998 | "dependencies": { 999 | "debug": { 1000 | "version": "2.6.8", 1001 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", 1002 | "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", 1003 | "dev": true, 1004 | "requires": { 1005 | "ms": "2.0.0" 1006 | } 1007 | }, 1008 | "yargs": { 1009 | "version": "6.6.0", 1010 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", 1011 | "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", 1012 | "dev": true, 1013 | "requires": { 1014 | "camelcase": "3.0.0", 1015 | "cliui": "3.2.0", 1016 | "decamelize": "1.2.0", 1017 | "get-caller-file": "1.0.2", 1018 | "os-locale": "1.4.0", 1019 | "read-pkg-up": "1.0.1", 1020 | "require-directory": "2.1.1", 1021 | "require-main-filename": "1.0.1", 1022 | "set-blocking": "2.0.0", 1023 | "string-width": "1.0.2", 1024 | "which-module": "1.0.0", 1025 | "y18n": "3.2.1", 1026 | "yargs-parser": "4.2.1" 1027 | } 1028 | } 1029 | } 1030 | }, 1031 | "lodash": { 1032 | "version": "3.10.1", 1033 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", 1034 | "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", 1035 | "dev": true 1036 | }, 1037 | "lodash.isfinite": { 1038 | "version": "3.3.2", 1039 | "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", 1040 | "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", 1041 | "dev": true 1042 | }, 1043 | "math-random": { 1044 | "version": "1.0.1", 1045 | "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", 1046 | "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", 1047 | "dev": true 1048 | }, 1049 | "micromatch": { 1050 | "version": "2.3.11", 1051 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", 1052 | "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", 1053 | "dev": true, 1054 | "requires": { 1055 | "arr-diff": "2.0.0", 1056 | "array-unique": "0.2.1", 1057 | "braces": "1.8.5", 1058 | "expand-brackets": "0.1.5", 1059 | "extglob": "0.3.2", 1060 | "filename-regex": "2.0.1", 1061 | "is-extglob": "1.0.0", 1062 | "is-glob": "2.0.1", 1063 | "kind-of": "3.2.2", 1064 | "normalize-path": "2.1.1", 1065 | "object.omit": "2.0.1", 1066 | "parse-glob": "3.0.4", 1067 | "regex-cache": "0.4.4" 1068 | } 1069 | }, 1070 | "mime-db": { 1071 | "version": "1.33.0", 1072 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", 1073 | "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", 1074 | "dev": true 1075 | }, 1076 | "mime-types": { 1077 | "version": "2.1.18", 1078 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", 1079 | "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", 1080 | "dev": true, 1081 | "requires": { 1082 | "mime-db": "1.33.0" 1083 | } 1084 | }, 1085 | "minimatch": { 1086 | "version": "3.0.4", 1087 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1088 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1089 | "dev": true, 1090 | "requires": { 1091 | "brace-expansion": "1.1.11" 1092 | } 1093 | }, 1094 | "ms": { 1095 | "version": "2.0.0", 1096 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1097 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 1098 | "dev": true 1099 | }, 1100 | "negotiator": { 1101 | "version": "0.6.1", 1102 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", 1103 | "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", 1104 | "dev": true 1105 | }, 1106 | "normalize-package-data": { 1107 | "version": "2.4.0", 1108 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", 1109 | "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", 1110 | "dev": true, 1111 | "requires": { 1112 | "hosted-git-info": "2.6.0", 1113 | "is-builtin-module": "1.0.0", 1114 | "semver": "5.5.0", 1115 | "validate-npm-package-license": "3.0.3" 1116 | } 1117 | }, 1118 | "normalize-path": { 1119 | "version": "2.1.1", 1120 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", 1121 | "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", 1122 | "dev": true, 1123 | "requires": { 1124 | "remove-trailing-separator": "1.1.0" 1125 | } 1126 | }, 1127 | "number-is-nan": { 1128 | "version": "1.0.1", 1129 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 1130 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", 1131 | "dev": true 1132 | }, 1133 | "object-assign": { 1134 | "version": "4.1.1", 1135 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1136 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 1137 | "dev": true 1138 | }, 1139 | "object-component": { 1140 | "version": "0.0.3", 1141 | "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", 1142 | "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", 1143 | "dev": true 1144 | }, 1145 | "object-path": { 1146 | "version": "0.9.2", 1147 | "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.9.2.tgz", 1148 | "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", 1149 | "dev": true 1150 | }, 1151 | "object.omit": { 1152 | "version": "2.0.1", 1153 | "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", 1154 | "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", 1155 | "dev": true, 1156 | "requires": { 1157 | "for-own": "0.1.5", 1158 | "is-extendable": "0.1.1" 1159 | } 1160 | }, 1161 | "on-finished": { 1162 | "version": "2.3.0", 1163 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 1164 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 1165 | "dev": true, 1166 | "requires": { 1167 | "ee-first": "1.1.1" 1168 | } 1169 | }, 1170 | "openurl": { 1171 | "version": "1.1.1", 1172 | "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", 1173 | "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", 1174 | "dev": true 1175 | }, 1176 | "opn": { 1177 | "version": "4.0.2", 1178 | "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", 1179 | "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", 1180 | "dev": true, 1181 | "requires": { 1182 | "object-assign": "4.1.1", 1183 | "pinkie-promise": "2.0.1" 1184 | } 1185 | }, 1186 | "os-locale": { 1187 | "version": "1.4.0", 1188 | "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", 1189 | "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", 1190 | "dev": true, 1191 | "requires": { 1192 | "lcid": "1.0.0" 1193 | } 1194 | }, 1195 | "parse-glob": { 1196 | "version": "3.0.4", 1197 | "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", 1198 | "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", 1199 | "dev": true, 1200 | "requires": { 1201 | "glob-base": "0.3.0", 1202 | "is-dotfile": "1.0.3", 1203 | "is-extglob": "1.0.0", 1204 | "is-glob": "2.0.1" 1205 | } 1206 | }, 1207 | "parse-json": { 1208 | "version": "2.2.0", 1209 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", 1210 | "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", 1211 | "dev": true, 1212 | "requires": { 1213 | "error-ex": "1.3.1" 1214 | } 1215 | }, 1216 | "parseqs": { 1217 | "version": "0.0.5", 1218 | "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", 1219 | "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", 1220 | "dev": true, 1221 | "requires": { 1222 | "better-assert": "1.0.2" 1223 | } 1224 | }, 1225 | "parseuri": { 1226 | "version": "0.0.5", 1227 | "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", 1228 | "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", 1229 | "dev": true, 1230 | "requires": { 1231 | "better-assert": "1.0.2" 1232 | } 1233 | }, 1234 | "parseurl": { 1235 | "version": "1.3.2", 1236 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", 1237 | "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", 1238 | "dev": true 1239 | }, 1240 | "path-exists": { 1241 | "version": "2.1.0", 1242 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", 1243 | "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", 1244 | "dev": true, 1245 | "requires": { 1246 | "pinkie-promise": "2.0.1" 1247 | } 1248 | }, 1249 | "path-is-absolute": { 1250 | "version": "1.0.1", 1251 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1252 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1253 | "dev": true 1254 | }, 1255 | "path-type": { 1256 | "version": "1.1.0", 1257 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", 1258 | "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", 1259 | "dev": true, 1260 | "requires": { 1261 | "graceful-fs": "4.1.11", 1262 | "pify": "2.3.0", 1263 | "pinkie-promise": "2.0.1" 1264 | } 1265 | }, 1266 | "pify": { 1267 | "version": "2.3.0", 1268 | "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", 1269 | "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", 1270 | "dev": true 1271 | }, 1272 | "pinkie": { 1273 | "version": "2.0.4", 1274 | "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", 1275 | "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", 1276 | "dev": true 1277 | }, 1278 | "pinkie-promise": { 1279 | "version": "2.0.1", 1280 | "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", 1281 | "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", 1282 | "dev": true, 1283 | "requires": { 1284 | "pinkie": "2.0.4" 1285 | } 1286 | }, 1287 | "portscanner": { 1288 | "version": "2.1.1", 1289 | "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", 1290 | "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", 1291 | "dev": true, 1292 | "requires": { 1293 | "async": "1.5.2", 1294 | "is-number-like": "1.0.8" 1295 | } 1296 | }, 1297 | "preserve": { 1298 | "version": "0.2.0", 1299 | "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", 1300 | "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", 1301 | "dev": true 1302 | }, 1303 | "process-nextick-args": { 1304 | "version": "2.0.0", 1305 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", 1306 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", 1307 | "dev": true 1308 | }, 1309 | "qs": { 1310 | "version": "6.2.3", 1311 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", 1312 | "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", 1313 | "dev": true 1314 | }, 1315 | "randomatic": { 1316 | "version": "3.0.0", 1317 | "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", 1318 | "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", 1319 | "dev": true, 1320 | "requires": { 1321 | "is-number": "4.0.0", 1322 | "kind-of": "6.0.2", 1323 | "math-random": "1.0.1" 1324 | }, 1325 | "dependencies": { 1326 | "is-number": { 1327 | "version": "4.0.0", 1328 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", 1329 | "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", 1330 | "dev": true 1331 | }, 1332 | "kind-of": { 1333 | "version": "6.0.2", 1334 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 1335 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", 1336 | "dev": true 1337 | } 1338 | } 1339 | }, 1340 | "range-parser": { 1341 | "version": "1.2.0", 1342 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", 1343 | "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", 1344 | "dev": true 1345 | }, 1346 | "raw-body": { 1347 | "version": "2.3.3", 1348 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", 1349 | "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", 1350 | "dev": true, 1351 | "requires": { 1352 | "bytes": "3.0.0", 1353 | "http-errors": "1.6.3", 1354 | "iconv-lite": "0.4.23", 1355 | "unpipe": "1.0.0" 1356 | } 1357 | }, 1358 | "read-pkg": { 1359 | "version": "1.1.0", 1360 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", 1361 | "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", 1362 | "dev": true, 1363 | "requires": { 1364 | "load-json-file": "1.1.0", 1365 | "normalize-package-data": "2.4.0", 1366 | "path-type": "1.1.0" 1367 | } 1368 | }, 1369 | "read-pkg-up": { 1370 | "version": "1.0.1", 1371 | "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", 1372 | "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", 1373 | "dev": true, 1374 | "requires": { 1375 | "find-up": "1.1.2", 1376 | "read-pkg": "1.1.0" 1377 | } 1378 | }, 1379 | "readable-stream": { 1380 | "version": "2.3.6", 1381 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 1382 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 1383 | "dev": true, 1384 | "requires": { 1385 | "core-util-is": "1.0.2", 1386 | "inherits": "2.0.3", 1387 | "isarray": "1.0.0", 1388 | "process-nextick-args": "2.0.0", 1389 | "safe-buffer": "5.1.2", 1390 | "string_decoder": "1.1.1", 1391 | "util-deprecate": "1.0.2" 1392 | }, 1393 | "dependencies": { 1394 | "isarray": { 1395 | "version": "1.0.0", 1396 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 1397 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", 1398 | "dev": true 1399 | } 1400 | } 1401 | }, 1402 | "readdirp": { 1403 | "version": "2.1.0", 1404 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", 1405 | "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", 1406 | "dev": true, 1407 | "requires": { 1408 | "graceful-fs": "4.1.11", 1409 | "minimatch": "3.0.4", 1410 | "readable-stream": "2.3.6", 1411 | "set-immediate-shim": "1.0.1" 1412 | } 1413 | }, 1414 | "regex-cache": { 1415 | "version": "0.4.4", 1416 | "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", 1417 | "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", 1418 | "dev": true, 1419 | "requires": { 1420 | "is-equal-shallow": "0.1.3" 1421 | } 1422 | }, 1423 | "remove-trailing-separator": { 1424 | "version": "1.1.0", 1425 | "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", 1426 | "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", 1427 | "dev": true 1428 | }, 1429 | "repeat-element": { 1430 | "version": "1.1.2", 1431 | "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", 1432 | "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", 1433 | "dev": true 1434 | }, 1435 | "repeat-string": { 1436 | "version": "1.6.1", 1437 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 1438 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", 1439 | "dev": true 1440 | }, 1441 | "require-directory": { 1442 | "version": "2.1.1", 1443 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1444 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1445 | "dev": true 1446 | }, 1447 | "require-main-filename": { 1448 | "version": "1.0.1", 1449 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", 1450 | "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", 1451 | "dev": true 1452 | }, 1453 | "requires-port": { 1454 | "version": "1.0.0", 1455 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 1456 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", 1457 | "dev": true 1458 | }, 1459 | "resp-modifier": { 1460 | "version": "6.0.2", 1461 | "resolved": "https://registry.npmjs.org/resp-modifier/-/resp-modifier-6.0.2.tgz", 1462 | "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", 1463 | "dev": true, 1464 | "requires": { 1465 | "debug": "2.6.9", 1466 | "minimatch": "3.0.4" 1467 | } 1468 | }, 1469 | "rx": { 1470 | "version": "4.1.0", 1471 | "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", 1472 | "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", 1473 | "dev": true 1474 | }, 1475 | "safe-buffer": { 1476 | "version": "5.1.2", 1477 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1478 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1479 | "dev": true 1480 | }, 1481 | "safer-buffer": { 1482 | "version": "2.1.2", 1483 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1484 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1485 | "dev": true 1486 | }, 1487 | "semver": { 1488 | "version": "5.5.0", 1489 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", 1490 | "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", 1491 | "dev": true 1492 | }, 1493 | "send": { 1494 | "version": "0.16.2", 1495 | "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", 1496 | "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", 1497 | "dev": true, 1498 | "requires": { 1499 | "debug": "2.6.9", 1500 | "depd": "1.1.2", 1501 | "destroy": "1.0.4", 1502 | "encodeurl": "1.0.2", 1503 | "escape-html": "1.0.3", 1504 | "etag": "1.8.1", 1505 | "fresh": "0.5.2", 1506 | "http-errors": "1.6.3", 1507 | "mime": "1.4.1", 1508 | "ms": "2.0.0", 1509 | "on-finished": "2.3.0", 1510 | "range-parser": "1.2.0", 1511 | "statuses": "1.4.0" 1512 | }, 1513 | "dependencies": { 1514 | "mime": { 1515 | "version": "1.4.1", 1516 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", 1517 | "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", 1518 | "dev": true 1519 | }, 1520 | "statuses": { 1521 | "version": "1.4.0", 1522 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", 1523 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", 1524 | "dev": true 1525 | } 1526 | } 1527 | }, 1528 | "serve-index": { 1529 | "version": "1.8.0", 1530 | "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.8.0.tgz", 1531 | "integrity": "sha1-fF2WwT+xMRAfk8HFd0+FFqHnjTs=", 1532 | "dev": true, 1533 | "requires": { 1534 | "accepts": "1.3.5", 1535 | "batch": "0.5.3", 1536 | "debug": "2.2.0", 1537 | "escape-html": "1.0.3", 1538 | "http-errors": "1.5.1", 1539 | "mime-types": "2.1.18", 1540 | "parseurl": "1.3.2" 1541 | }, 1542 | "dependencies": { 1543 | "debug": { 1544 | "version": "2.2.0", 1545 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", 1546 | "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", 1547 | "dev": true, 1548 | "requires": { 1549 | "ms": "0.7.1" 1550 | } 1551 | }, 1552 | "http-errors": { 1553 | "version": "1.5.1", 1554 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz", 1555 | "integrity": "sha1-eIwNLB3iyBuebowBhDtrl+uSB1A=", 1556 | "dev": true, 1557 | "requires": { 1558 | "inherits": "2.0.3", 1559 | "setprototypeof": "1.0.2", 1560 | "statuses": "1.3.1" 1561 | } 1562 | }, 1563 | "ms": { 1564 | "version": "0.7.1", 1565 | "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", 1566 | "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", 1567 | "dev": true 1568 | }, 1569 | "setprototypeof": { 1570 | "version": "1.0.2", 1571 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz", 1572 | "integrity": "sha1-gaVSFB7BBLiOic44MQOtXGZWTQg=", 1573 | "dev": true 1574 | } 1575 | } 1576 | }, 1577 | "serve-static": { 1578 | "version": "1.13.2", 1579 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", 1580 | "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", 1581 | "dev": true, 1582 | "requires": { 1583 | "encodeurl": "1.0.2", 1584 | "escape-html": "1.0.3", 1585 | "parseurl": "1.3.2", 1586 | "send": "0.16.2" 1587 | } 1588 | }, 1589 | "server-destroy": { 1590 | "version": "1.0.1", 1591 | "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", 1592 | "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", 1593 | "dev": true 1594 | }, 1595 | "set-blocking": { 1596 | "version": "2.0.0", 1597 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1598 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 1599 | "dev": true 1600 | }, 1601 | "set-immediate-shim": { 1602 | "version": "1.0.1", 1603 | "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", 1604 | "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", 1605 | "dev": true 1606 | }, 1607 | "setprototypeof": { 1608 | "version": "1.1.0", 1609 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", 1610 | "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", 1611 | "dev": true 1612 | }, 1613 | "socket.io": { 1614 | "version": "2.0.4", 1615 | "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", 1616 | "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", 1617 | "dev": true, 1618 | "requires": { 1619 | "debug": "2.6.9", 1620 | "engine.io": "3.1.5", 1621 | "socket.io-adapter": "1.1.1", 1622 | "socket.io-client": "2.0.4", 1623 | "socket.io-parser": "3.1.3" 1624 | } 1625 | }, 1626 | "socket.io-adapter": { 1627 | "version": "1.1.1", 1628 | "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", 1629 | "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", 1630 | "dev": true 1631 | }, 1632 | "socket.io-client": { 1633 | "version": "2.0.4", 1634 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", 1635 | "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", 1636 | "dev": true, 1637 | "requires": { 1638 | "backo2": "1.0.2", 1639 | "base64-arraybuffer": "0.1.5", 1640 | "component-bind": "1.0.0", 1641 | "component-emitter": "1.2.1", 1642 | "debug": "2.6.9", 1643 | "engine.io-client": "3.1.6", 1644 | "has-cors": "1.1.0", 1645 | "indexof": "0.0.1", 1646 | "object-component": "0.0.3", 1647 | "parseqs": "0.0.5", 1648 | "parseuri": "0.0.5", 1649 | "socket.io-parser": "3.1.3", 1650 | "to-array": "0.1.4" 1651 | } 1652 | }, 1653 | "socket.io-parser": { 1654 | "version": "3.1.3", 1655 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", 1656 | "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", 1657 | "dev": true, 1658 | "requires": { 1659 | "component-emitter": "1.2.1", 1660 | "debug": "3.1.0", 1661 | "has-binary2": "1.0.3", 1662 | "isarray": "2.0.1" 1663 | }, 1664 | "dependencies": { 1665 | "debug": { 1666 | "version": "3.1.0", 1667 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 1668 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 1669 | "dev": true, 1670 | "requires": { 1671 | "ms": "2.0.0" 1672 | } 1673 | } 1674 | } 1675 | }, 1676 | "spdx-correct": { 1677 | "version": "3.0.0", 1678 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", 1679 | "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", 1680 | "dev": true, 1681 | "requires": { 1682 | "spdx-expression-parse": "3.0.0", 1683 | "spdx-license-ids": "3.0.0" 1684 | } 1685 | }, 1686 | "spdx-exceptions": { 1687 | "version": "2.1.0", 1688 | "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", 1689 | "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", 1690 | "dev": true 1691 | }, 1692 | "spdx-expression-parse": { 1693 | "version": "3.0.0", 1694 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", 1695 | "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", 1696 | "dev": true, 1697 | "requires": { 1698 | "spdx-exceptions": "2.1.0", 1699 | "spdx-license-ids": "3.0.0" 1700 | } 1701 | }, 1702 | "spdx-license-ids": { 1703 | "version": "3.0.0", 1704 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", 1705 | "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", 1706 | "dev": true 1707 | }, 1708 | "statuses": { 1709 | "version": "1.3.1", 1710 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", 1711 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", 1712 | "dev": true 1713 | }, 1714 | "stream-throttle": { 1715 | "version": "0.1.3", 1716 | "resolved": "https://registry.npmjs.org/stream-throttle/-/stream-throttle-0.1.3.tgz", 1717 | "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", 1718 | "dev": true, 1719 | "requires": { 1720 | "commander": "2.15.1", 1721 | "limiter": "1.1.3" 1722 | } 1723 | }, 1724 | "string-width": { 1725 | "version": "1.0.2", 1726 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 1727 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 1728 | "dev": true, 1729 | "requires": { 1730 | "code-point-at": "1.1.0", 1731 | "is-fullwidth-code-point": "1.0.0", 1732 | "strip-ansi": "3.0.1" 1733 | } 1734 | }, 1735 | "string_decoder": { 1736 | "version": "1.1.1", 1737 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1738 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1739 | "dev": true, 1740 | "requires": { 1741 | "safe-buffer": "5.1.2" 1742 | } 1743 | }, 1744 | "strip-ansi": { 1745 | "version": "3.0.1", 1746 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1747 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1748 | "dev": true, 1749 | "requires": { 1750 | "ansi-regex": "2.1.1" 1751 | } 1752 | }, 1753 | "strip-bom": { 1754 | "version": "2.0.0", 1755 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", 1756 | "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", 1757 | "dev": true, 1758 | "requires": { 1759 | "is-utf8": "0.2.1" 1760 | } 1761 | }, 1762 | "supports-color": { 1763 | "version": "2.0.0", 1764 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 1765 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", 1766 | "dev": true 1767 | }, 1768 | "tfunk": { 1769 | "version": "3.1.0", 1770 | "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", 1771 | "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", 1772 | "dev": true, 1773 | "requires": { 1774 | "chalk": "1.1.3", 1775 | "object-path": "0.9.2" 1776 | } 1777 | }, 1778 | "to-array": { 1779 | "version": "0.1.4", 1780 | "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", 1781 | "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", 1782 | "dev": true 1783 | }, 1784 | "typescript": { 1785 | "version": "2.8.3", 1786 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", 1787 | "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==" 1788 | }, 1789 | "ua-parser-js": { 1790 | "version": "0.7.17", 1791 | "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", 1792 | "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", 1793 | "dev": true 1794 | }, 1795 | "ultron": { 1796 | "version": "1.1.1", 1797 | "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", 1798 | "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", 1799 | "dev": true 1800 | }, 1801 | "universalify": { 1802 | "version": "0.1.1", 1803 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", 1804 | "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", 1805 | "dev": true 1806 | }, 1807 | "unpipe": { 1808 | "version": "1.0.0", 1809 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1810 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", 1811 | "dev": true 1812 | }, 1813 | "util-deprecate": { 1814 | "version": "1.0.2", 1815 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1816 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", 1817 | "dev": true 1818 | }, 1819 | "utils-merge": { 1820 | "version": "1.0.0", 1821 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", 1822 | "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=", 1823 | "dev": true 1824 | }, 1825 | "uws": { 1826 | "version": "9.14.0", 1827 | "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", 1828 | "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", 1829 | "dev": true, 1830 | "optional": true 1831 | }, 1832 | "validate-npm-package-license": { 1833 | "version": "3.0.3", 1834 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", 1835 | "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", 1836 | "dev": true, 1837 | "requires": { 1838 | "spdx-correct": "3.0.0", 1839 | "spdx-expression-parse": "3.0.0" 1840 | } 1841 | }, 1842 | "which-module": { 1843 | "version": "1.0.0", 1844 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", 1845 | "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", 1846 | "dev": true 1847 | }, 1848 | "window-size": { 1849 | "version": "0.2.0", 1850 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", 1851 | "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", 1852 | "dev": true 1853 | }, 1854 | "wrap-ansi": { 1855 | "version": "2.1.0", 1856 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", 1857 | "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", 1858 | "dev": true, 1859 | "requires": { 1860 | "string-width": "1.0.2", 1861 | "strip-ansi": "3.0.1" 1862 | } 1863 | }, 1864 | "ws": { 1865 | "version": "3.3.3", 1866 | "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", 1867 | "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", 1868 | "dev": true, 1869 | "requires": { 1870 | "async-limiter": "1.0.0", 1871 | "safe-buffer": "5.1.2", 1872 | "ultron": "1.1.1" 1873 | } 1874 | }, 1875 | "xmlhttprequest-ssl": { 1876 | "version": "1.5.5", 1877 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", 1878 | "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", 1879 | "dev": true 1880 | }, 1881 | "y18n": { 1882 | "version": "3.2.1", 1883 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", 1884 | "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", 1885 | "dev": true 1886 | }, 1887 | "yargs": { 1888 | "version": "6.4.0", 1889 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.4.0.tgz", 1890 | "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", 1891 | "dev": true, 1892 | "requires": { 1893 | "camelcase": "3.0.0", 1894 | "cliui": "3.2.0", 1895 | "decamelize": "1.2.0", 1896 | "get-caller-file": "1.0.2", 1897 | "os-locale": "1.4.0", 1898 | "read-pkg-up": "1.0.1", 1899 | "require-directory": "2.1.1", 1900 | "require-main-filename": "1.0.1", 1901 | "set-blocking": "2.0.0", 1902 | "string-width": "1.0.2", 1903 | "which-module": "1.0.0", 1904 | "window-size": "0.2.0", 1905 | "y18n": "3.2.1", 1906 | "yargs-parser": "4.2.1" 1907 | } 1908 | }, 1909 | "yargs-parser": { 1910 | "version": "4.2.1", 1911 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", 1912 | "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", 1913 | "dev": true, 1914 | "requires": { 1915 | "camelcase": "3.0.0" 1916 | } 1917 | }, 1918 | "yeast": { 1919 | "version": "0.1.2", 1920 | "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", 1921 | "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", 1922 | "dev": true 1923 | } 1924 | } 1925 | } 1926 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn_ts", 3 | "version": "1.0.0", 4 | "description": "> 参考的`gitbook`", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "tsc --watch", 8 | "serve": "browser-sync start --file ./src/**/* --server ./src" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/wlx200510/TypeScriptLearn.git" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "bugs": { 18 | "url": "https://github.com/wlx200510/TypeScriptLearn/issues" 19 | }, 20 | "homepage": "https://github.com/wlx200510/TypeScriptLearn#readme", 21 | "dependencies": { 22 | "typescript": "^2.8.3" 23 | }, 24 | "devDependencies": { 25 | "browser-sync": "^2.24.4" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Todo.ts: -------------------------------------------------------------------------------- 1 | interface Item { 2 | content: string; 3 | done: boolean; 4 | } 5 | 6 | 7 | export default class Todo { 8 | /** 9 | * 静态方法:删除所有的任务子元素 10 | */ 11 | static clearChildren(element: HTMLElement) { 12 | while (element.firstChild) { 13 | element.removeChild(element.firstChild) 14 | } 15 | } 16 | // 列表数据需要有两个基本的属性,可以理解为dom渲染所需属性 17 | items: Item[] = []; 18 | 19 | ulElement: HTMLElement = document.createElement('ul') 20 | 21 | constructor(initialTodos: string[] = []) { 22 | initialTodos.forEach(this.addItem.bind(this)) 23 | } 24 | 25 | addItem(content: string) { 26 | this.items.push({ 27 | content, 28 | done: false 29 | }); 30 | this.updateUlElement(); // 因为数据和渲染dom要手动触发,因此要有这个更新dom的渲染函数 31 | } 32 | 33 | removeItem(index) { 34 | this.items.splice(index, 1) 35 | this.updateUlElement(); 36 | } 37 | 38 | doneItem(index: number):void { 39 | this.items[index].done = !this.items[index].done 40 | let itemContentElement = document.getElementsByClassName('todo-item').item(index) 41 | itemContentElement.style.textDecoration = this.items[index].done ? 'line-through' : 'none' 42 | } 43 | 44 | finishAllItem() { 45 | this.items.forEach((item, index) => { 46 | item.done = true 47 | }) 48 | this.updateUlElement() 49 | } 50 | 51 | updateUlElement() { 52 | Todo.clearChildren(this.ulElement) 53 | this.items.forEach((item, index) => { 54 | let liElement:HTMLElement = document.createElement('li') 55 | let labelElement:HTMLElement = document.createElement('label') 56 | liElement.appendChild(labelElement) 57 | 58 | let checkboxElement: HTMLInputElement = document.createElement('input') 59 | checkboxElement.type = 'checkbox'; 60 | checkboxElement.checked = item.done; 61 | checkboxElement.onchange = (e) => { this.doneItem(index) } 62 | 63 | labelElement.appendChild(checkboxElement); 64 | 65 | let textElement = document.createElement('span') 66 | textElement.classList.add('todo-item') 67 | textElement.innerText = item.content 68 | textElement.style.textDecoration = item.done ? 'line-through' : 'none' 69 | 70 | let deletebutton = document.createElement('button') 71 | deletebutton.innerText = '删除' 72 | deletebutton.addEventListener('click', (e) => { 73 | this.removeItem(index) 74 | }) 75 | deletebutton.classList.add("del") 76 | 77 | labelElement.appendChild(textElement) 78 | liElement.appendChild(deletebutton) 79 | 80 | this.ulElement.appendChild(liElement) 81 | }) 82 | } 83 | 84 | /** 85 | * 为页面增加一个添加todo的功能 这个要单独append到容器组件中 86 | */ 87 | 88 | getAddItemElement() { 89 | let addItemElement = document.createElement('div') 90 | 91 | let addInputElement = document.createElement('input') 92 | addInputElement.type = 'text' 93 | addItemElement.appendChild(addInputElement) 94 | 95 | let addButtonElement = document.createElement('button') 96 | addButtonElement.innerText = '增加项' 97 | addButtonElement.addEventListener('click', () => { 98 | this.addItem(addInputElement.value); // 输入的文字添加到todo中 99 | addInputElement.value = '' 100 | }) 101 | 102 | let finishedButtonElement = document.createElement('button') 103 | finishedButtonElement.innerText = '全部完成' 104 | finishedButtonElement.addEventListener('click', () => { 105 | this.finishAllItem(); // 输入的文字添加到todo中 106 | }) 107 | 108 | addItemElement.appendChild(addButtonElement) 109 | addItemElement.appendChild(finishedButtonElement) 110 | 111 | return addItemElement 112 | } 113 | 114 | renderTo(element: HTMLElement) { 115 | const todoElement = document.createElement('div') 116 | 117 | todoElement.appendChild(this.ulElement); 118 | let addItemElement: HTMLElement = this.getAddItemElement() 119 | todoElement.appendChild(addItemElement) 120 | 121 | element.appendChild(todoElement) 122 | } 123 | } -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 1em; 3 | font-size: 16px; 4 | line-height: 1.5; 5 | } 6 | h1 { 7 | font-size: 18px; 8 | margin: 1em 0 0 0; 9 | } 10 | .meta { 11 | font-size: 12px; 12 | margin: 1em 0 0 0; 13 | } 14 | #app { 15 | margin-top: 1em; 16 | } 17 | ul { 18 | padding-left: 0; 19 | margin: 0; 20 | } 21 | li { 22 | list-style: none; 23 | } 24 | input[type="text"] { 25 | border: 1px solid #ccc; 26 | font-size: 16px; 27 | line-height: 1.5; 28 | padding: 0; 29 | vertical-align: middle; 30 | } 31 | button { 32 | border: 1px solid #ccc; 33 | background: white; 34 | padding: 0; 35 | font-size: 14px; 36 | line-height: 24px; 37 | padding: 0 1em; 38 | vertical-align: middle; 39 | margin-left: 0.5em; 40 | } 41 | input[type="checkbox"] { 42 | vertical-align: middle; 43 | } 44 | .todo-item { 45 | vertical-align: middle; 46 | } 47 | .del { 48 | margin-left: 0.5em; 49 | line-height: 16px; 50 | vertical-align: middle; 51 | padding: 0 0.4em; 52 | color: red; 53 | } -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | TypeScript TodoApp 8 | 9 | 10 | 11 | 12 | 13 | 14 |

TypeScript TodoApp

15 |

源码 https://github.com/wlx200510/TypeScriptLearn

16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 注意需要编写的Todo的类的用法过程 3 | */ 4 | import Todo from './Todo.js'; 5 | 6 | const appElement = document.getElementById('app') 7 | 8 | const todo = new Todo([ 9 | '查看TodoList的全部结构', 10 | '开始编写Todo的类文件', 11 | '添加删除功能,体会代码补全、代码提示', 12 | '添加全部完成功能' 13 | ]) 14 | 15 | todo.renderTo(appElement) // 说明最后要有一个render方法 -------------------------------------------------------------------------------- /src/lib/Todo.js: -------------------------------------------------------------------------------- 1 | export default class Todo { 2 | constructor(initialTodos = []) { 3 | // 列表数据需要有两个基本的属性,可以理解为dom渲染所需属性 4 | this.items = []; 5 | this.ulElement = document.createElement('ul'); 6 | initialTodos.forEach(this.addItem.bind(this)); 7 | } 8 | /** 9 | * 静态方法:删除所有的任务子元素 10 | */ 11 | static clearChildren(element) { 12 | while (element.firstChild) { 13 | element.removeChild(element.firstChild); 14 | } 15 | } 16 | addItem(content) { 17 | this.items.push({ 18 | content, 19 | done: false 20 | }); 21 | this.updateUlElement(); // 因为数据和渲染dom要手动触发,因此要有这个更新dom的渲染函数 22 | } 23 | removeItem(index) { 24 | this.items.splice(index, 1); 25 | this.updateUlElement(); 26 | } 27 | doneItem(index) { 28 | this.items[index].done = !this.items[index].done; 29 | let itemContentElement = document.getElementsByClassName('todo-item').item(index); 30 | itemContentElement.style.textDecoration = this.items[index].done ? 'line-through' : 'none'; 31 | } 32 | finishAllItem() { 33 | this.items.forEach((item, index) => { 34 | item.done = true; 35 | }); 36 | this.updateUlElement(); 37 | } 38 | updateUlElement() { 39 | Todo.clearChildren(this.ulElement); 40 | this.items.forEach((item, index) => { 41 | let liElement = document.createElement('li'); 42 | let labelElement = document.createElement('label'); 43 | liElement.appendChild(labelElement); 44 | let checkboxElement = document.createElement('input'); 45 | checkboxElement.type = 'checkbox'; 46 | checkboxElement.checked = item.done; 47 | checkboxElement.onchange = (e) => { this.doneItem(index); }; 48 | labelElement.appendChild(checkboxElement); 49 | let textElement = document.createElement('span'); 50 | textElement.classList.add('todo-item'); 51 | textElement.innerText = item.content; 52 | textElement.style.textDecoration = item.done ? 'line-through' : 'none'; 53 | let deletebutton = document.createElement('button'); 54 | deletebutton.innerText = '删除'; 55 | deletebutton.addEventListener('click', (e) => { 56 | this.removeItem(index); 57 | }); 58 | deletebutton.classList.add("del"); 59 | labelElement.appendChild(textElement); 60 | liElement.appendChild(deletebutton); 61 | this.ulElement.appendChild(liElement); 62 | }); 63 | } 64 | /** 65 | * 为页面增加一个添加todo的功能 这个要单独append到容器组件中 66 | */ 67 | getAddItemElement() { 68 | let addItemElement = document.createElement('div'); 69 | let addInputElement = document.createElement('input'); 70 | addInputElement.type = 'text'; 71 | addItemElement.appendChild(addInputElement); 72 | let addButtonElement = document.createElement('button'); 73 | addButtonElement.innerText = '增加项'; 74 | addButtonElement.addEventListener('click', () => { 75 | this.addItem(addInputElement.value); // 输入的文字添加到todo中 76 | addInputElement.value = ''; 77 | }); 78 | let finishedButtonElement = document.createElement('button'); 79 | finishedButtonElement.innerText = '全部完成'; 80 | finishedButtonElement.addEventListener('click', () => { 81 | this.finishAllItem(); // 输入的文字添加到todo中 82 | }); 83 | addItemElement.appendChild(addButtonElement); 84 | addItemElement.appendChild(finishedButtonElement); 85 | return addItemElement; 86 | } 87 | renderTo(element) { 88 | const todoElement = document.createElement('div'); 89 | todoElement.appendChild(this.ulElement); 90 | let addItemElement = this.getAddItemElement(); 91 | todoElement.appendChild(addItemElement); 92 | element.appendChild(todoElement); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 注意需要编写的Todo的类的用法过程 3 | */ 4 | import Todo from './Todo.js'; 5 | const appElement = document.getElementById('app'); 6 | const todo = new Todo([ 7 | '查看TodoList的全部结构', 8 | '开始编写Todo的类文件', 9 | '添加删除功能,体会代码补全、代码提示', 10 | '添加全部完成功能' 11 | ]); 12 | todo.renderTo(appElement); // 说明最后要有一个render方法 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./src/lib", 4 | "allowJs": false, 5 | "target": "es2018", 6 | "module": "esnext" 7 | }, 8 | "include": [ 9 | "./src/**/*.ts" 10 | ] 11 | } --------------------------------------------------------------------------------