├── .editorconfig ├── .eslintrc ├── .gitignore ├── .travis.yml ├── README.md ├── collections ├── README.md ├── collection-operator │ ├── collection-operator.js │ └── collection-operator.test.js ├── filter │ ├── filter.js │ └── filter.test.js ├── flatten │ ├── flatten.js │ └── flatten.test.js ├── map │ ├── map.js │ └── map.test.js ├── reduce │ ├── reduce.js │ └── reduce.test.js ├── section │ ├── section.js │ └── section.test.js └── super-position-operation │ ├── collection-operation │ ├── collection-operation.js │ └── collection-operation.test.js │ ├── interval-operation │ ├── interval-operation.js │ └── interval-operation.test.js │ └── own-elements-operation │ ├── own-elements-operation.js │ └── own-elements-operation.test.js ├── es6 └── .gitkeep ├── jest.setup.js ├── lodash ├── comparison │ ├── diffs.js │ └── diffs.test.js ├── count-elements │ ├── index.js │ └── index.test.js └── group │ ├── apply-calculation-to-group.js │ └── apply-calculation-to-group.test.js ├── package.json ├── refactor └── word-frequency │ ├── README.md │ ├── index.js │ └── index.test.js ├── scripts └── .gitkeep └── tdd ├── anagrams ├── README.md ├── index.js └── index.test.js ├── args ├── README.md ├── args-parser │ ├── index.js │ └── index.test.js ├── args │ └── index.js └── schema │ └── index.js ├── bowling ├── README.md ├── index.js └── index.test.js ├── fizzbuzz ├── README.md ├── index.js └── index.test.js ├── guess-number └── README.md ├── lcd ├── README.md ├── index.js └── index.test.js ├── pos-v1 ├── README.md ├── data │ ├── items.js │ └── promotions.js ├── index.js └── index.test.js └── take-out-food ├── README.md ├── data ├── items.js └── promotions.js ├── index.js └── index.test.js /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/.eslintrc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | coverage 4 | TODOLIST.md 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/.travis.yml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/README.md -------------------------------------------------------------------------------- /collections/README.md: -------------------------------------------------------------------------------- 1 | ## JS 进阶集合练习 2 | 3 | 运行所有测试: 4 | 5 | ```bash 6 | npm test 7 | ``` 8 | -------------------------------------------------------------------------------- /collections/collection-operator/collection-operator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/collection-operator/collection-operator.js -------------------------------------------------------------------------------- /collections/collection-operator/collection-operator.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/collection-operator/collection-operator.test.js -------------------------------------------------------------------------------- /collections/filter/filter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/filter/filter.js -------------------------------------------------------------------------------- /collections/filter/filter.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/filter/filter.test.js -------------------------------------------------------------------------------- /collections/flatten/flatten.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/flatten/flatten.js -------------------------------------------------------------------------------- /collections/flatten/flatten.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/flatten/flatten.test.js -------------------------------------------------------------------------------- /collections/map/map.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/map/map.js -------------------------------------------------------------------------------- /collections/map/map.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/map/map.test.js -------------------------------------------------------------------------------- /collections/reduce/reduce.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/reduce/reduce.js -------------------------------------------------------------------------------- /collections/reduce/reduce.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/reduce/reduce.test.js -------------------------------------------------------------------------------- /collections/section/section.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/section/section.js -------------------------------------------------------------------------------- /collections/section/section.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/section/section.test.js -------------------------------------------------------------------------------- /collections/super-position-operation/collection-operation/collection-operation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/super-position-operation/collection-operation/collection-operation.js -------------------------------------------------------------------------------- /collections/super-position-operation/collection-operation/collection-operation.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/super-position-operation/collection-operation/collection-operation.test.js -------------------------------------------------------------------------------- /collections/super-position-operation/interval-operation/interval-operation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/super-position-operation/interval-operation/interval-operation.js -------------------------------------------------------------------------------- /collections/super-position-operation/interval-operation/interval-operation.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/super-position-operation/interval-operation/interval-operation.test.js -------------------------------------------------------------------------------- /collections/super-position-operation/own-elements-operation/own-elements-operation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/super-position-operation/own-elements-operation/own-elements-operation.js -------------------------------------------------------------------------------- /collections/super-position-operation/own-elements-operation/own-elements-operation.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/collections/super-position-operation/own-elements-operation/own-elements-operation.test.js -------------------------------------------------------------------------------- /es6/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jest.setup.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lodash/comparison/diffs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/lodash/comparison/diffs.js -------------------------------------------------------------------------------- /lodash/comparison/diffs.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/lodash/comparison/diffs.test.js -------------------------------------------------------------------------------- /lodash/count-elements/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/lodash/count-elements/index.js -------------------------------------------------------------------------------- /lodash/count-elements/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/lodash/count-elements/index.test.js -------------------------------------------------------------------------------- /lodash/group/apply-calculation-to-group.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/lodash/group/apply-calculation-to-group.js -------------------------------------------------------------------------------- /lodash/group/apply-calculation-to-group.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/lodash/group/apply-calculation-to-group.test.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/package.json -------------------------------------------------------------------------------- /refactor/word-frequency/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/refactor/word-frequency/README.md -------------------------------------------------------------------------------- /refactor/word-frequency/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/refactor/word-frequency/index.js -------------------------------------------------------------------------------- /refactor/word-frequency/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/refactor/word-frequency/index.test.js -------------------------------------------------------------------------------- /scripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tdd/anagrams/README.md: -------------------------------------------------------------------------------- 1 | ## 异位构词 2 | 3 | -------------------------------------------------------------------------------- /tdd/anagrams/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/anagrams/index.js -------------------------------------------------------------------------------- /tdd/anagrams/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/anagrams/index.test.js -------------------------------------------------------------------------------- /tdd/args/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/args/README.md -------------------------------------------------------------------------------- /tdd/args/args-parser/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/args/args-parser/index.js -------------------------------------------------------------------------------- /tdd/args/args-parser/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/args/args-parser/index.test.js -------------------------------------------------------------------------------- /tdd/args/args/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/args/args/index.js -------------------------------------------------------------------------------- /tdd/args/schema/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/args/schema/index.js -------------------------------------------------------------------------------- /tdd/bowling/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/bowling/README.md -------------------------------------------------------------------------------- /tdd/bowling/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tdd/bowling/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/bowling/index.test.js -------------------------------------------------------------------------------- /tdd/fizzbuzz/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/fizzbuzz/README.md -------------------------------------------------------------------------------- /tdd/fizzbuzz/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/fizzbuzz/index.js -------------------------------------------------------------------------------- /tdd/fizzbuzz/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/fizzbuzz/index.test.js -------------------------------------------------------------------------------- /tdd/guess-number/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/guess-number/README.md -------------------------------------------------------------------------------- /tdd/lcd/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/lcd/README.md -------------------------------------------------------------------------------- /tdd/lcd/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/lcd/index.js -------------------------------------------------------------------------------- /tdd/lcd/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/lcd/index.test.js -------------------------------------------------------------------------------- /tdd/pos-v1/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/pos-v1/README.md -------------------------------------------------------------------------------- /tdd/pos-v1/data/items.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/pos-v1/data/items.js -------------------------------------------------------------------------------- /tdd/pos-v1/data/promotions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/pos-v1/data/promotions.js -------------------------------------------------------------------------------- /tdd/pos-v1/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/pos-v1/index.js -------------------------------------------------------------------------------- /tdd/pos-v1/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/pos-v1/index.test.js -------------------------------------------------------------------------------- /tdd/take-out-food/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/take-out-food/README.md -------------------------------------------------------------------------------- /tdd/take-out-food/data/items.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/take-out-food/data/items.js -------------------------------------------------------------------------------- /tdd/take-out-food/data/promotions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/take-out-food/data/promotions.js -------------------------------------------------------------------------------- /tdd/take-out-food/index.js: -------------------------------------------------------------------------------- 1 | export const bestCharge = () => { 2 | return '' 3 | } 4 | -------------------------------------------------------------------------------- /tdd/take-out-food/index.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EthanLin-TWer/frontend-practices/HEAD/tdd/take-out-food/index.test.js --------------------------------------------------------------------------------