├── .eslintrc ├── .gitignore ├── .istanbul.yml ├── .jshintrc ├── .npmignore ├── .nvmrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── babel.js ├── package-lock.json ├── package.json ├── scripts ├── build ├── test └── test-cov ├── src ├── ImmutablePropTypes.js └── __tests__ │ └── ImmutablePropTypes-test.js └── typings ├── __tests__ └── ImmutablePropTest.ts └── index.d.ts /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "env": { 4 | "browser": true, 5 | "node": true, 6 | "mocha": true 7 | }, 8 | "plugins": [ 9 | "react" 10 | ], 11 | "ecmaFeatures": { 12 | "jsx": true 13 | }, 14 | "rules": { 15 | "strict": [0], 16 | "quotes": [2, "single"], 17 | "eol-last": [0], 18 | "no-mixed-requires": [0], 19 | "no-underscore-dangle": [0], 20 | "no-alert": [0], 21 | "key-spacing": [0], 22 | "camelcase": [0], 23 | "no-multi-spaces": [0], 24 | "react/display-name": 1, 25 | "react/jsx-boolean-value": 1, 26 | "react/jsx-quotes": 1, 27 | "react/jsx-no-undef": 1, 28 | "react/jsx-uses-react": 1, 29 | "react/jsx-uses-vars": 1, 30 | "react/no-did-mount-set-state": 1, 31 | "react/no-did-update-set-state": 1, 32 | "react/no-unknown-property": 1, 33 | "react/prop-types": 1, 34 | "react/react-in-jsx-scope": 1, 35 | "react/self-closing-comp": 1, 36 | "react/wrap-multilines": 1 37 | } 38 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | 29 | # distribution 30 | dist 31 | 32 | .DS_Store -------------------------------------------------------------------------------- /.istanbul.yml: -------------------------------------------------------------------------------- 1 | instrumentation: 2 | excludes: ['**/__tests__/**'] -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true 5 | } 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | __tests__ 3 | /.* 4 | /babel.js 5 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v0.10.38 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - node 4 | - iojs 5 | before_script: "npm install -g codeclimate-test-reporter" 6 | script: "npm run test-cov" 7 | after_script: "cat coverage/lcov.info | codeclimate" 8 | addons: 9 | code_climate: 10 | repo_token: 27bc6b4aa984b2e9cb624a05cfaccbd436b39aa235b555d26764c26cbccd69ea -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.1.0 2 | - fix the new React 15.3.x PropType warnings 3 | 4 | ## 2.0.0 5 | - [Aldredcz](https://github.com/Aldredcz) made map key validation happen 6 | 7 | ## 1.7.2 8 | - [Lexicality](https://github.com/Lexicality) added support for Immutable > 3.6.2 9 | - [jsdf](https://github.com/jsdf) gave us a nice performance boost by only generating error messages when they are needed 10 | 11 | ## 1.7.1 added better warnings 12 | - thanks to [Monday Chen](https://github.com/mondaychen) for adding this new feature. 13 | 14 | ## 1.7.0 added mapContains type checker 15 | - thanks to [Brian Emil Hartz](https://github.com/hartzis) for adding this long requested feature. 16 | 17 | ## 1.6.0 added stackOf type checker 18 | - thanks to [Alon Gubkin](https://github.com/alongubkin) for writing the `stackOf` type checker. 19 | 20 | ## 1.5.0 improved warnings 21 | - try to specify which Immutable data structure was provided instead of saying `object`. 22 | 23 | ## 1.4.0 24 | - added support for orderedSetOf and orderedMapOf 25 | 26 | ## 1.3.0 27 | - added support for record and recordOf type checkers. 28 | 29 | ## 1.2.x 30 | - 1.2.3 [Nik Butenko](http://butenko.me/) provided a better .npmignore file 31 | - allows devs who want to compile the code to do so 32 | - better excludes files that are not needed for distribution 33 | - 1.2.2 [Nik Butenko](http://butenko.me/) gave us some nice updates () 34 | - [Issue #10](https://github.com/HurricaneJames/react-immutable-proptypes/pull/10) now have better errors when typechecker(s) provided in `propTypes` definition is invalid 35 | - [Issue #9](https://github.com/HurricaneJames/react-immutable-proptypes/pull/9) removed use of `new` Immutable objects in tests 36 | - 1.2.1 updated documentation to reflect that Immutable object instantiation does not require `new` 37 | - 1.2.0 moved react from peer dependency to dev dependency since React is only used internally to test. This will allow the prop type validators to work on beta/rc versions of react. 38 | 39 | ## Prior Version Updates 40 | - 1.1.0 added `contains` to replace `shape` validator. `shape` is deprecated and will be removed in v 1.2.0 41 | - 1.0.0 marked as stable, no other changes 42 | - 0.1.8 added `setOf` checker. Thanks to [Don Abrams](https://github.com/donabrams)! 43 | - 0.1.7 added convencience checkers for "primitive" immutable types (map, list, etc...) 44 | - 0.1.6 added `iterableOf` 45 | - 0.1.4 added `mapOf` 46 | - 0.1.3 updated package.json to support React v0.11.0+ (including 0.13.1). Thanks [Andrey Okonetchnikov](https://github.com/okonet)! 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 James Burnett 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-immutable-proptypes 2 | 3 | [![npm package](https://img.shields.io/npm/v/react-immutable-proptypes.svg?style=flat)](https://www.npmjs.org/package/react-immutable-proptypes) [![Code Climate](https://codeclimate.com/github/HurricaneJames/react-immutable-proptypes/badges/gpa.svg)](https://codeclimate.com/github/HurricaneJames/react-immutable-proptypes) [![Test Coverage](https://codeclimate.com/github/HurricaneJames/react-immutable-proptypes/badges/coverage.svg)](https://codeclimate.com/github/HurricaneJames/react-immutable-proptypes) 4 | 5 | PropType validators that work with Immutable.js. 6 | 7 | ## About 8 | 9 | I got tired of seeing `React.PropTypes.instanceOf(Immutable.List)` or `React.PropTypes.instanceOf(Immutable.Map)` as PropTypes for components that should be specifying an `Immutable.List` **_of_** something or that an `Immutable.Map` **contains** some keys. A little *"googling"* came up empty, unless you want to use Flow, which I do not. So, I wrote `react-immutable-proptypes`. 10 | 11 | Usage is simple, they work with and like any `React.PropType.*` validator. 12 | 13 | ```js 14 | var ImmutablePropTypes = require('react-immutable-proptypes'); 15 | var MyReactComponent = React.createClass({ 16 | // ... 17 | propTypes: { 18 | myRequiredImmutableList: ImmutablePropTypes.listOf( 19 | ImmutablePropTypes.contains({ 20 | someNumberProp: React.PropTypes.number.isRequired 21 | }) 22 | ).isRequired 23 | } 24 | // ... 25 | }); 26 | ``` 27 | 28 | Since version 0.1.7 there are convenience helpers for "primitive" Immutable.js objects. 29 | 30 | ```js 31 | propTypes: { 32 | oldListTypeChecker: React.PropTypes.instanceOf(Immutable.List), 33 | anotherWay: ImmutablePropTypes.list, 34 | requiredList: ImmutablePropTypes.list.isRequired, 35 | mapsToo: ImmutablePropTypes.map, 36 | evenIterable: ImmutablePropTypes.iterable 37 | } 38 | ``` 39 | 40 | 41 | ## Installation 42 | 43 | Installing via [npmjs](https://www.npmjs.com/package/react-immutable-proptypes) 44 | ```bash 45 | npm install --save react-immutable-proptypes 46 | ``` 47 | 48 | 49 | ## API 50 | 51 | React-Immutable-PropTypes has: 52 | * Primitive Types 53 | ```js 54 | ImmutablePropTypes.list // Immutable.List.isList 55 | ImmutablePropTypes.map // Immutable.Map.isMap 56 | ImmutablePropTypes.orderedMap // Immutable.OrderedMap.isOrderedMap 57 | ImmutablePropTypes.set // Immutable.Set.isSet 58 | ImmutablePropTypes.orderedSet // Immutable.OrderedSet.isOrderedSet 59 | ImmutablePropTypes.stack // Immutable.Stack.isStack 60 | ImmutablePropTypes.seq // Immutable.Seq.isSeq 61 | ImmutablePropTypes.iterable // Immutable.Iterable.isIterable 62 | ImmutablePropTypes.record // instanceof Record 63 | ImmutablePropTypes.contains // Immutable.Iterable.isIterable - contains(shape) 64 | ImmutablePropTypes.mapContains // Immutable.Map.isMap - contains(shape) 65 | ``` 66 | 67 | * `ImmutablePropTypes.contains` (formerly `shape`) is based on `React.PropTypes.shape` and will try to work with any `Immutable.Iterable`. In my usage it is the most used validator, as I'm often trying to validate that a map has certain properties with certain values. 68 | 69 | ```es6 70 | // ... 71 | aMap: ImmutablePropTypes.contains({ 72 | aList: ImmutablePropTypes.contains({ 73 | 0: React.PropTypes.number, 74 | 1: React.PropTypes.string, 75 | 2: React.PropTypes.number.isRequired, 76 | }).isRequired, 77 | }) 78 | // ... 79 | 80 | ``` 81 | 82 | * `ImmutablePropTypes.listOf` is based on `React.PropTypes.array` and is specific to `Immutable.List`. 83 | 84 | * `ImmutablePropTypes.mapOf` allows you to control both map values and keys (in Immutable.Map, keys could be _anything_ including another Immutable collections). It accepts two arguments - first one for values, second one for keys (optional). If you are interested in validation of keys only, just pass `React.PropTypes.any` as the first argument. 85 | 86 | ```es6 87 | // ... 88 | aMap: ImmutablePropTypes.mapOf( 89 | React.PropTypes.any, // validation for values 90 | ImmutablePropTypes.mapContains({ // validation for keys 91 | a: React.PropTypes.number.isRequired, 92 | b: React.PropTypes.string 93 | }) 94 | ) 95 | // ... 96 | const aMap = Immutable.Map([ 97 | [Immutable.Map({a: 1, b: '2'}), 'foo'], 98 | [Immutable.Map({a: 3}), [1, '2', 3]] 99 | ]); 100 | 101 | ``` 102 | 103 | * `ImmutablePropTypes.orderedMapOf` is basically the same as `mapOf`, but it is specific to `Immutable.OrderedMap`. 104 | 105 | * `ImmutablePropTypes.orderedSetOf` is basically the same as `listOf`, but it is specific to `Immutable.OrderedSet`. 106 | 107 | * `ImmutablePropTypes.stackOf` is basically the same as `listOf`, but it is specific to `Immutable.Stack`. 108 | 109 | * `ImmutablePropTypes.iterableOf` is the generic form of listOf/mapOf. It is useful when there is no need to validate anything other than Immutable.js compatible (ie. `Immutable.Iterable`). Continue to use `listOf` and/or `mapOf` when you know the type. 110 | 111 | * `ImmutablePropTypes.recordOf` is like `contains`, except it operates on Record properties. 112 | 113 | ```js 114 | // ... 115 | aRecord: ImmutablePropTypes.recordOf({ 116 | keyA: React.PropTypes.string, 117 | keyB: ImmutablePropTypes.list.isRequired 118 | }) 119 | // ... 120 | ``` 121 | 122 | * `ImmutablePropTypes.mapContains` is based on `React.PropTypes.shape` and will only work with `Immutable.Map`. 123 | 124 | ```es6 125 | // ... 126 | aMap: ImmutablePropTypes.mapContains({ 127 | aList: ImmutablePropTypes.list.isRequired, 128 | }) 129 | // ... 130 | 131 | ``` 132 | 133 | These two validators cover the output of `Immutable.fromJS` on standard JSON data sources. 134 | 135 | ## RFC 136 | 137 | Please send a message or, better yet, create an issue/pull request if you know a better solution, find bugs, or want a feature. For example, should `listOf` work with `Immutable.Seq` or `Immutable.Range`. I can think of reasons it should, but it is not a use case I have at the present, so I'm less than inclined to implement it. Alternatively, we could add a validator for sequences and/or ranges. 138 | -------------------------------------------------------------------------------- /babel.js: -------------------------------------------------------------------------------- 1 | require('babel/register')({ 2 | experimental: true, 3 | loose: 'all' 4 | }); -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-immutable-proptypes", 3 | "version": "2.1.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.8.3", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", 10 | "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", 11 | "dev": true, 12 | "requires": { 13 | "@babel/highlight": "^7.8.3" 14 | } 15 | }, 16 | "@babel/highlight": { 17 | "version": "7.8.3", 18 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", 19 | "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", 20 | "dev": true, 21 | "requires": { 22 | "chalk": "^2.0.0", 23 | "esutils": "^2.0.2", 24 | "js-tokens": "^4.0.0" 25 | }, 26 | "dependencies": { 27 | "ansi-styles": { 28 | "version": "3.2.1", 29 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 30 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 31 | "dev": true, 32 | "requires": { 33 | "color-convert": "^1.9.0" 34 | } 35 | }, 36 | "chalk": { 37 | "version": "2.4.2", 38 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 39 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 40 | "dev": true, 41 | "requires": { 42 | "ansi-styles": "^3.2.1", 43 | "escape-string-regexp": "^1.0.5", 44 | "supports-color": "^5.3.0" 45 | } 46 | }, 47 | "esutils": { 48 | "version": "2.0.3", 49 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 50 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 51 | "dev": true 52 | }, 53 | "supports-color": { 54 | "version": "5.5.0", 55 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 56 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 57 | "dev": true, 58 | "requires": { 59 | "has-flag": "^3.0.0" 60 | } 61 | } 62 | } 63 | }, 64 | "@types/color-name": { 65 | "version": "1.1.1", 66 | "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", 67 | "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", 68 | "dev": true 69 | }, 70 | "abbrev": { 71 | "version": "1.0.9", 72 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", 73 | "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", 74 | "dev": true 75 | }, 76 | "acorn": { 77 | "version": "5.7.4", 78 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", 79 | "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", 80 | "dev": true 81 | }, 82 | "acorn-babel": { 83 | "version": "0.11.1-38", 84 | "resolved": "https://registry.npmjs.org/acorn-babel/-/acorn-babel-0.11.1-38.tgz", 85 | "integrity": "sha1-bPewwHkaEaBe9gIL8G7zSzAIZ2g=", 86 | "dev": true 87 | }, 88 | "acorn-jsx": { 89 | "version": "5.2.0", 90 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", 91 | "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", 92 | "dev": true 93 | }, 94 | "ajv": { 95 | "version": "6.12.0", 96 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", 97 | "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", 98 | "dev": true, 99 | "requires": { 100 | "fast-deep-equal": "^3.1.1", 101 | "fast-json-stable-stringify": "^2.0.0", 102 | "json-schema-traverse": "^0.4.1", 103 | "uri-js": "^4.2.2" 104 | } 105 | }, 106 | "align-text": { 107 | "version": "0.1.4", 108 | "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", 109 | "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", 110 | "dev": true, 111 | "requires": { 112 | "kind-of": "^3.0.2", 113 | "longest": "^1.0.1", 114 | "repeat-string": "^1.5.2" 115 | } 116 | }, 117 | "alter": { 118 | "version": "0.2.0", 119 | "resolved": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz", 120 | "integrity": "sha1-x1iICGF1cgNKrmJICvJrHU0cs80=", 121 | "dev": true, 122 | "requires": { 123 | "stable": "~0.1.3" 124 | } 125 | }, 126 | "amdefine": { 127 | "version": "1.0.1", 128 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 129 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", 130 | "dev": true 131 | }, 132 | "ansi-escapes": { 133 | "version": "4.3.1", 134 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", 135 | "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", 136 | "dev": true, 137 | "requires": { 138 | "type-fest": "^0.11.0" 139 | }, 140 | "dependencies": { 141 | "type-fest": { 142 | "version": "0.11.0", 143 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", 144 | "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", 145 | "dev": true 146 | } 147 | } 148 | }, 149 | "ansi-regex": { 150 | "version": "2.1.1", 151 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 152 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 153 | "dev": true 154 | }, 155 | "ansi-styles": { 156 | "version": "2.2.1", 157 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 158 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", 159 | "dev": true 160 | }, 161 | "argparse": { 162 | "version": "1.0.10", 163 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 164 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 165 | "dev": true, 166 | "requires": { 167 | "sprintf-js": "~1.0.2" 168 | } 169 | }, 170 | "asap": { 171 | "version": "2.0.6", 172 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", 173 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", 174 | "dev": true 175 | }, 176 | "ast-traverse": { 177 | "version": "0.1.1", 178 | "resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz", 179 | "integrity": "sha1-ac8rg4bxnc2hux4F1o/jWdiJfeY=", 180 | "dev": true 181 | }, 182 | "ast-types": { 183 | "version": "0.7.8", 184 | "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.7.8.tgz", 185 | "integrity": "sha1-kC0uDWDQcb3NRtwRXhgJ7RHBOKk=", 186 | "dev": true 187 | }, 188 | "astral-regex": { 189 | "version": "1.0.0", 190 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", 191 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", 192 | "dev": true 193 | }, 194 | "async": { 195 | "version": "1.5.2", 196 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 197 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", 198 | "dev": true 199 | }, 200 | "async-each": { 201 | "version": "0.1.6", 202 | "resolved": "https://registry.npmjs.org/async-each/-/async-each-0.1.6.tgz", 203 | "integrity": "sha1-tn6Z7c3fllQeRK9WKQzX1cbnBDk=", 204 | "dev": true 205 | }, 206 | "babel": { 207 | "version": "4.7.16", 208 | "resolved": "https://registry.npmjs.org/babel/-/babel-4.7.16.tgz", 209 | "integrity": "sha1-brjS46BstB+N0EpYeVixnEc0i4M=", 210 | "dev": true, 211 | "requires": { 212 | "acorn-babel": "0.11.1-38", 213 | "ast-types": "~0.7.0", 214 | "chalk": "^1.0.0", 215 | "chokidar": "^0.12.6", 216 | "commander": "^2.6.0", 217 | "convert-source-map": "^0.5.0", 218 | "core-js": "^0.6.1", 219 | "debug": "^2.1.1", 220 | "detect-indent": "^3.0.0", 221 | "estraverse": "^1.9.1", 222 | "esutils": "^1.1.6", 223 | "fs-readdir-recursive": "^0.1.0", 224 | "globals": "^6.2.0", 225 | "is-integer": "^1.0.4", 226 | "js-tokens": "1.0.0", 227 | "leven": "^1.0.1", 228 | "line-numbers": "0.2.0", 229 | "lodash": "^3.2.0", 230 | "output-file-sync": "^1.1.0", 231 | "path-is-absolute": "^1.0.0", 232 | "private": "^0.1.6", 233 | "regenerator-babel": "0.8.13-2", 234 | "regexpu": "^1.1.2", 235 | "repeating": "^1.1.2", 236 | "shebang-regex": "^1.0.0", 237 | "slash": "^1.0.0", 238 | "source-map": "^0.4.0", 239 | "source-map-support": "^0.2.9", 240 | "to-fast-properties": "^1.0.0", 241 | "trim-right": "^1.0.0" 242 | }, 243 | "dependencies": { 244 | "js-tokens": { 245 | "version": "1.0.0", 246 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.0.tgz", 247 | "integrity": "sha1-J4sua2jfpMhBavETcKVepAG/TN4=", 248 | "dev": true 249 | } 250 | } 251 | }, 252 | "babel-core": { 253 | "version": "5.8.38", 254 | "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.38.tgz", 255 | "integrity": "sha1-H8ruedfmG3ULALjlT238nQr4ZVg=", 256 | "dev": true, 257 | "requires": { 258 | "babel-plugin-constant-folding": "^1.0.1", 259 | "babel-plugin-dead-code-elimination": "^1.0.2", 260 | "babel-plugin-eval": "^1.0.1", 261 | "babel-plugin-inline-environment-variables": "^1.0.1", 262 | "babel-plugin-jscript": "^1.0.4", 263 | "babel-plugin-member-expression-literals": "^1.0.1", 264 | "babel-plugin-property-literals": "^1.0.1", 265 | "babel-plugin-proto-to-assign": "^1.0.3", 266 | "babel-plugin-react-constant-elements": "^1.0.3", 267 | "babel-plugin-react-display-name": "^1.0.3", 268 | "babel-plugin-remove-console": "^1.0.1", 269 | "babel-plugin-remove-debugger": "^1.0.1", 270 | "babel-plugin-runtime": "^1.0.7", 271 | "babel-plugin-undeclared-variables-check": "^1.0.2", 272 | "babel-plugin-undefined-to-void": "^1.1.6", 273 | "babylon": "^5.8.38", 274 | "bluebird": "^2.9.33", 275 | "chalk": "^1.0.0", 276 | "convert-source-map": "^1.1.0", 277 | "core-js": "^1.0.0", 278 | "debug": "^2.1.1", 279 | "detect-indent": "^3.0.0", 280 | "esutils": "^2.0.0", 281 | "fs-readdir-recursive": "^0.1.0", 282 | "globals": "^6.4.0", 283 | "home-or-tmp": "^1.0.0", 284 | "is-integer": "^1.0.4", 285 | "js-tokens": "1.0.1", 286 | "json5": "^0.4.0", 287 | "lodash": "^3.10.0", 288 | "minimatch": "^2.0.3", 289 | "output-file-sync": "^1.1.0", 290 | "path-exists": "^1.0.0", 291 | "path-is-absolute": "^1.0.0", 292 | "private": "^0.1.6", 293 | "regenerator": "0.8.40", 294 | "regexpu": "^1.3.0", 295 | "repeating": "^1.1.2", 296 | "resolve": "^1.1.6", 297 | "shebang-regex": "^1.0.0", 298 | "slash": "^1.0.0", 299 | "source-map": "^0.5.0", 300 | "source-map-support": "^0.2.10", 301 | "to-fast-properties": "^1.0.0", 302 | "trim-right": "^1.0.0", 303 | "try-resolve": "^1.0.0" 304 | }, 305 | "dependencies": { 306 | "convert-source-map": { 307 | "version": "1.7.0", 308 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", 309 | "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", 310 | "dev": true, 311 | "requires": { 312 | "safe-buffer": "~5.1.1" 313 | } 314 | }, 315 | "core-js": { 316 | "version": "1.2.7", 317 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", 318 | "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", 319 | "dev": true 320 | }, 321 | "esutils": { 322 | "version": "2.0.3", 323 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 324 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 325 | "dev": true 326 | }, 327 | "js-tokens": { 328 | "version": "1.0.1", 329 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz", 330 | "integrity": "sha1-zENaXIuUrRWst5gxQPyAGCyJrq4=", 331 | "dev": true 332 | }, 333 | "minimatch": { 334 | "version": "2.0.10", 335 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", 336 | "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", 337 | "dev": true, 338 | "requires": { 339 | "brace-expansion": "^1.0.0" 340 | } 341 | }, 342 | "source-map": { 343 | "version": "0.5.7", 344 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 345 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 346 | "dev": true 347 | } 348 | } 349 | }, 350 | "babel-eslint": { 351 | "version": "3.1.30", 352 | "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-3.1.30.tgz", 353 | "integrity": "sha1-TSRKR47nGeoFcOo0cWfVyi+anKM=", 354 | "dev": true, 355 | "requires": { 356 | "babel-core": "^5.6.4", 357 | "lodash.assign": "^3.0.0", 358 | "lodash.pick": "^3.1.0" 359 | } 360 | }, 361 | "babel-plugin-constant-folding": { 362 | "version": "1.0.1", 363 | "resolved": "https://registry.npmjs.org/babel-plugin-constant-folding/-/babel-plugin-constant-folding-1.0.1.tgz", 364 | "integrity": "sha1-g2HTZMmORJw2kr26Ue/whEKQqo4=", 365 | "dev": true 366 | }, 367 | "babel-plugin-dead-code-elimination": { 368 | "version": "1.0.2", 369 | "resolved": "https://registry.npmjs.org/babel-plugin-dead-code-elimination/-/babel-plugin-dead-code-elimination-1.0.2.tgz", 370 | "integrity": "sha1-X3xFEnTc18zNv7s+C4XdKBIfD2U=", 371 | "dev": true 372 | }, 373 | "babel-plugin-eval": { 374 | "version": "1.0.1", 375 | "resolved": "https://registry.npmjs.org/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz", 376 | "integrity": "sha1-ovrtJc5r5preS/7CY/cBaRlZUNo=", 377 | "dev": true 378 | }, 379 | "babel-plugin-inline-environment-variables": { 380 | "version": "1.0.1", 381 | "resolved": "https://registry.npmjs.org/babel-plugin-inline-environment-variables/-/babel-plugin-inline-environment-variables-1.0.1.tgz", 382 | "integrity": "sha1-H1jOkSB61qgmqL9kX6/mj/X+P/4=", 383 | "dev": true 384 | }, 385 | "babel-plugin-jscript": { 386 | "version": "1.0.4", 387 | "resolved": "https://registry.npmjs.org/babel-plugin-jscript/-/babel-plugin-jscript-1.0.4.tgz", 388 | "integrity": "sha1-jzQsOCduh6R9X6CovT1etsytj8w=", 389 | "dev": true 390 | }, 391 | "babel-plugin-member-expression-literals": { 392 | "version": "1.0.1", 393 | "resolved": "https://registry.npmjs.org/babel-plugin-member-expression-literals/-/babel-plugin-member-expression-literals-1.0.1.tgz", 394 | "integrity": "sha1-zF7bD6qNyScXDnTW0cAkQAIWJNM=", 395 | "dev": true 396 | }, 397 | "babel-plugin-property-literals": { 398 | "version": "1.0.1", 399 | "resolved": "https://registry.npmjs.org/babel-plugin-property-literals/-/babel-plugin-property-literals-1.0.1.tgz", 400 | "integrity": "sha1-AlIwGQAZKYCxwRjv6kjOk6q4MzY=", 401 | "dev": true 402 | }, 403 | "babel-plugin-proto-to-assign": { 404 | "version": "1.0.4", 405 | "resolved": "https://registry.npmjs.org/babel-plugin-proto-to-assign/-/babel-plugin-proto-to-assign-1.0.4.tgz", 406 | "integrity": "sha1-xJ56/QL1d7xNoF6i3wAiUM980SM=", 407 | "dev": true, 408 | "requires": { 409 | "lodash": "^3.9.3" 410 | } 411 | }, 412 | "babel-plugin-react-constant-elements": { 413 | "version": "1.0.3", 414 | "resolved": "https://registry.npmjs.org/babel-plugin-react-constant-elements/-/babel-plugin-react-constant-elements-1.0.3.tgz", 415 | "integrity": "sha1-lGc26DeEKcvDSdz/YvUcFDs041o=", 416 | "dev": true 417 | }, 418 | "babel-plugin-react-display-name": { 419 | "version": "1.0.3", 420 | "resolved": "https://registry.npmjs.org/babel-plugin-react-display-name/-/babel-plugin-react-display-name-1.0.3.tgz", 421 | "integrity": "sha1-dU/jiSboQkpOexWrbqYTne4FFPw=", 422 | "dev": true 423 | }, 424 | "babel-plugin-remove-console": { 425 | "version": "1.0.1", 426 | "resolved": "https://registry.npmjs.org/babel-plugin-remove-console/-/babel-plugin-remove-console-1.0.1.tgz", 427 | "integrity": "sha1-2PJFVsOgUAXUKqqv0neH9T/wE6c=", 428 | "dev": true 429 | }, 430 | "babel-plugin-remove-debugger": { 431 | "version": "1.0.1", 432 | "resolved": "https://registry.npmjs.org/babel-plugin-remove-debugger/-/babel-plugin-remove-debugger-1.0.1.tgz", 433 | "integrity": "sha1-/S6jzWGkKK0fO5yJiC/0KT6MFMc=", 434 | "dev": true 435 | }, 436 | "babel-plugin-runtime": { 437 | "version": "1.0.7", 438 | "resolved": "https://registry.npmjs.org/babel-plugin-runtime/-/babel-plugin-runtime-1.0.7.tgz", 439 | "integrity": "sha1-v3x9lm3Vbs1cF/ocslPJrLflSq8=", 440 | "dev": true 441 | }, 442 | "babel-plugin-undeclared-variables-check": { 443 | "version": "1.0.2", 444 | "resolved": "https://registry.npmjs.org/babel-plugin-undeclared-variables-check/-/babel-plugin-undeclared-variables-check-1.0.2.tgz", 445 | "integrity": "sha1-XPGqU52BP/ZOmWQSkK9iCWX2Xe4=", 446 | "dev": true, 447 | "requires": { 448 | "leven": "^1.0.2" 449 | } 450 | }, 451 | "babel-plugin-undefined-to-void": { 452 | "version": "1.1.6", 453 | "resolved": "https://registry.npmjs.org/babel-plugin-undefined-to-void/-/babel-plugin-undefined-to-void-1.1.6.tgz", 454 | "integrity": "sha1-f1eO+LeN+uYAM4XYQXph7aBuL4E=", 455 | "dev": true 456 | }, 457 | "babylon": { 458 | "version": "5.8.38", 459 | "resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.38.tgz", 460 | "integrity": "sha1-7JsSCxG/bM1Bc6GL8hfmC3mFn/0=", 461 | "dev": true 462 | }, 463 | "balanced-match": { 464 | "version": "1.0.0", 465 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 466 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 467 | "dev": true 468 | }, 469 | "base62": { 470 | "version": "1.2.8", 471 | "resolved": "https://registry.npmjs.org/base62/-/base62-1.2.8.tgz", 472 | "integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==", 473 | "dev": true 474 | }, 475 | "bluebird": { 476 | "version": "2.11.0", 477 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", 478 | "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=", 479 | "dev": true 480 | }, 481 | "brace-expansion": { 482 | "version": "1.1.11", 483 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 484 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 485 | "dev": true, 486 | "requires": { 487 | "balanced-match": "^1.0.0", 488 | "concat-map": "0.0.1" 489 | } 490 | }, 491 | "breakable": { 492 | "version": "1.0.0", 493 | "resolved": "https://registry.npmjs.org/breakable/-/breakable-1.0.0.tgz", 494 | "integrity": "sha1-eEp5eRWjjq0nutRWtVcstLuqeME=", 495 | "dev": true 496 | }, 497 | "callsites": { 498 | "version": "3.1.0", 499 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 500 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 501 | "dev": true 502 | }, 503 | "camelcase": { 504 | "version": "1.2.1", 505 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", 506 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", 507 | "dev": true 508 | }, 509 | "center-align": { 510 | "version": "0.1.3", 511 | "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", 512 | "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", 513 | "dev": true, 514 | "requires": { 515 | "align-text": "^0.1.3", 516 | "lazy-cache": "^1.0.3" 517 | } 518 | }, 519 | "chalk": { 520 | "version": "1.1.3", 521 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 522 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", 523 | "dev": true, 524 | "requires": { 525 | "ansi-styles": "^2.2.1", 526 | "escape-string-regexp": "^1.0.2", 527 | "has-ansi": "^2.0.0", 528 | "strip-ansi": "^3.0.0", 529 | "supports-color": "^2.0.0" 530 | } 531 | }, 532 | "chardet": { 533 | "version": "0.7.0", 534 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 535 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", 536 | "dev": true 537 | }, 538 | "chokidar": { 539 | "version": "0.12.6", 540 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-0.12.6.tgz", 541 | "integrity": "sha1-viBPW5Y04AkxElbl1ujg5QgoTS8=", 542 | "dev": true, 543 | "requires": { 544 | "async-each": "~0.1.5", 545 | "fsevents": "~0.3.1", 546 | "readdirp": "~1.3.0" 547 | } 548 | }, 549 | "cli-cursor": { 550 | "version": "3.1.0", 551 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 552 | "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", 553 | "dev": true, 554 | "requires": { 555 | "restore-cursor": "^3.1.0" 556 | } 557 | }, 558 | "cli-width": { 559 | "version": "2.2.0", 560 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", 561 | "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", 562 | "dev": true 563 | }, 564 | "cliui": { 565 | "version": "2.1.0", 566 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", 567 | "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", 568 | "dev": true, 569 | "requires": { 570 | "center-align": "^0.1.1", 571 | "right-align": "^0.1.1", 572 | "wordwrap": "0.0.2" 573 | } 574 | }, 575 | "color-convert": { 576 | "version": "1.9.3", 577 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 578 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 579 | "dev": true, 580 | "requires": { 581 | "color-name": "1.1.3" 582 | } 583 | }, 584 | "color-name": { 585 | "version": "1.1.3", 586 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 587 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 588 | "dev": true 589 | }, 590 | "commander": { 591 | "version": "2.20.3", 592 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 593 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 594 | "dev": true 595 | }, 596 | "commoner": { 597 | "version": "0.10.8", 598 | "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", 599 | "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", 600 | "dev": true, 601 | "requires": { 602 | "commander": "^2.5.0", 603 | "detective": "^4.3.1", 604 | "glob": "^5.0.15", 605 | "graceful-fs": "^4.1.2", 606 | "iconv-lite": "^0.4.5", 607 | "mkdirp": "^0.5.0", 608 | "private": "^0.1.6", 609 | "q": "^1.1.2", 610 | "recast": "^0.11.17" 611 | }, 612 | "dependencies": { 613 | "graceful-fs": { 614 | "version": "4.2.3", 615 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", 616 | "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", 617 | "dev": true 618 | } 619 | } 620 | }, 621 | "concat-map": { 622 | "version": "0.0.1", 623 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 624 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 625 | "dev": true 626 | }, 627 | "convert-source-map": { 628 | "version": "0.5.1", 629 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.5.1.tgz", 630 | "integrity": "sha1-vrgPOyLeBf1FkUEPSUvOvmNKBX4=", 631 | "dev": true 632 | }, 633 | "core-js": { 634 | "version": "0.6.1", 635 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-0.6.1.tgz", 636 | "integrity": "sha1-G0lwhz6BAb+MQ1rwlfqpAk9Lm1g=", 637 | "dev": true 638 | }, 639 | "core-util-is": { 640 | "version": "1.0.2", 641 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 642 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", 643 | "dev": true 644 | }, 645 | "cross-spawn": { 646 | "version": "6.0.5", 647 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 648 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 649 | "dev": true, 650 | "requires": { 651 | "nice-try": "^1.0.4", 652 | "path-key": "^2.0.1", 653 | "semver": "^5.5.0", 654 | "shebang-command": "^1.2.0", 655 | "which": "^1.2.9" 656 | }, 657 | "dependencies": { 658 | "semver": { 659 | "version": "5.7.1", 660 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 661 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 662 | "dev": true 663 | } 664 | } 665 | }, 666 | "debug": { 667 | "version": "2.6.9", 668 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 669 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 670 | "dev": true, 671 | "requires": { 672 | "ms": "2.0.0" 673 | } 674 | }, 675 | "decamelize": { 676 | "version": "1.2.0", 677 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 678 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 679 | "dev": true 680 | }, 681 | "deep-is": { 682 | "version": "0.1.3", 683 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 684 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 685 | "dev": true 686 | }, 687 | "defined": { 688 | "version": "1.0.0", 689 | "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", 690 | "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", 691 | "dev": true 692 | }, 693 | "defs": { 694 | "version": "1.1.1", 695 | "resolved": "https://registry.npmjs.org/defs/-/defs-1.1.1.tgz", 696 | "integrity": "sha1-siYJ8sehG6ej2xFoBcE5scr/qdI=", 697 | "dev": true, 698 | "requires": { 699 | "alter": "~0.2.0", 700 | "ast-traverse": "~0.1.1", 701 | "breakable": "~1.0.0", 702 | "esprima-fb": "~15001.1001.0-dev-harmony-fb", 703 | "simple-fmt": "~0.1.0", 704 | "simple-is": "~0.2.0", 705 | "stringmap": "~0.2.2", 706 | "stringset": "~0.2.1", 707 | "tryor": "~0.1.2", 708 | "yargs": "~3.27.0" 709 | }, 710 | "dependencies": { 711 | "esprima-fb": { 712 | "version": "15001.1001.0-dev-harmony-fb", 713 | "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", 714 | "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=", 715 | "dev": true 716 | } 717 | } 718 | }, 719 | "detect-indent": { 720 | "version": "3.0.1", 721 | "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz", 722 | "integrity": "sha1-ncXl3bzu+DJXZLlFGwK8bVQIT3U=", 723 | "dev": true, 724 | "requires": { 725 | "get-stdin": "^4.0.1", 726 | "minimist": "^1.1.0", 727 | "repeating": "^1.1.0" 728 | } 729 | }, 730 | "detective": { 731 | "version": "4.7.1", 732 | "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", 733 | "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", 734 | "dev": true, 735 | "requires": { 736 | "acorn": "^5.2.1", 737 | "defined": "^1.0.0" 738 | } 739 | }, 740 | "diff": { 741 | "version": "1.4.0", 742 | "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", 743 | "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", 744 | "dev": true 745 | }, 746 | "doctrine": { 747 | "version": "3.0.0", 748 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 749 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 750 | "dev": true, 751 | "requires": { 752 | "esutils": "^2.0.2" 753 | }, 754 | "dependencies": { 755 | "esutils": { 756 | "version": "2.0.3", 757 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 758 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 759 | "dev": true 760 | } 761 | } 762 | }, 763 | "emoji-regex": { 764 | "version": "8.0.0", 765 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 766 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 767 | "dev": true 768 | }, 769 | "envify": { 770 | "version": "3.4.1", 771 | "resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", 772 | "integrity": "sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg=", 773 | "dev": true, 774 | "requires": { 775 | "jstransform": "^11.0.3", 776 | "through": "~2.3.4" 777 | } 778 | }, 779 | "escape-string-regexp": { 780 | "version": "1.0.5", 781 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 782 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 783 | "dev": true 784 | }, 785 | "escodegen": { 786 | "version": "1.7.1", 787 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.7.1.tgz", 788 | "integrity": "sha1-MOz89mypjcZ80v0WKr626vqM5vw=", 789 | "dev": true, 790 | "requires": { 791 | "esprima": "^1.2.2", 792 | "estraverse": "^1.9.1", 793 | "esutils": "^2.0.2", 794 | "optionator": "^0.5.0", 795 | "source-map": "~0.2.0" 796 | }, 797 | "dependencies": { 798 | "esprima": { 799 | "version": "1.2.5", 800 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", 801 | "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek=", 802 | "dev": true 803 | }, 804 | "esutils": { 805 | "version": "2.0.3", 806 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 807 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 808 | "dev": true 809 | }, 810 | "fast-levenshtein": { 811 | "version": "1.0.7", 812 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", 813 | "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", 814 | "dev": true 815 | }, 816 | "levn": { 817 | "version": "0.2.5", 818 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", 819 | "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", 820 | "dev": true, 821 | "requires": { 822 | "prelude-ls": "~1.1.0", 823 | "type-check": "~0.3.1" 824 | } 825 | }, 826 | "optionator": { 827 | "version": "0.5.0", 828 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz", 829 | "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=", 830 | "dev": true, 831 | "requires": { 832 | "deep-is": "~0.1.2", 833 | "fast-levenshtein": "~1.0.0", 834 | "levn": "~0.2.5", 835 | "prelude-ls": "~1.1.1", 836 | "type-check": "~0.3.1", 837 | "wordwrap": "~0.0.2" 838 | } 839 | }, 840 | "source-map": { 841 | "version": "0.2.0", 842 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", 843 | "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", 844 | "dev": true, 845 | "optional": true, 846 | "requires": { 847 | "amdefine": ">=0.0.4" 848 | } 849 | } 850 | } 851 | }, 852 | "eslint": { 853 | "version": "6.8.0", 854 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", 855 | "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", 856 | "dev": true, 857 | "requires": { 858 | "@babel/code-frame": "^7.0.0", 859 | "ajv": "^6.10.0", 860 | "chalk": "^2.1.0", 861 | "cross-spawn": "^6.0.5", 862 | "debug": "^4.0.1", 863 | "doctrine": "^3.0.0", 864 | "eslint-scope": "^5.0.0", 865 | "eslint-utils": "^1.4.3", 866 | "eslint-visitor-keys": "^1.1.0", 867 | "espree": "^6.1.2", 868 | "esquery": "^1.0.1", 869 | "esutils": "^2.0.2", 870 | "file-entry-cache": "^5.0.1", 871 | "functional-red-black-tree": "^1.0.1", 872 | "glob-parent": "^5.0.0", 873 | "globals": "^12.1.0", 874 | "ignore": "^4.0.6", 875 | "import-fresh": "^3.0.0", 876 | "imurmurhash": "^0.1.4", 877 | "inquirer": "^7.0.0", 878 | "is-glob": "^4.0.0", 879 | "js-yaml": "^3.13.1", 880 | "json-stable-stringify-without-jsonify": "^1.0.1", 881 | "levn": "^0.3.0", 882 | "lodash": "^4.17.14", 883 | "minimatch": "^3.0.4", 884 | "mkdirp": "^0.5.1", 885 | "natural-compare": "^1.4.0", 886 | "optionator": "^0.8.3", 887 | "progress": "^2.0.0", 888 | "regexpp": "^2.0.1", 889 | "semver": "^6.1.2", 890 | "strip-ansi": "^5.2.0", 891 | "strip-json-comments": "^3.0.1", 892 | "table": "^5.2.3", 893 | "text-table": "^0.2.0", 894 | "v8-compile-cache": "^2.0.3" 895 | }, 896 | "dependencies": { 897 | "ansi-regex": { 898 | "version": "4.1.0", 899 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 900 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 901 | "dev": true 902 | }, 903 | "ansi-styles": { 904 | "version": "3.2.1", 905 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 906 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 907 | "dev": true, 908 | "requires": { 909 | "color-convert": "^1.9.0" 910 | } 911 | }, 912 | "chalk": { 913 | "version": "2.4.2", 914 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 915 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 916 | "dev": true, 917 | "requires": { 918 | "ansi-styles": "^3.2.1", 919 | "escape-string-regexp": "^1.0.5", 920 | "supports-color": "^5.3.0" 921 | } 922 | }, 923 | "debug": { 924 | "version": "4.1.1", 925 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 926 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 927 | "dev": true, 928 | "requires": { 929 | "ms": "^2.1.1" 930 | } 931 | }, 932 | "esutils": { 933 | "version": "2.0.3", 934 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 935 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 936 | "dev": true 937 | }, 938 | "globals": { 939 | "version": "12.4.0", 940 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 941 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 942 | "dev": true, 943 | "requires": { 944 | "type-fest": "^0.8.1" 945 | } 946 | }, 947 | "lodash": { 948 | "version": "4.17.15", 949 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 950 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 951 | "dev": true 952 | }, 953 | "minimatch": { 954 | "version": "3.0.4", 955 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 956 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 957 | "dev": true, 958 | "requires": { 959 | "brace-expansion": "^1.1.7" 960 | } 961 | }, 962 | "ms": { 963 | "version": "2.1.2", 964 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 965 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 966 | "dev": true 967 | }, 968 | "strip-ansi": { 969 | "version": "5.2.0", 970 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 971 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 972 | "dev": true, 973 | "requires": { 974 | "ansi-regex": "^4.1.0" 975 | } 976 | }, 977 | "supports-color": { 978 | "version": "5.5.0", 979 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 980 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 981 | "dev": true, 982 | "requires": { 983 | "has-flag": "^3.0.0" 984 | } 985 | } 986 | } 987 | }, 988 | "eslint-plugin-react": { 989 | "version": "2.7.1", 990 | "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-2.7.1.tgz", 991 | "integrity": "sha1-XW8bylB9E4e2WTwjCZivBPC5rtY=", 992 | "dev": true 993 | }, 994 | "eslint-scope": { 995 | "version": "5.0.0", 996 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", 997 | "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", 998 | "dev": true, 999 | "requires": { 1000 | "esrecurse": "^4.1.0", 1001 | "estraverse": "^4.1.1" 1002 | }, 1003 | "dependencies": { 1004 | "estraverse": { 1005 | "version": "4.3.0", 1006 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 1007 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 1008 | "dev": true 1009 | } 1010 | } 1011 | }, 1012 | "eslint-utils": { 1013 | "version": "1.4.3", 1014 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", 1015 | "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", 1016 | "dev": true, 1017 | "requires": { 1018 | "eslint-visitor-keys": "^1.1.0" 1019 | } 1020 | }, 1021 | "eslint-visitor-keys": { 1022 | "version": "1.1.0", 1023 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", 1024 | "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", 1025 | "dev": true 1026 | }, 1027 | "espree": { 1028 | "version": "6.2.1", 1029 | "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", 1030 | "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", 1031 | "dev": true, 1032 | "requires": { 1033 | "acorn": "^7.1.1", 1034 | "acorn-jsx": "^5.2.0", 1035 | "eslint-visitor-keys": "^1.1.0" 1036 | }, 1037 | "dependencies": { 1038 | "acorn": { 1039 | "version": "7.1.1", 1040 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", 1041 | "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", 1042 | "dev": true 1043 | } 1044 | } 1045 | }, 1046 | "esprima": { 1047 | "version": "3.1.3", 1048 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", 1049 | "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", 1050 | "dev": true 1051 | }, 1052 | "esquery": { 1053 | "version": "1.1.0", 1054 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", 1055 | "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", 1056 | "dev": true, 1057 | "requires": { 1058 | "estraverse": "^4.0.0" 1059 | }, 1060 | "dependencies": { 1061 | "estraverse": { 1062 | "version": "4.3.0", 1063 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 1064 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 1065 | "dev": true 1066 | } 1067 | } 1068 | }, 1069 | "esrecurse": { 1070 | "version": "4.2.1", 1071 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", 1072 | "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", 1073 | "dev": true, 1074 | "requires": { 1075 | "estraverse": "^4.1.0" 1076 | }, 1077 | "dependencies": { 1078 | "estraverse": { 1079 | "version": "4.3.0", 1080 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 1081 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 1082 | "dev": true 1083 | } 1084 | } 1085 | }, 1086 | "estraverse": { 1087 | "version": "1.9.3", 1088 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", 1089 | "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", 1090 | "dev": true 1091 | }, 1092 | "esutils": { 1093 | "version": "1.1.6", 1094 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", 1095 | "integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=", 1096 | "dev": true 1097 | }, 1098 | "expect.js": { 1099 | "version": "0.3.1", 1100 | "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz", 1101 | "integrity": "sha1-sKWaDS7/VDdUTr8M6qYBWEHQm1s=", 1102 | "dev": true 1103 | }, 1104 | "external-editor": { 1105 | "version": "3.1.0", 1106 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", 1107 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", 1108 | "dev": true, 1109 | "requires": { 1110 | "chardet": "^0.7.0", 1111 | "iconv-lite": "^0.4.24", 1112 | "tmp": "^0.0.33" 1113 | } 1114 | }, 1115 | "fast-deep-equal": { 1116 | "version": "3.1.1", 1117 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", 1118 | "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", 1119 | "dev": true 1120 | }, 1121 | "fast-json-stable-stringify": { 1122 | "version": "2.1.0", 1123 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 1124 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 1125 | "dev": true 1126 | }, 1127 | "fast-levenshtein": { 1128 | "version": "2.0.6", 1129 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 1130 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 1131 | "dev": true 1132 | }, 1133 | "fbjs": { 1134 | "version": "0.6.1", 1135 | "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.6.1.tgz", 1136 | "integrity": "sha1-lja3cF9bqWhNRLcveDISVK/IYPc=", 1137 | "dev": true, 1138 | "requires": { 1139 | "core-js": "^1.0.0", 1140 | "loose-envify": "^1.0.0", 1141 | "promise": "^7.0.3", 1142 | "ua-parser-js": "^0.7.9", 1143 | "whatwg-fetch": "^0.9.0" 1144 | }, 1145 | "dependencies": { 1146 | "core-js": { 1147 | "version": "1.2.7", 1148 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", 1149 | "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", 1150 | "dev": true 1151 | } 1152 | } 1153 | }, 1154 | "figures": { 1155 | "version": "3.2.0", 1156 | "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", 1157 | "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", 1158 | "dev": true, 1159 | "requires": { 1160 | "escape-string-regexp": "^1.0.5" 1161 | } 1162 | }, 1163 | "file-entry-cache": { 1164 | "version": "5.0.1", 1165 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", 1166 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", 1167 | "dev": true, 1168 | "requires": { 1169 | "flat-cache": "^2.0.1" 1170 | } 1171 | }, 1172 | "fileset": { 1173 | "version": "0.2.1", 1174 | "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.2.1.tgz", 1175 | "integrity": "sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc=", 1176 | "dev": true, 1177 | "requires": { 1178 | "glob": "5.x", 1179 | "minimatch": "2.x" 1180 | }, 1181 | "dependencies": { 1182 | "minimatch": { 1183 | "version": "2.0.10", 1184 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", 1185 | "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", 1186 | "dev": true, 1187 | "requires": { 1188 | "brace-expansion": "^1.0.0" 1189 | } 1190 | } 1191 | } 1192 | }, 1193 | "flat-cache": { 1194 | "version": "2.0.1", 1195 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 1196 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", 1197 | "dev": true, 1198 | "requires": { 1199 | "flatted": "^2.0.0", 1200 | "rimraf": "2.6.3", 1201 | "write": "1.0.3" 1202 | } 1203 | }, 1204 | "flatted": { 1205 | "version": "2.0.1", 1206 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", 1207 | "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", 1208 | "dev": true 1209 | }, 1210 | "fs-readdir-recursive": { 1211 | "version": "0.1.2", 1212 | "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz", 1213 | "integrity": "sha1-MVtPuMHKW4xH3v7zGdBz2tNWgFk=", 1214 | "dev": true 1215 | }, 1216 | "fs.realpath": { 1217 | "version": "1.0.0", 1218 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1219 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 1220 | "dev": true 1221 | }, 1222 | "fsevents": { 1223 | "version": "0.3.8", 1224 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-0.3.8.tgz", 1225 | "integrity": "sha1-mZLxAyySXIKVVNDVmAHcoDE6U1Y=", 1226 | "dev": true, 1227 | "optional": true, 1228 | "requires": { 1229 | "nan": "^2.0.2" 1230 | } 1231 | }, 1232 | "functional-red-black-tree": { 1233 | "version": "1.0.1", 1234 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 1235 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 1236 | "dev": true 1237 | }, 1238 | "get-stdin": { 1239 | "version": "4.0.1", 1240 | "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", 1241 | "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", 1242 | "dev": true 1243 | }, 1244 | "glob": { 1245 | "version": "5.0.15", 1246 | "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", 1247 | "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", 1248 | "dev": true, 1249 | "requires": { 1250 | "inflight": "^1.0.4", 1251 | "inherits": "2", 1252 | "minimatch": "2 || 3", 1253 | "once": "^1.3.0", 1254 | "path-is-absolute": "^1.0.0" 1255 | }, 1256 | "dependencies": { 1257 | "minimatch": { 1258 | "version": "3.0.4", 1259 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1260 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1261 | "dev": true, 1262 | "requires": { 1263 | "brace-expansion": "^1.1.7" 1264 | } 1265 | } 1266 | } 1267 | }, 1268 | "glob-parent": { 1269 | "version": "5.1.0", 1270 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", 1271 | "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", 1272 | "dev": true, 1273 | "requires": { 1274 | "is-glob": "^4.0.1" 1275 | } 1276 | }, 1277 | "globals": { 1278 | "version": "6.4.1", 1279 | "resolved": "https://registry.npmjs.org/globals/-/globals-6.4.1.tgz", 1280 | "integrity": "sha1-hJgDKzttHMge68X3lpDY/in6v08=", 1281 | "dev": true 1282 | }, 1283 | "graceful-fs": { 1284 | "version": "2.0.3", 1285 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz", 1286 | "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=", 1287 | "dev": true 1288 | }, 1289 | "growl": { 1290 | "version": "1.9.2", 1291 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", 1292 | "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", 1293 | "dev": true 1294 | }, 1295 | "handlebars": { 1296 | "version": "4.7.3", 1297 | "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz", 1298 | "integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==", 1299 | "dev": true, 1300 | "requires": { 1301 | "neo-async": "^2.6.0", 1302 | "optimist": "^0.6.1", 1303 | "source-map": "^0.6.1", 1304 | "uglify-js": "^3.1.4" 1305 | }, 1306 | "dependencies": { 1307 | "source-map": { 1308 | "version": "0.6.1", 1309 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1310 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1311 | "dev": true 1312 | } 1313 | } 1314 | }, 1315 | "has-ansi": { 1316 | "version": "2.0.0", 1317 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 1318 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", 1319 | "dev": true, 1320 | "requires": { 1321 | "ansi-regex": "^2.0.0" 1322 | } 1323 | }, 1324 | "has-flag": { 1325 | "version": "3.0.0", 1326 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1327 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 1328 | "dev": true 1329 | }, 1330 | "home-or-tmp": { 1331 | "version": "1.0.0", 1332 | "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz", 1333 | "integrity": "sha1-S58eQIAMPlDGwn94FnavzOcfOYU=", 1334 | "dev": true, 1335 | "requires": { 1336 | "os-tmpdir": "^1.0.1", 1337 | "user-home": "^1.1.1" 1338 | } 1339 | }, 1340 | "iconv-lite": { 1341 | "version": "0.4.24", 1342 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1343 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 1344 | "dev": true, 1345 | "requires": { 1346 | "safer-buffer": ">= 2.1.2 < 3" 1347 | } 1348 | }, 1349 | "ignore": { 1350 | "version": "4.0.6", 1351 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 1352 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 1353 | "dev": true 1354 | }, 1355 | "immutable": { 1356 | "version": "3.8.2", 1357 | "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", 1358 | "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", 1359 | "dev": true 1360 | }, 1361 | "import-fresh": { 1362 | "version": "3.2.1", 1363 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", 1364 | "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", 1365 | "dev": true, 1366 | "requires": { 1367 | "parent-module": "^1.0.0", 1368 | "resolve-from": "^4.0.0" 1369 | } 1370 | }, 1371 | "imurmurhash": { 1372 | "version": "0.1.4", 1373 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1374 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 1375 | "dev": true 1376 | }, 1377 | "inflight": { 1378 | "version": "1.0.6", 1379 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1380 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1381 | "dev": true, 1382 | "requires": { 1383 | "once": "^1.3.0", 1384 | "wrappy": "1" 1385 | } 1386 | }, 1387 | "inherits": { 1388 | "version": "2.0.4", 1389 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1390 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1391 | "dev": true 1392 | }, 1393 | "inquirer": { 1394 | "version": "7.1.0", 1395 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", 1396 | "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", 1397 | "dev": true, 1398 | "requires": { 1399 | "ansi-escapes": "^4.2.1", 1400 | "chalk": "^3.0.0", 1401 | "cli-cursor": "^3.1.0", 1402 | "cli-width": "^2.0.0", 1403 | "external-editor": "^3.0.3", 1404 | "figures": "^3.0.0", 1405 | "lodash": "^4.17.15", 1406 | "mute-stream": "0.0.8", 1407 | "run-async": "^2.4.0", 1408 | "rxjs": "^6.5.3", 1409 | "string-width": "^4.1.0", 1410 | "strip-ansi": "^6.0.0", 1411 | "through": "^2.3.6" 1412 | }, 1413 | "dependencies": { 1414 | "ansi-regex": { 1415 | "version": "5.0.0", 1416 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1417 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1418 | "dev": true 1419 | }, 1420 | "ansi-styles": { 1421 | "version": "4.2.1", 1422 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", 1423 | "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", 1424 | "dev": true, 1425 | "requires": { 1426 | "@types/color-name": "^1.1.1", 1427 | "color-convert": "^2.0.1" 1428 | } 1429 | }, 1430 | "chalk": { 1431 | "version": "3.0.0", 1432 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", 1433 | "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", 1434 | "dev": true, 1435 | "requires": { 1436 | "ansi-styles": "^4.1.0", 1437 | "supports-color": "^7.1.0" 1438 | } 1439 | }, 1440 | "color-convert": { 1441 | "version": "2.0.1", 1442 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1443 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1444 | "dev": true, 1445 | "requires": { 1446 | "color-name": "~1.1.4" 1447 | } 1448 | }, 1449 | "color-name": { 1450 | "version": "1.1.4", 1451 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1452 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1453 | "dev": true 1454 | }, 1455 | "has-flag": { 1456 | "version": "4.0.0", 1457 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1458 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1459 | "dev": true 1460 | }, 1461 | "lodash": { 1462 | "version": "4.17.15", 1463 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 1464 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 1465 | "dev": true 1466 | }, 1467 | "strip-ansi": { 1468 | "version": "6.0.0", 1469 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1470 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1471 | "dev": true, 1472 | "requires": { 1473 | "ansi-regex": "^5.0.0" 1474 | } 1475 | }, 1476 | "supports-color": { 1477 | "version": "7.1.0", 1478 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", 1479 | "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", 1480 | "dev": true, 1481 | "requires": { 1482 | "has-flag": "^4.0.0" 1483 | } 1484 | } 1485 | } 1486 | }, 1487 | "invariant": { 1488 | "version": "2.2.4", 1489 | "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", 1490 | "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", 1491 | "requires": { 1492 | "loose-envify": "^1.0.0" 1493 | } 1494 | }, 1495 | "invert-kv": { 1496 | "version": "1.0.0", 1497 | "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", 1498 | "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", 1499 | "dev": true 1500 | }, 1501 | "is-buffer": { 1502 | "version": "1.1.6", 1503 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 1504 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", 1505 | "dev": true 1506 | }, 1507 | "is-extglob": { 1508 | "version": "2.1.1", 1509 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1510 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1511 | "dev": true 1512 | }, 1513 | "is-finite": { 1514 | "version": "1.1.0", 1515 | "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", 1516 | "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", 1517 | "dev": true 1518 | }, 1519 | "is-fullwidth-code-point": { 1520 | "version": "3.0.0", 1521 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1522 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1523 | "dev": true 1524 | }, 1525 | "is-glob": { 1526 | "version": "4.0.1", 1527 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 1528 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 1529 | "dev": true, 1530 | "requires": { 1531 | "is-extglob": "^2.1.1" 1532 | } 1533 | }, 1534 | "is-integer": { 1535 | "version": "1.0.7", 1536 | "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", 1537 | "integrity": "sha1-a96Bqs3feLZZtmKdYpytxRqIbVw=", 1538 | "dev": true, 1539 | "requires": { 1540 | "is-finite": "^1.0.0" 1541 | } 1542 | }, 1543 | "is-promise": { 1544 | "version": "2.1.0", 1545 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", 1546 | "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", 1547 | "dev": true 1548 | }, 1549 | "isarray": { 1550 | "version": "0.0.1", 1551 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 1552 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", 1553 | "dev": true 1554 | }, 1555 | "isexe": { 1556 | "version": "2.0.0", 1557 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1558 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1559 | "dev": true 1560 | }, 1561 | "istanbul": { 1562 | "version": "0.3.22", 1563 | "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.3.22.tgz", 1564 | "integrity": "sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY=", 1565 | "dev": true, 1566 | "requires": { 1567 | "abbrev": "1.0.x", 1568 | "async": "1.x", 1569 | "escodegen": "1.7.x", 1570 | "esprima": "2.5.x", 1571 | "fileset": "0.2.x", 1572 | "handlebars": "^4.0.1", 1573 | "js-yaml": "3.x", 1574 | "mkdirp": "0.5.x", 1575 | "nopt": "3.x", 1576 | "once": "1.x", 1577 | "resolve": "1.1.x", 1578 | "supports-color": "^3.1.0", 1579 | "which": "^1.1.1", 1580 | "wordwrap": "^1.0.0" 1581 | }, 1582 | "dependencies": { 1583 | "esprima": { 1584 | "version": "2.5.0", 1585 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.5.0.tgz", 1586 | "integrity": "sha1-84ekb9NEwbGjm6+MIL+0O20AWMw=", 1587 | "dev": true 1588 | }, 1589 | "has-flag": { 1590 | "version": "1.0.0", 1591 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", 1592 | "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", 1593 | "dev": true 1594 | }, 1595 | "resolve": { 1596 | "version": "1.1.7", 1597 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", 1598 | "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", 1599 | "dev": true 1600 | }, 1601 | "supports-color": { 1602 | "version": "3.2.3", 1603 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", 1604 | "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", 1605 | "dev": true, 1606 | "requires": { 1607 | "has-flag": "^1.0.0" 1608 | } 1609 | }, 1610 | "wordwrap": { 1611 | "version": "1.0.0", 1612 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 1613 | "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", 1614 | "dev": true 1615 | } 1616 | } 1617 | }, 1618 | "jade": { 1619 | "version": "0.26.3", 1620 | "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", 1621 | "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", 1622 | "dev": true, 1623 | "requires": { 1624 | "commander": "0.6.1", 1625 | "mkdirp": "0.3.0" 1626 | }, 1627 | "dependencies": { 1628 | "commander": { 1629 | "version": "0.6.1", 1630 | "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", 1631 | "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", 1632 | "dev": true 1633 | }, 1634 | "mkdirp": { 1635 | "version": "0.3.0", 1636 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", 1637 | "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", 1638 | "dev": true 1639 | } 1640 | } 1641 | }, 1642 | "js-tokens": { 1643 | "version": "4.0.0", 1644 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1645 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" 1646 | }, 1647 | "js-yaml": { 1648 | "version": "3.13.1", 1649 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 1650 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 1651 | "dev": true, 1652 | "requires": { 1653 | "argparse": "^1.0.7", 1654 | "esprima": "^4.0.0" 1655 | }, 1656 | "dependencies": { 1657 | "esprima": { 1658 | "version": "4.0.1", 1659 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 1660 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 1661 | "dev": true 1662 | } 1663 | } 1664 | }, 1665 | "jsesc": { 1666 | "version": "0.5.0", 1667 | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", 1668 | "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", 1669 | "dev": true 1670 | }, 1671 | "json-schema-traverse": { 1672 | "version": "0.4.1", 1673 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1674 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 1675 | "dev": true 1676 | }, 1677 | "json-stable-stringify-without-jsonify": { 1678 | "version": "1.0.1", 1679 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 1680 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 1681 | "dev": true 1682 | }, 1683 | "json5": { 1684 | "version": "0.4.0", 1685 | "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz", 1686 | "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=", 1687 | "dev": true 1688 | }, 1689 | "jstransform": { 1690 | "version": "11.0.3", 1691 | "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", 1692 | "integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", 1693 | "dev": true, 1694 | "requires": { 1695 | "base62": "^1.1.0", 1696 | "commoner": "^0.10.1", 1697 | "esprima-fb": "^15001.1.0-dev-harmony-fb", 1698 | "object-assign": "^2.0.0", 1699 | "source-map": "^0.4.2" 1700 | }, 1701 | "dependencies": { 1702 | "esprima-fb": { 1703 | "version": "15001.1.0-dev-harmony-fb", 1704 | "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", 1705 | "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=", 1706 | "dev": true 1707 | }, 1708 | "object-assign": { 1709 | "version": "2.1.1", 1710 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", 1711 | "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", 1712 | "dev": true 1713 | } 1714 | } 1715 | }, 1716 | "kind-of": { 1717 | "version": "3.2.2", 1718 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 1719 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", 1720 | "dev": true, 1721 | "requires": { 1722 | "is-buffer": "^1.1.5" 1723 | } 1724 | }, 1725 | "lazy-cache": { 1726 | "version": "1.0.4", 1727 | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", 1728 | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", 1729 | "dev": true 1730 | }, 1731 | "lcid": { 1732 | "version": "1.0.0", 1733 | "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", 1734 | "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", 1735 | "dev": true, 1736 | "requires": { 1737 | "invert-kv": "^1.0.0" 1738 | } 1739 | }, 1740 | "left-pad": { 1741 | "version": "0.0.3", 1742 | "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-0.0.3.tgz", 1743 | "integrity": "sha1-BNmbSh6vnl95wF5ddF1T7dGqiqE=", 1744 | "dev": true 1745 | }, 1746 | "leven": { 1747 | "version": "1.0.2", 1748 | "resolved": "https://registry.npmjs.org/leven/-/leven-1.0.2.tgz", 1749 | "integrity": "sha1-kUS27ryl8dBoAWnxpncNzqYLdcM=", 1750 | "dev": true 1751 | }, 1752 | "levn": { 1753 | "version": "0.3.0", 1754 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 1755 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 1756 | "dev": true, 1757 | "requires": { 1758 | "prelude-ls": "~1.1.2", 1759 | "type-check": "~0.3.2" 1760 | } 1761 | }, 1762 | "line-numbers": { 1763 | "version": "0.2.0", 1764 | "resolved": "https://registry.npmjs.org/line-numbers/-/line-numbers-0.2.0.tgz", 1765 | "integrity": "sha1-a8AoFJRA5XDUlatQlpKqCL13nG4=", 1766 | "dev": true, 1767 | "requires": { 1768 | "left-pad": "0.0.3" 1769 | } 1770 | }, 1771 | "lodash": { 1772 | "version": "3.10.1", 1773 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", 1774 | "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", 1775 | "dev": true 1776 | }, 1777 | "lodash._baseassign": { 1778 | "version": "3.2.0", 1779 | "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", 1780 | "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", 1781 | "dev": true, 1782 | "requires": { 1783 | "lodash._basecopy": "^3.0.0", 1784 | "lodash.keys": "^3.0.0" 1785 | } 1786 | }, 1787 | "lodash._basecopy": { 1788 | "version": "3.0.1", 1789 | "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", 1790 | "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", 1791 | "dev": true 1792 | }, 1793 | "lodash._baseflatten": { 1794 | "version": "3.1.4", 1795 | "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz", 1796 | "integrity": "sha1-B3D/gBMa9uNPO1EXlqe6UhTmX/c=", 1797 | "dev": true, 1798 | "requires": { 1799 | "lodash.isarguments": "^3.0.0", 1800 | "lodash.isarray": "^3.0.0" 1801 | } 1802 | }, 1803 | "lodash._basefor": { 1804 | "version": "3.0.3", 1805 | "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz", 1806 | "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=", 1807 | "dev": true 1808 | }, 1809 | "lodash._bindcallback": { 1810 | "version": "3.0.1", 1811 | "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", 1812 | "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", 1813 | "dev": true 1814 | }, 1815 | "lodash._createassigner": { 1816 | "version": "3.1.1", 1817 | "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", 1818 | "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", 1819 | "dev": true, 1820 | "requires": { 1821 | "lodash._bindcallback": "^3.0.0", 1822 | "lodash._isiterateecall": "^3.0.0", 1823 | "lodash.restparam": "^3.0.0" 1824 | } 1825 | }, 1826 | "lodash._getnative": { 1827 | "version": "3.9.1", 1828 | "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", 1829 | "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", 1830 | "dev": true 1831 | }, 1832 | "lodash._isiterateecall": { 1833 | "version": "3.0.9", 1834 | "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", 1835 | "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", 1836 | "dev": true 1837 | }, 1838 | "lodash._pickbyarray": { 1839 | "version": "3.0.2", 1840 | "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz", 1841 | "integrity": "sha1-H4mNlgfrVgsOFnOEt3x8bRCKpMU=", 1842 | "dev": true 1843 | }, 1844 | "lodash._pickbycallback": { 1845 | "version": "3.0.0", 1846 | "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz", 1847 | "integrity": "sha1-/2G5oBens699MObFPeKK+hm4dQo=", 1848 | "dev": true, 1849 | "requires": { 1850 | "lodash._basefor": "^3.0.0", 1851 | "lodash.keysin": "^3.0.0" 1852 | } 1853 | }, 1854 | "lodash.assign": { 1855 | "version": "3.2.0", 1856 | "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", 1857 | "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", 1858 | "dev": true, 1859 | "requires": { 1860 | "lodash._baseassign": "^3.0.0", 1861 | "lodash._createassigner": "^3.0.0", 1862 | "lodash.keys": "^3.0.0" 1863 | } 1864 | }, 1865 | "lodash.isarguments": { 1866 | "version": "3.1.0", 1867 | "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", 1868 | "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", 1869 | "dev": true 1870 | }, 1871 | "lodash.isarray": { 1872 | "version": "3.0.4", 1873 | "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", 1874 | "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", 1875 | "dev": true 1876 | }, 1877 | "lodash.keys": { 1878 | "version": "3.1.2", 1879 | "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", 1880 | "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", 1881 | "dev": true, 1882 | "requires": { 1883 | "lodash._getnative": "^3.0.0", 1884 | "lodash.isarguments": "^3.0.0", 1885 | "lodash.isarray": "^3.0.0" 1886 | } 1887 | }, 1888 | "lodash.keysin": { 1889 | "version": "3.0.8", 1890 | "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz", 1891 | "integrity": "sha1-IsRJPrvtsUJ5YqVLRFssinZ/tH8=", 1892 | "dev": true, 1893 | "requires": { 1894 | "lodash.isarguments": "^3.0.0", 1895 | "lodash.isarray": "^3.0.0" 1896 | } 1897 | }, 1898 | "lodash.pick": { 1899 | "version": "3.1.0", 1900 | "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-3.1.0.tgz", 1901 | "integrity": "sha1-8lKoVbIEa2G805BLJvdr0u/GVVA=", 1902 | "dev": true, 1903 | "requires": { 1904 | "lodash._baseflatten": "^3.0.0", 1905 | "lodash._bindcallback": "^3.0.0", 1906 | "lodash._pickbyarray": "^3.0.0", 1907 | "lodash._pickbycallback": "^3.0.0", 1908 | "lodash.restparam": "^3.0.0" 1909 | } 1910 | }, 1911 | "lodash.restparam": { 1912 | "version": "3.6.1", 1913 | "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", 1914 | "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", 1915 | "dev": true 1916 | }, 1917 | "longest": { 1918 | "version": "1.0.1", 1919 | "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", 1920 | "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", 1921 | "dev": true 1922 | }, 1923 | "loose-envify": { 1924 | "version": "1.4.0", 1925 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", 1926 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", 1927 | "requires": { 1928 | "js-tokens": "^3.0.0 || ^4.0.0" 1929 | } 1930 | }, 1931 | "lru-cache": { 1932 | "version": "2.7.3", 1933 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", 1934 | "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", 1935 | "dev": true 1936 | }, 1937 | "mimic-fn": { 1938 | "version": "2.1.0", 1939 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", 1940 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", 1941 | "dev": true 1942 | }, 1943 | "minimatch": { 1944 | "version": "0.2.14", 1945 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", 1946 | "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", 1947 | "dev": true, 1948 | "requires": { 1949 | "lru-cache": "2", 1950 | "sigmund": "~1.0.0" 1951 | } 1952 | }, 1953 | "minimist": { 1954 | "version": "1.2.5", 1955 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 1956 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 1957 | "dev": true 1958 | }, 1959 | "mkdirp": { 1960 | "version": "0.5.1", 1961 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 1962 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 1963 | "dev": true, 1964 | "requires": { 1965 | "minimist": "0.0.8" 1966 | }, 1967 | "dependencies": { 1968 | "minimist": { 1969 | "version": "0.0.8", 1970 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 1971 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", 1972 | "dev": true 1973 | } 1974 | } 1975 | }, 1976 | "mocha": { 1977 | "version": "2.5.3", 1978 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", 1979 | "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", 1980 | "dev": true, 1981 | "requires": { 1982 | "commander": "2.3.0", 1983 | "debug": "2.2.0", 1984 | "diff": "1.4.0", 1985 | "escape-string-regexp": "1.0.2", 1986 | "glob": "3.2.11", 1987 | "growl": "1.9.2", 1988 | "jade": "0.26.3", 1989 | "mkdirp": "0.5.1", 1990 | "supports-color": "1.2.0", 1991 | "to-iso-string": "0.0.2" 1992 | }, 1993 | "dependencies": { 1994 | "commander": { 1995 | "version": "2.3.0", 1996 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", 1997 | "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=", 1998 | "dev": true 1999 | }, 2000 | "debug": { 2001 | "version": "2.2.0", 2002 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", 2003 | "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", 2004 | "dev": true, 2005 | "requires": { 2006 | "ms": "0.7.1" 2007 | } 2008 | }, 2009 | "escape-string-regexp": { 2010 | "version": "1.0.2", 2011 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", 2012 | "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=", 2013 | "dev": true 2014 | }, 2015 | "glob": { 2016 | "version": "3.2.11", 2017 | "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", 2018 | "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", 2019 | "dev": true, 2020 | "requires": { 2021 | "inherits": "2", 2022 | "minimatch": "0.3" 2023 | } 2024 | }, 2025 | "minimatch": { 2026 | "version": "0.3.0", 2027 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", 2028 | "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", 2029 | "dev": true, 2030 | "requires": { 2031 | "lru-cache": "2", 2032 | "sigmund": "~1.0.0" 2033 | } 2034 | }, 2035 | "ms": { 2036 | "version": "0.7.1", 2037 | "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", 2038 | "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", 2039 | "dev": true 2040 | }, 2041 | "supports-color": { 2042 | "version": "1.2.0", 2043 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", 2044 | "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=", 2045 | "dev": true 2046 | } 2047 | } 2048 | }, 2049 | "ms": { 2050 | "version": "2.0.0", 2051 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 2052 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 2053 | "dev": true 2054 | }, 2055 | "mute-stream": { 2056 | "version": "0.0.8", 2057 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", 2058 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 2059 | "dev": true 2060 | }, 2061 | "nan": { 2062 | "version": "2.14.0", 2063 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", 2064 | "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", 2065 | "dev": true, 2066 | "optional": true 2067 | }, 2068 | "natural-compare": { 2069 | "version": "1.4.0", 2070 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 2071 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 2072 | "dev": true 2073 | }, 2074 | "neo-async": { 2075 | "version": "2.6.1", 2076 | "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", 2077 | "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", 2078 | "dev": true 2079 | }, 2080 | "nice-try": { 2081 | "version": "1.0.5", 2082 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 2083 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 2084 | "dev": true 2085 | }, 2086 | "nopt": { 2087 | "version": "3.0.6", 2088 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", 2089 | "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", 2090 | "dev": true, 2091 | "requires": { 2092 | "abbrev": "1" 2093 | } 2094 | }, 2095 | "object-assign": { 2096 | "version": "4.1.1", 2097 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 2098 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 2099 | "dev": true 2100 | }, 2101 | "once": { 2102 | "version": "1.4.0", 2103 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 2104 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 2105 | "dev": true, 2106 | "requires": { 2107 | "wrappy": "1" 2108 | } 2109 | }, 2110 | "onetime": { 2111 | "version": "5.1.0", 2112 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", 2113 | "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", 2114 | "dev": true, 2115 | "requires": { 2116 | "mimic-fn": "^2.1.0" 2117 | } 2118 | }, 2119 | "optimist": { 2120 | "version": "0.6.1", 2121 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 2122 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", 2123 | "dev": true, 2124 | "requires": { 2125 | "minimist": "~0.0.1", 2126 | "wordwrap": "~0.0.2" 2127 | }, 2128 | "dependencies": { 2129 | "minimist": { 2130 | "version": "0.0.10", 2131 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", 2132 | "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", 2133 | "dev": true 2134 | } 2135 | } 2136 | }, 2137 | "optionator": { 2138 | "version": "0.8.3", 2139 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", 2140 | "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", 2141 | "dev": true, 2142 | "requires": { 2143 | "deep-is": "~0.1.3", 2144 | "fast-levenshtein": "~2.0.6", 2145 | "levn": "~0.3.0", 2146 | "prelude-ls": "~1.1.2", 2147 | "type-check": "~0.3.2", 2148 | "word-wrap": "~1.2.3" 2149 | } 2150 | }, 2151 | "os-locale": { 2152 | "version": "1.4.0", 2153 | "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", 2154 | "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", 2155 | "dev": true, 2156 | "requires": { 2157 | "lcid": "^1.0.0" 2158 | } 2159 | }, 2160 | "os-tmpdir": { 2161 | "version": "1.0.2", 2162 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 2163 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", 2164 | "dev": true 2165 | }, 2166 | "output-file-sync": { 2167 | "version": "1.1.2", 2168 | "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", 2169 | "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", 2170 | "dev": true, 2171 | "requires": { 2172 | "graceful-fs": "^4.1.4", 2173 | "mkdirp": "^0.5.1", 2174 | "object-assign": "^4.1.0" 2175 | }, 2176 | "dependencies": { 2177 | "graceful-fs": { 2178 | "version": "4.2.3", 2179 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", 2180 | "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", 2181 | "dev": true 2182 | } 2183 | } 2184 | }, 2185 | "parent-module": { 2186 | "version": "1.0.1", 2187 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 2188 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 2189 | "dev": true, 2190 | "requires": { 2191 | "callsites": "^3.0.0" 2192 | } 2193 | }, 2194 | "path-exists": { 2195 | "version": "1.0.0", 2196 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", 2197 | "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=", 2198 | "dev": true 2199 | }, 2200 | "path-is-absolute": { 2201 | "version": "1.0.1", 2202 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 2203 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 2204 | "dev": true 2205 | }, 2206 | "path-key": { 2207 | "version": "2.0.1", 2208 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 2209 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 2210 | "dev": true 2211 | }, 2212 | "path-parse": { 2213 | "version": "1.0.6", 2214 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", 2215 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", 2216 | "dev": true 2217 | }, 2218 | "prelude-ls": { 2219 | "version": "1.1.2", 2220 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 2221 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 2222 | "dev": true 2223 | }, 2224 | "private": { 2225 | "version": "0.1.8", 2226 | "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", 2227 | "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", 2228 | "dev": true 2229 | }, 2230 | "progress": { 2231 | "version": "2.0.3", 2232 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 2233 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 2234 | "dev": true 2235 | }, 2236 | "promise": { 2237 | "version": "7.3.1", 2238 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", 2239 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", 2240 | "dev": true, 2241 | "requires": { 2242 | "asap": "~2.0.3" 2243 | } 2244 | }, 2245 | "punycode": { 2246 | "version": "2.1.1", 2247 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 2248 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 2249 | "dev": true 2250 | }, 2251 | "q": { 2252 | "version": "1.5.1", 2253 | "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", 2254 | "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", 2255 | "dev": true 2256 | }, 2257 | "react": { 2258 | "version": "0.14.9", 2259 | "resolved": "https://registry.npmjs.org/react/-/react-0.14.9.tgz", 2260 | "integrity": "sha1-kRCmSXxJ1EuhwO3TF67CnC4NkdE=", 2261 | "dev": true, 2262 | "requires": { 2263 | "envify": "^3.0.0", 2264 | "fbjs": "^0.6.1" 2265 | } 2266 | }, 2267 | "react-dom": { 2268 | "version": "0.14.9", 2269 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.14.9.tgz", 2270 | "integrity": "sha1-BQZKPc8PsYgKOyv8nVjFXY2fYpM=", 2271 | "dev": true 2272 | }, 2273 | "readable-stream": { 2274 | "version": "1.0.34", 2275 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", 2276 | "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", 2277 | "dev": true, 2278 | "requires": { 2279 | "core-util-is": "~1.0.0", 2280 | "inherits": "~2.0.1", 2281 | "isarray": "0.0.1", 2282 | "string_decoder": "~0.10.x" 2283 | } 2284 | }, 2285 | "readdirp": { 2286 | "version": "1.3.0", 2287 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-1.3.0.tgz", 2288 | "integrity": "sha1-6vGptGO+moGQ/JrhY6oayTSqNAs=", 2289 | "dev": true, 2290 | "requires": { 2291 | "graceful-fs": "~2.0.0", 2292 | "minimatch": "~0.2.12", 2293 | "readable-stream": "~1.0.26-2" 2294 | } 2295 | }, 2296 | "recast": { 2297 | "version": "0.11.23", 2298 | "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", 2299 | "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", 2300 | "dev": true, 2301 | "requires": { 2302 | "ast-types": "0.9.6", 2303 | "esprima": "~3.1.0", 2304 | "private": "~0.1.5", 2305 | "source-map": "~0.5.0" 2306 | }, 2307 | "dependencies": { 2308 | "ast-types": { 2309 | "version": "0.9.6", 2310 | "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", 2311 | "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", 2312 | "dev": true 2313 | }, 2314 | "source-map": { 2315 | "version": "0.5.7", 2316 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 2317 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 2318 | "dev": true 2319 | } 2320 | } 2321 | }, 2322 | "regenerate": { 2323 | "version": "1.4.0", 2324 | "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", 2325 | "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", 2326 | "dev": true 2327 | }, 2328 | "regenerator": { 2329 | "version": "0.8.40", 2330 | "resolved": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.40.tgz", 2331 | "integrity": "sha1-oORXxY69uuV1yfjNdRJ+k3VkNdg=", 2332 | "dev": true, 2333 | "requires": { 2334 | "commoner": "~0.10.3", 2335 | "defs": "~1.1.0", 2336 | "esprima-fb": "~15001.1001.0-dev-harmony-fb", 2337 | "private": "~0.1.5", 2338 | "recast": "0.10.33", 2339 | "through": "~2.3.8" 2340 | }, 2341 | "dependencies": { 2342 | "ast-types": { 2343 | "version": "0.8.12", 2344 | "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.12.tgz", 2345 | "integrity": "sha1-oNkOQ1G7iHcWyD/WN+v4GK9K38w=", 2346 | "dev": true 2347 | }, 2348 | "esprima-fb": { 2349 | "version": "15001.1001.0-dev-harmony-fb", 2350 | "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", 2351 | "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=", 2352 | "dev": true 2353 | }, 2354 | "recast": { 2355 | "version": "0.10.33", 2356 | "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz", 2357 | "integrity": "sha1-lCgI96oBbx+nFCxGHX5XBKqo1pc=", 2358 | "dev": true, 2359 | "requires": { 2360 | "ast-types": "0.8.12", 2361 | "esprima-fb": "~15001.1001.0-dev-harmony-fb", 2362 | "private": "~0.1.5", 2363 | "source-map": "~0.5.0" 2364 | } 2365 | }, 2366 | "source-map": { 2367 | "version": "0.5.7", 2368 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 2369 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 2370 | "dev": true 2371 | } 2372 | } 2373 | }, 2374 | "regenerator-babel": { 2375 | "version": "0.8.13-2", 2376 | "resolved": "https://registry.npmjs.org/regenerator-babel/-/regenerator-babel-0.8.13-2.tgz", 2377 | "integrity": "sha1-HAdf9SQgjpNZFBkYCNB5j9j7xOU=", 2378 | "dev": true, 2379 | "requires": { 2380 | "ast-types": "~0.7.0", 2381 | "commoner": "~0.10.0", 2382 | "private": "~0.1.5", 2383 | "through": "~2.3.6" 2384 | } 2385 | }, 2386 | "regexpp": { 2387 | "version": "2.0.1", 2388 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 2389 | "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 2390 | "dev": true 2391 | }, 2392 | "regexpu": { 2393 | "version": "1.3.0", 2394 | "resolved": "https://registry.npmjs.org/regexpu/-/regexpu-1.3.0.tgz", 2395 | "integrity": "sha1-5TTcmRqeWEYFDJjebX3UpVyeoW0=", 2396 | "dev": true, 2397 | "requires": { 2398 | "esprima": "^2.6.0", 2399 | "recast": "^0.10.10", 2400 | "regenerate": "^1.2.1", 2401 | "regjsgen": "^0.2.0", 2402 | "regjsparser": "^0.1.4" 2403 | }, 2404 | "dependencies": { 2405 | "ast-types": { 2406 | "version": "0.8.15", 2407 | "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", 2408 | "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=", 2409 | "dev": true 2410 | }, 2411 | "esprima": { 2412 | "version": "2.7.3", 2413 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", 2414 | "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", 2415 | "dev": true 2416 | }, 2417 | "recast": { 2418 | "version": "0.10.43", 2419 | "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", 2420 | "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=", 2421 | "dev": true, 2422 | "requires": { 2423 | "ast-types": "0.8.15", 2424 | "esprima-fb": "~15001.1001.0-dev-harmony-fb", 2425 | "private": "~0.1.5", 2426 | "source-map": "~0.5.0" 2427 | }, 2428 | "dependencies": { 2429 | "esprima-fb": { 2430 | "version": "15001.1001.0-dev-harmony-fb", 2431 | "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", 2432 | "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=", 2433 | "dev": true 2434 | } 2435 | } 2436 | }, 2437 | "source-map": { 2438 | "version": "0.5.7", 2439 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 2440 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 2441 | "dev": true 2442 | } 2443 | } 2444 | }, 2445 | "regjsgen": { 2446 | "version": "0.2.0", 2447 | "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", 2448 | "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", 2449 | "dev": true 2450 | }, 2451 | "regjsparser": { 2452 | "version": "0.1.5", 2453 | "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", 2454 | "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", 2455 | "dev": true, 2456 | "requires": { 2457 | "jsesc": "~0.5.0" 2458 | } 2459 | }, 2460 | "repeat-string": { 2461 | "version": "1.6.1", 2462 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 2463 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", 2464 | "dev": true 2465 | }, 2466 | "repeating": { 2467 | "version": "1.1.3", 2468 | "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", 2469 | "integrity": "sha1-PUEUIYh3U3SU+X93+Xhfq4EPpKw=", 2470 | "dev": true, 2471 | "requires": { 2472 | "is-finite": "^1.0.0" 2473 | } 2474 | }, 2475 | "resolve": { 2476 | "version": "1.15.1", 2477 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", 2478 | "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", 2479 | "dev": true, 2480 | "requires": { 2481 | "path-parse": "^1.0.6" 2482 | } 2483 | }, 2484 | "resolve-from": { 2485 | "version": "4.0.0", 2486 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 2487 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 2488 | "dev": true 2489 | }, 2490 | "restore-cursor": { 2491 | "version": "3.1.0", 2492 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", 2493 | "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", 2494 | "dev": true, 2495 | "requires": { 2496 | "onetime": "^5.1.0", 2497 | "signal-exit": "^3.0.2" 2498 | } 2499 | }, 2500 | "right-align": { 2501 | "version": "0.1.3", 2502 | "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", 2503 | "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", 2504 | "dev": true, 2505 | "requires": { 2506 | "align-text": "^0.1.1" 2507 | } 2508 | }, 2509 | "rimraf": { 2510 | "version": "2.6.3", 2511 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 2512 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 2513 | "dev": true, 2514 | "requires": { 2515 | "glob": "^7.1.3" 2516 | }, 2517 | "dependencies": { 2518 | "glob": { 2519 | "version": "7.1.6", 2520 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 2521 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 2522 | "dev": true, 2523 | "requires": { 2524 | "fs.realpath": "^1.0.0", 2525 | "inflight": "^1.0.4", 2526 | "inherits": "2", 2527 | "minimatch": "^3.0.4", 2528 | "once": "^1.3.0", 2529 | "path-is-absolute": "^1.0.0" 2530 | } 2531 | }, 2532 | "minimatch": { 2533 | "version": "3.0.4", 2534 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 2535 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 2536 | "dev": true, 2537 | "requires": { 2538 | "brace-expansion": "^1.1.7" 2539 | } 2540 | } 2541 | } 2542 | }, 2543 | "run-async": { 2544 | "version": "2.4.0", 2545 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", 2546 | "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", 2547 | "dev": true, 2548 | "requires": { 2549 | "is-promise": "^2.1.0" 2550 | } 2551 | }, 2552 | "rxjs": { 2553 | "version": "6.5.4", 2554 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", 2555 | "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", 2556 | "dev": true, 2557 | "requires": { 2558 | "tslib": "^1.9.0" 2559 | } 2560 | }, 2561 | "safe-buffer": { 2562 | "version": "5.1.2", 2563 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 2564 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 2565 | "dev": true 2566 | }, 2567 | "safer-buffer": { 2568 | "version": "2.1.2", 2569 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 2570 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 2571 | "dev": true 2572 | }, 2573 | "semver": { 2574 | "version": "6.3.0", 2575 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 2576 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 2577 | "dev": true 2578 | }, 2579 | "shebang-command": { 2580 | "version": "1.2.0", 2581 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 2582 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 2583 | "dev": true, 2584 | "requires": { 2585 | "shebang-regex": "^1.0.0" 2586 | } 2587 | }, 2588 | "shebang-regex": { 2589 | "version": "1.0.0", 2590 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 2591 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 2592 | "dev": true 2593 | }, 2594 | "sigmund": { 2595 | "version": "1.0.1", 2596 | "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", 2597 | "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", 2598 | "dev": true 2599 | }, 2600 | "signal-exit": { 2601 | "version": "3.0.2", 2602 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 2603 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", 2604 | "dev": true 2605 | }, 2606 | "simple-fmt": { 2607 | "version": "0.1.0", 2608 | "resolved": "https://registry.npmjs.org/simple-fmt/-/simple-fmt-0.1.0.tgz", 2609 | "integrity": "sha1-GRv1ZqWeZTBILLJatTtKjchcOms=", 2610 | "dev": true 2611 | }, 2612 | "simple-is": { 2613 | "version": "0.2.0", 2614 | "resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz", 2615 | "integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=", 2616 | "dev": true 2617 | }, 2618 | "slash": { 2619 | "version": "1.0.0", 2620 | "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", 2621 | "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", 2622 | "dev": true 2623 | }, 2624 | "slice-ansi": { 2625 | "version": "2.1.0", 2626 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", 2627 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", 2628 | "dev": true, 2629 | "requires": { 2630 | "ansi-styles": "^3.2.0", 2631 | "astral-regex": "^1.0.0", 2632 | "is-fullwidth-code-point": "^2.0.0" 2633 | }, 2634 | "dependencies": { 2635 | "ansi-styles": { 2636 | "version": "3.2.1", 2637 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 2638 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 2639 | "dev": true, 2640 | "requires": { 2641 | "color-convert": "^1.9.0" 2642 | } 2643 | }, 2644 | "is-fullwidth-code-point": { 2645 | "version": "2.0.0", 2646 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 2647 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 2648 | "dev": true 2649 | } 2650 | } 2651 | }, 2652 | "source-map": { 2653 | "version": "0.4.4", 2654 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 2655 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 2656 | "dev": true, 2657 | "requires": { 2658 | "amdefine": ">=0.0.4" 2659 | } 2660 | }, 2661 | "source-map-support": { 2662 | "version": "0.2.10", 2663 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz", 2664 | "integrity": "sha1-6lo5AKHByyUJagrozFwrSxDe09w=", 2665 | "dev": true, 2666 | "requires": { 2667 | "source-map": "0.1.32" 2668 | }, 2669 | "dependencies": { 2670 | "source-map": { 2671 | "version": "0.1.32", 2672 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", 2673 | "integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY=", 2674 | "dev": true, 2675 | "requires": { 2676 | "amdefine": ">=0.0.4" 2677 | } 2678 | } 2679 | } 2680 | }, 2681 | "sprintf-js": { 2682 | "version": "1.0.3", 2683 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 2684 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 2685 | "dev": true 2686 | }, 2687 | "stable": { 2688 | "version": "0.1.8", 2689 | "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", 2690 | "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", 2691 | "dev": true 2692 | }, 2693 | "string-width": { 2694 | "version": "4.2.0", 2695 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", 2696 | "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", 2697 | "dev": true, 2698 | "requires": { 2699 | "emoji-regex": "^8.0.0", 2700 | "is-fullwidth-code-point": "^3.0.0", 2701 | "strip-ansi": "^6.0.0" 2702 | }, 2703 | "dependencies": { 2704 | "ansi-regex": { 2705 | "version": "5.0.0", 2706 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 2707 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 2708 | "dev": true 2709 | }, 2710 | "strip-ansi": { 2711 | "version": "6.0.0", 2712 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2713 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2714 | "dev": true, 2715 | "requires": { 2716 | "ansi-regex": "^5.0.0" 2717 | } 2718 | } 2719 | } 2720 | }, 2721 | "string_decoder": { 2722 | "version": "0.10.31", 2723 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 2724 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", 2725 | "dev": true 2726 | }, 2727 | "stringmap": { 2728 | "version": "0.2.2", 2729 | "resolved": "https://registry.npmjs.org/stringmap/-/stringmap-0.2.2.tgz", 2730 | "integrity": "sha1-VWwTeyWPlCuHdvWy71gqoGnX0bE=", 2731 | "dev": true 2732 | }, 2733 | "stringset": { 2734 | "version": "0.2.1", 2735 | "resolved": "https://registry.npmjs.org/stringset/-/stringset-0.2.1.tgz", 2736 | "integrity": "sha1-7yWcTjSTRDd/zRyRPdLoSMnAQrU=", 2737 | "dev": true 2738 | }, 2739 | "strip-ansi": { 2740 | "version": "3.0.1", 2741 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 2742 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 2743 | "dev": true, 2744 | "requires": { 2745 | "ansi-regex": "^2.0.0" 2746 | } 2747 | }, 2748 | "strip-json-comments": { 2749 | "version": "3.0.1", 2750 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", 2751 | "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", 2752 | "dev": true 2753 | }, 2754 | "supports-color": { 2755 | "version": "2.0.0", 2756 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 2757 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", 2758 | "dev": true 2759 | }, 2760 | "table": { 2761 | "version": "5.4.6", 2762 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", 2763 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", 2764 | "dev": true, 2765 | "requires": { 2766 | "ajv": "^6.10.2", 2767 | "lodash": "^4.17.14", 2768 | "slice-ansi": "^2.1.0", 2769 | "string-width": "^3.0.0" 2770 | }, 2771 | "dependencies": { 2772 | "ansi-regex": { 2773 | "version": "4.1.0", 2774 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 2775 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 2776 | "dev": true 2777 | }, 2778 | "emoji-regex": { 2779 | "version": "7.0.3", 2780 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 2781 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 2782 | "dev": true 2783 | }, 2784 | "is-fullwidth-code-point": { 2785 | "version": "2.0.0", 2786 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 2787 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 2788 | "dev": true 2789 | }, 2790 | "lodash": { 2791 | "version": "4.17.15", 2792 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 2793 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 2794 | "dev": true 2795 | }, 2796 | "string-width": { 2797 | "version": "3.1.0", 2798 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 2799 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 2800 | "dev": true, 2801 | "requires": { 2802 | "emoji-regex": "^7.0.1", 2803 | "is-fullwidth-code-point": "^2.0.0", 2804 | "strip-ansi": "^5.1.0" 2805 | } 2806 | }, 2807 | "strip-ansi": { 2808 | "version": "5.2.0", 2809 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 2810 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 2811 | "dev": true, 2812 | "requires": { 2813 | "ansi-regex": "^4.1.0" 2814 | } 2815 | } 2816 | } 2817 | }, 2818 | "text-table": { 2819 | "version": "0.2.0", 2820 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 2821 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 2822 | "dev": true 2823 | }, 2824 | "through": { 2825 | "version": "2.3.8", 2826 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 2827 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 2828 | "dev": true 2829 | }, 2830 | "tmp": { 2831 | "version": "0.0.33", 2832 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 2833 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 2834 | "dev": true, 2835 | "requires": { 2836 | "os-tmpdir": "~1.0.2" 2837 | } 2838 | }, 2839 | "to-fast-properties": { 2840 | "version": "1.0.3", 2841 | "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", 2842 | "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", 2843 | "dev": true 2844 | }, 2845 | "to-iso-string": { 2846 | "version": "0.0.2", 2847 | "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", 2848 | "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=", 2849 | "dev": true 2850 | }, 2851 | "trim-right": { 2852 | "version": "1.0.1", 2853 | "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", 2854 | "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", 2855 | "dev": true 2856 | }, 2857 | "try-resolve": { 2858 | "version": "1.0.1", 2859 | "resolved": "https://registry.npmjs.org/try-resolve/-/try-resolve-1.0.1.tgz", 2860 | "integrity": "sha1-z95vq9ctY+V5fPqrhzq76OcA6RI=", 2861 | "dev": true 2862 | }, 2863 | "tryor": { 2864 | "version": "0.1.2", 2865 | "resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz", 2866 | "integrity": "sha1-gUXkynyv9ArN48z5Rui4u3W0Fys=", 2867 | "dev": true 2868 | }, 2869 | "tslib": { 2870 | "version": "1.11.1", 2871 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", 2872 | "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", 2873 | "dev": true 2874 | }, 2875 | "type-check": { 2876 | "version": "0.3.2", 2877 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 2878 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 2879 | "dev": true, 2880 | "requires": { 2881 | "prelude-ls": "~1.1.2" 2882 | } 2883 | }, 2884 | "type-fest": { 2885 | "version": "0.8.1", 2886 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 2887 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 2888 | "dev": true 2889 | }, 2890 | "ua-parser-js": { 2891 | "version": "0.7.21", 2892 | "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", 2893 | "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==", 2894 | "dev": true 2895 | }, 2896 | "uglify-js": { 2897 | "version": "3.8.0", 2898 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.0.tgz", 2899 | "integrity": "sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ==", 2900 | "dev": true, 2901 | "optional": true, 2902 | "requires": { 2903 | "commander": "~2.20.3", 2904 | "source-map": "~0.6.1" 2905 | }, 2906 | "dependencies": { 2907 | "source-map": { 2908 | "version": "0.6.1", 2909 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 2910 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 2911 | "dev": true, 2912 | "optional": true 2913 | } 2914 | } 2915 | }, 2916 | "uri-js": { 2917 | "version": "4.2.2", 2918 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 2919 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 2920 | "dev": true, 2921 | "requires": { 2922 | "punycode": "^2.1.0" 2923 | } 2924 | }, 2925 | "user-home": { 2926 | "version": "1.1.1", 2927 | "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", 2928 | "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", 2929 | "dev": true 2930 | }, 2931 | "v8-compile-cache": { 2932 | "version": "2.1.0", 2933 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", 2934 | "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", 2935 | "dev": true 2936 | }, 2937 | "whatwg-fetch": { 2938 | "version": "0.9.0", 2939 | "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz", 2940 | "integrity": "sha1-DjaExsuZlbQ+/J3wPkw2XZX9nMA=", 2941 | "dev": true 2942 | }, 2943 | "which": { 2944 | "version": "1.3.1", 2945 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 2946 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 2947 | "dev": true, 2948 | "requires": { 2949 | "isexe": "^2.0.0" 2950 | } 2951 | }, 2952 | "window-size": { 2953 | "version": "0.1.4", 2954 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", 2955 | "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", 2956 | "dev": true 2957 | }, 2958 | "word-wrap": { 2959 | "version": "1.2.3", 2960 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 2961 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 2962 | "dev": true 2963 | }, 2964 | "wordwrap": { 2965 | "version": "0.0.2", 2966 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", 2967 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", 2968 | "dev": true 2969 | }, 2970 | "wrappy": { 2971 | "version": "1.0.2", 2972 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2973 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2974 | "dev": true 2975 | }, 2976 | "write": { 2977 | "version": "1.0.3", 2978 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", 2979 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", 2980 | "dev": true, 2981 | "requires": { 2982 | "mkdirp": "^0.5.1" 2983 | } 2984 | }, 2985 | "y18n": { 2986 | "version": "3.2.1", 2987 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", 2988 | "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", 2989 | "dev": true 2990 | }, 2991 | "yargs": { 2992 | "version": "3.27.0", 2993 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.27.0.tgz", 2994 | "integrity": "sha1-ISBUaTFuk5Ex1Z8toMbX+YIh6kA=", 2995 | "dev": true, 2996 | "requires": { 2997 | "camelcase": "^1.2.1", 2998 | "cliui": "^2.1.0", 2999 | "decamelize": "^1.0.0", 3000 | "os-locale": "^1.4.0", 3001 | "window-size": "^0.1.2", 3002 | "y18n": "^3.2.0" 3003 | } 3004 | } 3005 | } 3006 | } 3007 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-immutable-proptypes", 3 | "version": "2.2.0", 4 | "description": "PropType validators that work with Immutable.js.", 5 | "main": "dist/ImmutablePropTypes.js", 6 | "scripts": { 7 | "build": "./scripts/build", 8 | "test": "./scripts/test", 9 | "test-cov": "./scripts/test-cov", 10 | "prepublish": "npm run build", 11 | "lint": "./node_modules/.bin/eslint ./src" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/HurricaneJames/react-immutable-proptypes" 16 | }, 17 | "keywords": [ 18 | "react", 19 | "immutable-js", 20 | "immutable", 21 | "immutablejs", 22 | "proptype" 23 | ], 24 | "author": "James Burnett (https://github.com/HurricaneJames/react-immutable-proptypes)", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/HurricaneJames/react-immutable-proptypes/issues" 28 | }, 29 | "homepage": "https://github.com/HurricaneJames/react-immutable-proptypes", 30 | "peerDependencies": { 31 | "immutable": ">=3.6.2" 32 | }, 33 | "devDependencies": { 34 | "babel": "^4.6.6", 35 | "babel-eslint": "^3.1.1", 36 | "eslint": "^6.6.0", 37 | "eslint-plugin-react": "^2.2.0", 38 | "expect.js": "^0.3.1", 39 | "immutable": "^3.7.4", 40 | "istanbul": "~0.3.7", 41 | "mocha": "^2.3.3", 42 | "react": "^0.14.0", 43 | "react-dom": "^0.14.0" 44 | }, 45 | "dependencies": { 46 | "invariant": "^2.2.2" 47 | }, 48 | "typings": "typings/index.d.ts" 49 | } -------------------------------------------------------------------------------- /scripts/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./node_modules/.bin/babel ./src --out-dir dist --loose all --experimental -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./node_modules/.bin/mocha --require ./babel ./src/__tests__ -------------------------------------------------------------------------------- /scripts/test-cov: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --require ./babel ./src/__tests__ -------------------------------------------------------------------------------- /src/ImmutablePropTypes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a straight rip-off of the React.js ReactPropTypes.js proptype validators, 3 | * modified to make it possible to validate Immutable.js data. 4 | * ImmutableTypes.listOf is patterned after React.PropTypes.arrayOf, but for Immutable.List 5 | * ImmutableTypes.shape is based on React.PropTypes.shape, but for any Immutable.Iterable 6 | */ 7 | var Immutable = require('immutable'); 8 | 9 | var ANONYMOUS = '<>'; 10 | 11 | var ImmutablePropTypes; 12 | 13 | if (process.env.NODE_ENV !== 'production') { 14 | ImmutablePropTypes = { 15 | listOf: createListOfTypeChecker, 16 | mapOf: createMapOfTypeChecker, 17 | orderedMapOf: createOrderedMapOfTypeChecker, 18 | setOf: createSetOfTypeChecker, 19 | orderedSetOf: createOrderedSetOfTypeChecker, 20 | stackOf: createStackOfTypeChecker, 21 | iterableOf: createIterableOfTypeChecker, 22 | recordOf: createRecordOfTypeChecker, 23 | shape: createShapeChecker, 24 | contains: createShapeChecker, 25 | mapContains: createMapContainsChecker, 26 | orderedMapContains: createOrderedMapContainsChecker, 27 | // Primitive Types 28 | list: createImmutableTypeChecker('List', Immutable.List.isList), 29 | map: createImmutableTypeChecker('Map', Immutable.Map.isMap), 30 | orderedMap: createImmutableTypeChecker('OrderedMap', Immutable.OrderedMap.isOrderedMap), 31 | set: createImmutableTypeChecker('Set', Immutable.Set.isSet), 32 | orderedSet: createImmutableTypeChecker('OrderedSet', Immutable.OrderedSet.isOrderedSet), 33 | stack: createImmutableTypeChecker('Stack', Immutable.Stack.isStack), 34 | seq: createImmutableTypeChecker('Seq', Immutable.Seq.isSeq), 35 | record: createImmutableTypeChecker('Record', function(isRecord) { return isRecord instanceof Immutable.Record; }), 36 | iterable: createImmutableTypeChecker('Iterable', Immutable.Iterable.isIterable) 37 | }; 38 | } else { 39 | var productionTypeChecker = function() { 40 | invariant( 41 | false, 42 | 'ImmutablePropTypes type checking code is stripped in production.' 43 | ); 44 | }; 45 | productionTypeChecker.isRequired = productionTypeChecker; 46 | var getProductionTypeChecker = function () { return productionTypeChecker }; 47 | 48 | ImmutablePropTypes = { 49 | listOf: getProductionTypeChecker, 50 | mapOf: getProductionTypeChecker, 51 | orderedMapOf: getProductionTypeChecker, 52 | setOf: getProductionTypeChecker, 53 | orderedSetOf: getProductionTypeChecker, 54 | stackOf: getProductionTypeChecker, 55 | iterableOf: getProductionTypeChecker, 56 | recordOf: getProductionTypeChecker, 57 | shape: getProductionTypeChecker, 58 | contains: getProductionTypeChecker, 59 | mapContains: getProductionTypeChecker, 60 | orderedMapContains: getProductionTypeChecker, 61 | // Primitive Types 62 | list: productionTypeChecker, 63 | map: productionTypeChecker, 64 | orderedMap: productionTypeChecker, 65 | set: productionTypeChecker, 66 | orderedSet: productionTypeChecker, 67 | stack: productionTypeChecker, 68 | seq: productionTypeChecker, 69 | record: productionTypeChecker, 70 | iterable: productionTypeChecker 71 | }; 72 | } 73 | 74 | ImmutablePropTypes.iterable.indexed = createIterableSubclassTypeChecker('Indexed', Immutable.Iterable.isIndexed); 75 | ImmutablePropTypes.iterable.keyed = createIterableSubclassTypeChecker('Keyed', Immutable.Iterable.isKeyed); 76 | 77 | function getPropType(propValue) { 78 | var propType = typeof propValue; 79 | if (Array.isArray(propValue)) { 80 | return 'array'; 81 | } 82 | if (propValue instanceof RegExp) { 83 | // Old webkits (at least until Android 4.0) return 'function' rather than 84 | // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ 85 | // passes PropTypes.object. 86 | return 'object'; 87 | } 88 | if (propValue instanceof Immutable.Iterable) { 89 | return 'Immutable.' + propValue.toSource().split(' ')[0]; 90 | } 91 | return propType; 92 | } 93 | 94 | function createChainableTypeChecker(validate) { 95 | function checkType(isRequired, props, propName, componentName, location, propFullName, ...rest) { 96 | propFullName = propFullName || propName; 97 | componentName = componentName || ANONYMOUS; 98 | if (props[propName] == null) { 99 | var locationName = location; 100 | if (isRequired) { 101 | return new Error( 102 | `Required ${locationName} \`${propFullName}\` was not specified in ` + 103 | `\`${componentName}\`.` 104 | ); 105 | } 106 | } else { 107 | return validate(props, propName, componentName, location, propFullName, ...rest); 108 | } 109 | } 110 | 111 | var chainedCheckType = checkType.bind(null, false); 112 | chainedCheckType.isRequired = checkType.bind(null, true); 113 | 114 | return chainedCheckType; 115 | } 116 | 117 | function createImmutableTypeChecker(immutableClassName, immutableClassTypeValidator) { 118 | function validate(props, propName, componentName, location, propFullName) { 119 | var propValue = props[propName]; 120 | if(!immutableClassTypeValidator(propValue)) { 121 | var propType = getPropType(propValue); 122 | return new Error( 123 | `Invalid ${location} \`${propFullName}\` of type \`${propType}\` ` + 124 | `supplied to \`${componentName}\`, expected \`${immutableClassName}\`.` 125 | ); 126 | } 127 | return null; 128 | } 129 | return createChainableTypeChecker(validate); 130 | } 131 | 132 | function createIterableSubclassTypeChecker(subclassName, validator) { 133 | return createImmutableTypeChecker(`Iterable.${subclassName}`, (propValue) => 134 | Immutable.Iterable.isIterable(propValue) && validator(propValue) 135 | ); 136 | } 137 | 138 | function createIterableTypeChecker(typeChecker, immutableClassName, immutableClassTypeValidator) { 139 | 140 | function validate(props, propName, componentName, location, propFullName, ...rest) { 141 | var propValue = props[propName]; 142 | if (!immutableClassTypeValidator(propValue)) { 143 | var locationName = location; 144 | var propType = getPropType(propValue); 145 | return new Error( 146 | `Invalid ${locationName} \`${propFullName}\` of type ` + 147 | `\`${propType}\` supplied to \`${componentName}\`, expected an Immutable.js ${immutableClassName}.` 148 | ); 149 | } 150 | 151 | if (typeof typeChecker !== 'function') { 152 | return new Error( 153 | `Invalid typeChecker supplied to \`${componentName}\` ` + 154 | `for propType \`${propFullName}\`, expected a function.` 155 | ); 156 | } 157 | 158 | var propValues = propValue.valueSeq().toArray(); 159 | for (var i = 0, len = propValues.length; i < len; i++) { 160 | var error = typeChecker(propValues, i, componentName, location, `${propFullName}[${i}]`, ...rest); 161 | if (error instanceof Error) { 162 | return error; 163 | } 164 | } 165 | } 166 | return createChainableTypeChecker(validate); 167 | } 168 | 169 | function createKeysTypeChecker(typeChecker) { 170 | 171 | function validate(props, propName, componentName, location, propFullName, ...rest) { 172 | var propValue = props[propName]; 173 | if (typeof typeChecker !== 'function') { 174 | return new Error( 175 | `Invalid keysTypeChecker (optional second argument) supplied to \`${componentName}\` ` + 176 | `for propType \`${propFullName}\`, expected a function.` 177 | ); 178 | } 179 | 180 | var keys = propValue.keySeq().toArray(); 181 | for (var i = 0, len = keys.length; i < len; i++) { 182 | var error = typeChecker(keys, i, componentName, location, `${propFullName} -> key(${keys[i]})`, ...rest); 183 | if (error instanceof Error) { 184 | return error; 185 | } 186 | } 187 | } 188 | return createChainableTypeChecker(validate); 189 | } 190 | 191 | function createListOfTypeChecker(typeChecker) { 192 | return createIterableTypeChecker(typeChecker, 'List', Immutable.List.isList); 193 | } 194 | 195 | function createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, immutableClassName, immutableClassTypeValidator) { 196 | function validate(...args) { 197 | return createIterableTypeChecker(valuesTypeChecker, immutableClassName, immutableClassTypeValidator)(...args) 198 | || keysTypeChecker && createKeysTypeChecker(keysTypeChecker)(...args) 199 | } 200 | 201 | return createChainableTypeChecker(validate); 202 | } 203 | 204 | function createMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) { 205 | return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, 'Map', Immutable.Map.isMap); 206 | } 207 | 208 | function createOrderedMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) { 209 | return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, 'OrderedMap', Immutable.OrderedMap.isOrderedMap); 210 | } 211 | 212 | function createSetOfTypeChecker(typeChecker) { 213 | return createIterableTypeChecker(typeChecker, 'Set', Immutable.Set.isSet); 214 | } 215 | 216 | function createOrderedSetOfTypeChecker(typeChecker) { 217 | return createIterableTypeChecker(typeChecker, 'OrderedSet', Immutable.OrderedSet.isOrderedSet); 218 | } 219 | 220 | function createStackOfTypeChecker(typeChecker) { 221 | return createIterableTypeChecker(typeChecker, 'Stack', Immutable.Stack.isStack); 222 | } 223 | 224 | function createIterableOfTypeChecker(typeChecker) { 225 | return createIterableTypeChecker(typeChecker, 'Iterable', Immutable.Iterable.isIterable); 226 | } 227 | 228 | function createRecordOfTypeChecker(recordKeys) { 229 | function validate(props, propName, componentName, location, propFullName, ...rest) { 230 | var propValue = props[propName]; 231 | if (!(propValue instanceof Immutable.Record)) { 232 | var propType = getPropType(propValue); 233 | var locationName = location; 234 | return new Error( 235 | `Invalid ${locationName} \`${propFullName}\` of type \`${propType}\` ` + 236 | `supplied to \`${componentName}\`, expected an Immutable.js Record.` 237 | ); 238 | } 239 | for (var key in recordKeys) { 240 | var checker = recordKeys[key]; 241 | if (!checker) { 242 | continue; 243 | } 244 | var mutablePropValue = propValue.toObject(); 245 | var error = checker(mutablePropValue, key, componentName, location, `${propFullName}.${key}`, ...rest); 246 | if (error) { 247 | return error; 248 | } 249 | } 250 | } 251 | return createChainableTypeChecker(validate); 252 | } 253 | 254 | // there is some irony in the fact that shapeTypes is a standard hash and not an immutable collection 255 | function createShapeTypeChecker(shapeTypes, immutableClassName = 'Iterable', immutableClassTypeValidator = Immutable.Iterable.isIterable) { 256 | function validate(props, propName, componentName, location, propFullName, ...rest) { 257 | var propValue = props[propName]; 258 | if (!immutableClassTypeValidator(propValue)) { 259 | var propType = getPropType(propValue); 260 | var locationName = location; 261 | return new Error( 262 | `Invalid ${locationName} \`${propFullName}\` of type \`${propType}\` ` + 263 | `supplied to \`${componentName}\`, expected an Immutable.js ${immutableClassName}.` 264 | ); 265 | } 266 | var mutablePropValue = propValue.toObject(); 267 | for (var key in shapeTypes) { 268 | var checker = shapeTypes[key]; 269 | if (!checker) { 270 | continue; 271 | } 272 | var error = checker(mutablePropValue, key, componentName, location, `${propFullName}.${key}`, ...rest); 273 | if (error) { 274 | return error; 275 | } 276 | } 277 | } 278 | return createChainableTypeChecker(validate); 279 | } 280 | 281 | function createShapeChecker(shapeTypes) { 282 | return createShapeTypeChecker(shapeTypes); 283 | } 284 | 285 | function createMapContainsChecker(shapeTypes) { 286 | return createShapeTypeChecker(shapeTypes, 'Map', Immutable.Map.isMap); 287 | } 288 | 289 | function createOrderedMapContainsChecker(shapeTypes) { 290 | return createShapeTypeChecker(shapeTypes, 'OrderedMap', Immutable.OrderedMap.isOrderedMap); 291 | } 292 | 293 | module.exports = ImmutablePropTypes; 294 | -------------------------------------------------------------------------------- /src/__tests__/ImmutablePropTypes-test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable new-cap */ 2 | import expect from 'expect.js'; 3 | var PropTypes; 4 | var React; 5 | var Immutable; 6 | 7 | var requiredMessage = 8 | 'Required prop `testProp` was not specified in `testComponent`.'; 9 | 10 | function typeCheckFail(declaration, value, message) { 11 | var props = {testProp: value}; 12 | var error = declaration( 13 | props, 14 | 'testProp', 15 | 'testComponent', 16 | 'prop' 17 | ); 18 | expect(error instanceof Error).to.be(true); 19 | expect(error.message).to.be(message); 20 | } 21 | 22 | function typeCheckPass(declaration, value) { 23 | var props = {testProp: value}; 24 | var error = declaration( 25 | props, 26 | 'testProp', 27 | 'testComponent', 28 | 'prop' 29 | ); 30 | expect(error).not.to.be.ok(); 31 | } 32 | 33 | describe('ImmutablePropTypes', function() { 34 | beforeEach(function() { 35 | PropTypes = require('../ImmutablePropTypes'); 36 | React = require('react'); 37 | Immutable = require('immutable'); 38 | }); 39 | 40 | describe('PropTypes config', function() { 41 | it('should fail if typeChecker is not a function', function() { 42 | typeCheckFail( 43 | PropTypes.listOf({x: React.PropTypes.string}), 44 | Immutable.List([Immutable.Map({x: 'y'})]), 45 | 'Invalid typeChecker supplied to ' + 46 | '`testComponent` for propType `testProp`, expected a function.' 47 | ); 48 | typeCheckPass( 49 | PropTypes.listOf(PropTypes.contains({x: React.PropTypes.string})), 50 | Immutable.List([Immutable.Map({x: 'y'})])); 51 | }); 52 | }); 53 | 54 | describe('Primitive Types', function() { 55 | it('should not warn for valid values', function() { 56 | typeCheckPass(PropTypes.list, Immutable.List()); 57 | typeCheckPass(PropTypes.map, Immutable.Map()); 58 | typeCheckPass(PropTypes.map, Immutable.OrderedMap()); 59 | typeCheckPass(PropTypes.orderedMap, Immutable.OrderedMap()); 60 | typeCheckPass(PropTypes.record, new (Immutable.Record({a: 1}))()); 61 | typeCheckPass(PropTypes.set, Immutable.Set()); 62 | typeCheckPass(PropTypes.set, Immutable.OrderedSet()); 63 | typeCheckPass(PropTypes.orderedSet, Immutable.OrderedSet()); 64 | typeCheckPass(PropTypes.stack, Immutable.Stack()); 65 | typeCheckPass(PropTypes.seq, Immutable.Seq()); 66 | typeCheckPass(PropTypes.iterable, Immutable.Iterable()); 67 | typeCheckPass(PropTypes.iterable, Immutable.List()); 68 | typeCheckPass(PropTypes.iterable, Immutable.Map()); 69 | typeCheckPass(PropTypes.iterable, Immutable.OrderedMap()); 70 | typeCheckPass(PropTypes.iterable, Immutable.Set()); 71 | typeCheckPass(PropTypes.iterable, Immutable.OrderedSet()); 72 | typeCheckPass(PropTypes.iterable, Immutable.Stack()); 73 | typeCheckPass(PropTypes.iterable, Immutable.Seq()); 74 | typeCheckPass(PropTypes.iterable, Immutable.Seq()); 75 | typeCheckPass(PropTypes.iterable.indexed, Immutable.Iterable.Indexed()); 76 | typeCheckPass(PropTypes.iterable.indexed, Immutable.List()); 77 | typeCheckPass(PropTypes.iterable.indexed, Immutable.Stack()); 78 | typeCheckPass(PropTypes.iterable.indexed, Immutable.Range()); 79 | typeCheckPass(PropTypes.iterable.indexed, Immutable.Repeat()); 80 | typeCheckPass(PropTypes.iterable.indexed, Immutable.Seq.Indexed()); 81 | typeCheckPass(PropTypes.iterable.keyed, Immutable.Iterable.Keyed()); 82 | typeCheckPass(PropTypes.iterable.keyed, Immutable.Map()); 83 | typeCheckPass(PropTypes.iterable.keyed, Immutable.OrderedMap()); 84 | typeCheckPass(PropTypes.iterable.keyed, new (Immutable.Record({a: 1}))()); 85 | typeCheckPass(PropTypes.iterable.keyed, Immutable.Seq.Keyed()); 86 | }); 87 | it('should warn for invalid lists', function() { 88 | typeCheckFail( 89 | PropTypes.list, 90 | [], 91 | 'Invalid prop `testProp` of type `array` supplied to ' + 92 | '`testComponent`, expected `List`.' 93 | ); 94 | typeCheckFail( 95 | PropTypes.list, 96 | {}, 97 | 'Invalid prop `testProp` of type `object` supplied to ' + 98 | '`testComponent`, expected `List`.' 99 | ); 100 | typeCheckFail( 101 | PropTypes.list, 102 | '', 103 | 'Invalid prop `testProp` of type `string` supplied to ' + 104 | '`testComponent`, expected `List`.' 105 | ); 106 | typeCheckFail( 107 | PropTypes.list, 108 | false, 109 | 'Invalid prop `testProp` of type `boolean` supplied to ' + 110 | '`testComponent`, expected `List`.' 111 | ); 112 | typeCheckFail( 113 | PropTypes.list, 114 | 0, 115 | 'Invalid prop `testProp` of type `number` supplied to ' + 116 | '`testComponent`, expected `List`.' 117 | ); 118 | typeCheckFail( 119 | PropTypes.list, 120 | Immutable.Map(), 121 | 'Invalid prop `testProp` of type `Immutable.Map` supplied to ' + 122 | '`testComponent`, expected `List`.' 123 | ); 124 | typeCheckFail( 125 | PropTypes.list, 126 | Immutable.Iterable(), 127 | 'Invalid prop `testProp` of type `Immutable.Seq` supplied to ' + 128 | '`testComponent`, expected `List`.' 129 | ); 130 | }); 131 | it('should warn for invalid maps', function() { 132 | typeCheckFail( 133 | PropTypes.map, 134 | [], 135 | 'Invalid prop `testProp` of type `array` supplied to ' + 136 | '`testComponent`, expected `Map`.' 137 | ); 138 | typeCheckFail( 139 | PropTypes.map, 140 | {}, 141 | 'Invalid prop `testProp` of type `object` supplied to ' + 142 | '`testComponent`, expected `Map`.' 143 | ); 144 | typeCheckFail( 145 | PropTypes.map, 146 | '', 147 | 'Invalid prop `testProp` of type `string` supplied to ' + 148 | '`testComponent`, expected `Map`.' 149 | ); 150 | typeCheckFail( 151 | PropTypes.map, 152 | false, 153 | 'Invalid prop `testProp` of type `boolean` supplied to ' + 154 | '`testComponent`, expected `Map`.' 155 | ); 156 | typeCheckFail( 157 | PropTypes.map, 158 | 0, 159 | 'Invalid prop `testProp` of type `number` supplied to ' + 160 | '`testComponent`, expected `Map`.' 161 | ); 162 | typeCheckFail( 163 | PropTypes.map, 164 | Immutable.List(), 165 | 'Invalid prop `testProp` of type `Immutable.List` supplied to ' + 166 | '`testComponent`, expected `Map`.' 167 | ); 168 | typeCheckFail( 169 | PropTypes.map, 170 | Immutable.Iterable(), 171 | 'Invalid prop `testProp` of type `Immutable.Seq` supplied to ' + 172 | '`testComponent`, expected `Map`.' 173 | ); 174 | }); 175 | it('should warn for invalid records', function() { 176 | typeCheckFail( 177 | PropTypes.record, 178 | [], 179 | 'Invalid prop `testProp` of type `array` supplied to ' + 180 | '`testComponent`, expected `Record`.' 181 | ); 182 | typeCheckFail( 183 | PropTypes.record, 184 | {}, 185 | 'Invalid prop `testProp` of type `object` supplied to ' + 186 | '`testComponent`, expected `Record`.' 187 | ); 188 | typeCheckFail( 189 | PropTypes.record, 190 | '', 191 | 'Invalid prop `testProp` of type `string` supplied to ' + 192 | '`testComponent`, expected `Record`.' 193 | ); 194 | typeCheckFail( 195 | PropTypes.record, 196 | false, 197 | 'Invalid prop `testProp` of type `boolean` supplied to ' + 198 | '`testComponent`, expected `Record`.' 199 | ); 200 | typeCheckFail( 201 | PropTypes.record, 202 | 0, 203 | 'Invalid prop `testProp` of type `number` supplied to ' + 204 | '`testComponent`, expected `Record`.' 205 | ); 206 | typeCheckFail( 207 | PropTypes.record, 208 | Immutable.List(), 209 | 'Invalid prop `testProp` of type `Immutable.List` supplied to ' + 210 | '`testComponent`, expected `Record`.' 211 | ); 212 | typeCheckFail( 213 | PropTypes.record, 214 | Immutable.Iterable(), 215 | 'Invalid prop `testProp` of type `Immutable.Seq` supplied to ' + 216 | '`testComponent`, expected `Record`.' 217 | ); 218 | }); 219 | it('should warn for invalid iterables', function() { 220 | typeCheckFail( 221 | PropTypes.iterable, 222 | [], 223 | 'Invalid prop `testProp` of type `array` supplied to ' + 224 | '`testComponent`, expected `Iterable`.' 225 | ); 226 | typeCheckFail( 227 | PropTypes.iterable, 228 | {}, 229 | 'Invalid prop `testProp` of type `object` supplied to ' + 230 | '`testComponent`, expected `Iterable`.' 231 | ); 232 | typeCheckFail( 233 | PropTypes.iterable, 234 | '', 235 | 'Invalid prop `testProp` of type `string` supplied to ' + 236 | '`testComponent`, expected `Iterable`.' 237 | ); 238 | typeCheckFail( 239 | PropTypes.iterable, 240 | false, 241 | 'Invalid prop `testProp` of type `boolean` supplied to ' + 242 | '`testComponent`, expected `Iterable`.' 243 | ); 244 | typeCheckFail( 245 | PropTypes.iterable, 246 | 0, 247 | 'Invalid prop `testProp` of type `number` supplied to ' + 248 | '`testComponent`, expected `Iterable`.' 249 | ); 250 | }); 251 | it('should warn for invalid indexed iterables', function() { 252 | typeCheckFail( 253 | PropTypes.iterable.indexed, 254 | [], 255 | 'Invalid prop `testProp` of type `array` supplied to ' + 256 | '`testComponent`, expected `Iterable.Indexed`.' 257 | ); 258 | typeCheckFail( 259 | PropTypes.iterable.indexed, 260 | {}, 261 | 'Invalid prop `testProp` of type `object` supplied to ' + 262 | '`testComponent`, expected `Iterable.Indexed`.' 263 | ); 264 | typeCheckFail( 265 | PropTypes.iterable.indexed, 266 | '', 267 | 'Invalid prop `testProp` of type `string` supplied to ' + 268 | '`testComponent`, expected `Iterable.Indexed`.' 269 | ); 270 | typeCheckFail( 271 | PropTypes.iterable.indexed, 272 | false, 273 | 'Invalid prop `testProp` of type `boolean` supplied to ' + 274 | '`testComponent`, expected `Iterable.Indexed`.' 275 | ); 276 | typeCheckFail( 277 | PropTypes.iterable.indexed, 278 | 0, 279 | 'Invalid prop `testProp` of type `number` supplied to ' + 280 | '`testComponent`, expected `Iterable.Indexed`.' 281 | ); 282 | typeCheckFail( 283 | PropTypes.iterable.indexed, 284 | 0, 285 | 'Invalid prop `testProp` of type `number` supplied to ' + 286 | '`testComponent`, expected `Iterable.Indexed`.' 287 | ); 288 | typeCheckFail( 289 | PropTypes.iterable.indexed, 290 | Immutable.Map(), 291 | 'Invalid prop `testProp` of type `Immutable.Map` supplied to ' + 292 | '`testComponent`, expected `Iterable.Indexed`.' 293 | ); 294 | typeCheckFail( 295 | PropTypes.iterable.indexed, 296 | Immutable.Set(), 297 | 'Invalid prop `testProp` of type `Immutable.Set` supplied to ' + 298 | '`testComponent`, expected `Iterable.Indexed`.' 299 | ); 300 | typeCheckFail( 301 | PropTypes.iterable.indexed, 302 | new (Immutable.Record({a: 1}))(), 303 | 'Invalid prop `testProp` of type `Immutable.Record` supplied to ' + 304 | '`testComponent`, expected `Iterable.Indexed`.' 305 | ); 306 | }); 307 | it('should warn for invalid keyed iterables', function() { 308 | typeCheckFail( 309 | PropTypes.iterable.keyed, 310 | [], 311 | 'Invalid prop `testProp` of type `array` supplied to ' + 312 | '`testComponent`, expected `Iterable.Keyed`.' 313 | ); 314 | typeCheckFail( 315 | PropTypes.iterable.keyed, 316 | {}, 317 | 'Invalid prop `testProp` of type `object` supplied to ' + 318 | '`testComponent`, expected `Iterable.Keyed`.' 319 | ); 320 | typeCheckFail( 321 | PropTypes.iterable.keyed, 322 | '', 323 | 'Invalid prop `testProp` of type `string` supplied to ' + 324 | '`testComponent`, expected `Iterable.Keyed`.' 325 | ); 326 | typeCheckFail( 327 | PropTypes.iterable.keyed, 328 | false, 329 | 'Invalid prop `testProp` of type `boolean` supplied to ' + 330 | '`testComponent`, expected `Iterable.Keyed`.' 331 | ); 332 | typeCheckFail( 333 | PropTypes.iterable.keyed, 334 | 0, 335 | 'Invalid prop `testProp` of type `number` supplied to ' + 336 | '`testComponent`, expected `Iterable.Keyed`.' 337 | ); 338 | typeCheckFail( 339 | PropTypes.iterable.keyed, 340 | 0, 341 | 'Invalid prop `testProp` of type `number` supplied to ' + 342 | '`testComponent`, expected `Iterable.Keyed`.' 343 | ); 344 | typeCheckFail( 345 | PropTypes.iterable.keyed, 346 | Immutable.List(), 347 | 'Invalid prop `testProp` of type `Immutable.List` supplied to ' + 348 | '`testComponent`, expected `Iterable.Keyed`.' 349 | ); 350 | typeCheckFail( 351 | PropTypes.iterable.keyed, 352 | Immutable.Set(), 353 | 'Invalid prop `testProp` of type `Immutable.Set` supplied to ' + 354 | '`testComponent`, expected `Iterable.Keyed`.' 355 | ); 356 | typeCheckFail( 357 | PropTypes.iterable.keyed, 358 | Immutable.OrderedSet(), 359 | 'Invalid prop `testProp` of type `Immutable.OrderedSet` supplied to ' + 360 | '`testComponent`, expected `Iterable.Keyed`.' 361 | ); 362 | typeCheckFail( 363 | PropTypes.iterable.keyed, 364 | Immutable.Stack(), 365 | 'Invalid prop `testProp` of type `Immutable.Stack` supplied to ' + 366 | '`testComponent`, expected `Iterable.Keyed`.' 367 | ); 368 | typeCheckFail( 369 | PropTypes.iterable.keyed, 370 | Immutable.Range(), 371 | 'Invalid prop `testProp` of type `Immutable.Range` supplied to ' + 372 | '`testComponent`, expected `Iterable.Keyed`.' 373 | ); 374 | typeCheckFail( 375 | PropTypes.iterable.keyed, 376 | Immutable.Repeat(), 377 | 'Invalid prop `testProp` of type `Immutable.Repeat` supplied to ' + 378 | '`testComponent`, expected `Iterable.Keyed`.' 379 | ); 380 | }); 381 | it('should be implicitly optional and not warn without values', function() { 382 | typeCheckPass(PropTypes.list, null); 383 | typeCheckPass(PropTypes.list, undefined); 384 | }); 385 | it('should warn for missing required values', function() { 386 | typeCheckFail(PropTypes.list.isRequired, null, requiredMessage); 387 | typeCheckFail(PropTypes.list.isRequired, undefined, requiredMessage); 388 | }); 389 | }); 390 | 391 | describe('ListOf Type', function() { 392 | it('should support the listOf propTypes', function() { 393 | typeCheckPass(PropTypes.listOf(React.PropTypes.number), Immutable.List([1, 2, 3])); 394 | typeCheckPass(PropTypes.listOf(React.PropTypes.string), Immutable.List(['a', 'b', 'c'])); 395 | typeCheckPass(PropTypes.listOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.List(['a', 'b'])); 396 | }); 397 | 398 | it('should support listOf with complex types', function() { 399 | typeCheckPass( 400 | PropTypes.listOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 401 | Immutable.List([{a: 1}, {a: 2}]) 402 | ); 403 | 404 | typeCheckPass( 405 | PropTypes.listOf(PropTypes.shape({a: React.PropTypes.number.isRequired})), 406 | Immutable.fromJS([{a: 1}, {a: 2}]) 407 | ); 408 | 409 | function Thing() {} 410 | typeCheckPass( 411 | PropTypes.listOf(React.PropTypes.instanceOf(Thing)), 412 | Immutable.List([new Thing(), new Thing()]) 413 | ); 414 | }); 415 | 416 | it('should warn with invalid items in the list', function() { 417 | typeCheckFail( 418 | PropTypes.listOf(React.PropTypes.number), 419 | Immutable.List([1, 2, 'b']), 420 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 421 | 'expected `number`.' 422 | ); 423 | }); 424 | 425 | it('should warn with invalid complex types', function() { 426 | function Thing() {} 427 | var name = Thing.name || '<>'; 428 | 429 | typeCheckFail( 430 | PropTypes.listOf(React.PropTypes.instanceOf(Thing)), 431 | Immutable.List([new Thing(), 'xyz']), 432 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 433 | name + '`.' 434 | ); 435 | }); 436 | 437 | it('should warn when passed something other than an Immutable.List', function() { 438 | typeCheckFail( 439 | PropTypes.listOf(React.PropTypes.number), 440 | {'0': 'maybe-array', length: 1}, 441 | 'Invalid prop `testProp` of type `object` supplied to ' + 442 | '`testComponent`, expected an Immutable.js List.' 443 | ); 444 | typeCheckFail( 445 | PropTypes.listOf(React.PropTypes.number), 446 | 123, 447 | 'Invalid prop `testProp` of type `number` supplied to ' + 448 | '`testComponent`, expected an Immutable.js List.' 449 | ); 450 | typeCheckFail( 451 | PropTypes.listOf(React.PropTypes.number), 452 | 'string', 453 | 'Invalid prop `testProp` of type `string` supplied to ' + 454 | '`testComponent`, expected an Immutable.js List.' 455 | ); 456 | typeCheckFail( 457 | PropTypes.listOf(React.PropTypes.number), 458 | [1, 2, 3], 459 | 'Invalid prop `testProp` of type `array` supplied to ' + 460 | '`testComponent`, expected an Immutable.js List.' 461 | ); 462 | }); 463 | 464 | it('should not warn when passing an empty array', function() { 465 | typeCheckPass(PropTypes.listOf(React.PropTypes.number), Immutable.List()); 466 | typeCheckPass(PropTypes.listOf(React.PropTypes.number), Immutable.List([])); 467 | }); 468 | 469 | it('should be implicitly optional and not warn without values', function() { 470 | typeCheckPass(PropTypes.listOf(React.PropTypes.number), null); 471 | typeCheckPass(PropTypes.listOf(React.PropTypes.number), undefined); 472 | }); 473 | 474 | it('should warn for missing required values', function() { 475 | typeCheckFail( 476 | PropTypes.listOf(React.PropTypes.number).isRequired, 477 | null, 478 | requiredMessage 479 | ); 480 | typeCheckFail( 481 | PropTypes.listOf(React.PropTypes.number).isRequired, 482 | undefined, 483 | requiredMessage 484 | ); 485 | }); 486 | }); 487 | 488 | describe('StackOf Type', function() { 489 | it('should support the stackOf propTypes', function() { 490 | typeCheckPass(PropTypes.stackOf(React.PropTypes.number), Immutable.Stack([1, 2, 3])); 491 | typeCheckPass(PropTypes.stackOf(React.PropTypes.string), Immutable.Stack(['a', 'b', 'c'])); 492 | typeCheckPass(PropTypes.stackOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.Stack(['a', 'b'])); 493 | }); 494 | 495 | it('should support stackOf with complex types', function() { 496 | typeCheckPass( 497 | PropTypes.stackOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 498 | Immutable.Stack([{a: 1}, {a: 2}]) 499 | ); 500 | 501 | function Thing() {} 502 | typeCheckPass( 503 | PropTypes.stackOf(React.PropTypes.instanceOf(Thing)), 504 | Immutable.Stack([new Thing(), new Thing()]) 505 | ); 506 | }); 507 | 508 | it('should warn with invalid items in the list', function() { 509 | typeCheckFail( 510 | PropTypes.stackOf(React.PropTypes.number), 511 | Immutable.Stack([1, 2, 'b']), 512 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 513 | 'expected `number`.' 514 | ); 515 | }); 516 | 517 | it('should warn with invalid complex types', function() { 518 | function Thing() {} 519 | var name = Thing.name || '<>'; 520 | 521 | typeCheckFail( 522 | PropTypes.stackOf(React.PropTypes.instanceOf(Thing)), 523 | Immutable.Stack([new Thing(), 'xyz']), 524 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 525 | name + '`.' 526 | ); 527 | }); 528 | 529 | it('should warn when passed something other than an Immutable.Stack', function() { 530 | typeCheckFail( 531 | PropTypes.stackOf(React.PropTypes.number), 532 | {'0': 'maybe-array', length: 1}, 533 | 'Invalid prop `testProp` of type `object` supplied to ' + 534 | '`testComponent`, expected an Immutable.js Stack.' 535 | ); 536 | typeCheckFail( 537 | PropTypes.stackOf(React.PropTypes.number), 538 | 123, 539 | 'Invalid prop `testProp` of type `number` supplied to ' + 540 | '`testComponent`, expected an Immutable.js Stack.' 541 | ); 542 | typeCheckFail( 543 | PropTypes.stackOf(React.PropTypes.number), 544 | 'string', 545 | 'Invalid prop `testProp` of type `string` supplied to ' + 546 | '`testComponent`, expected an Immutable.js Stack.' 547 | ); 548 | typeCheckFail( 549 | PropTypes.stackOf(React.PropTypes.number), 550 | [1, 2, 3], 551 | 'Invalid prop `testProp` of type `array` supplied to ' + 552 | '`testComponent`, expected an Immutable.js Stack.' 553 | ); 554 | }); 555 | 556 | it('should not warn when passing an empty array', function() { 557 | typeCheckPass(PropTypes.stackOf(React.PropTypes.number), Immutable.Stack()); 558 | typeCheckPass(PropTypes.stackOf(React.PropTypes.number), Immutable.Stack([])); 559 | }); 560 | 561 | it('should be implicitly optional and not warn without values', function() { 562 | typeCheckPass(PropTypes.stackOf(React.PropTypes.number), null); 563 | typeCheckPass(PropTypes.stackOf(React.PropTypes.number), undefined); 564 | }); 565 | 566 | it('should warn for missing required values', function() { 567 | typeCheckFail( 568 | PropTypes.stackOf(React.PropTypes.number).isRequired, 569 | null, 570 | requiredMessage 571 | ); 572 | typeCheckFail( 573 | PropTypes.stackOf(React.PropTypes.number).isRequired, 574 | undefined, 575 | requiredMessage 576 | ); 577 | }); 578 | }); 579 | 580 | describe('MapOf Type', function() { 581 | it('should support the mapOf propTypes', function() { 582 | typeCheckPass(PropTypes.mapOf(React.PropTypes.number), Immutable.Map({1: 1, 2: 2, 3: 3})); 583 | typeCheckPass(PropTypes.mapOf(React.PropTypes.string), Immutable.Map({1: 'a', 2: 'b', 3: 'c'})); 584 | typeCheckPass(PropTypes.mapOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.Map({1: 'a', 2: 'b'})); 585 | }); 586 | 587 | it('should support mapOf with complex types', function() { 588 | typeCheckPass( 589 | PropTypes.mapOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 590 | Immutable.Map({1: {a: 1}, 2: {a: 2}}) 591 | ); 592 | 593 | typeCheckPass( 594 | PropTypes.mapOf(PropTypes.shape({a: React.PropTypes.number.isRequired})), 595 | Immutable.fromJS({1: {a: 1}, 2: {a: 2}}) 596 | ); 597 | 598 | function Thing() {} 599 | typeCheckPass( 600 | PropTypes.mapOf(React.PropTypes.instanceOf(Thing)), 601 | Immutable.Map({ 1: new Thing(), 2: new Thing() }) 602 | ); 603 | }); 604 | 605 | it('should warn with invalid items in the map', function() { 606 | typeCheckFail( 607 | PropTypes.mapOf(React.PropTypes.number), 608 | Immutable.Map({ 1: 1, 2: 2, 3: 'b' }), 609 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 610 | 'expected `number`.' 611 | ); 612 | }); 613 | 614 | it('should warn with invalid complex types', function() { 615 | function Thing() {} 616 | var name = Thing.name || '<>'; 617 | 618 | typeCheckFail( 619 | PropTypes.mapOf(React.PropTypes.instanceOf(Thing)), 620 | Immutable.Map({ 1: new Thing(), 2: 'xyz' }), 621 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 622 | name + '`.' 623 | ); 624 | }); 625 | 626 | it('should warn when passed something other than an Immutable.Map', function() { 627 | typeCheckFail( 628 | PropTypes.mapOf(React.PropTypes.number), 629 | {'0': 'maybe-array', length: 1}, 630 | 'Invalid prop `testProp` of type `object` supplied to ' + 631 | '`testComponent`, expected an Immutable.js Map.' 632 | ); 633 | typeCheckFail( 634 | PropTypes.mapOf(React.PropTypes.number), 635 | 123, 636 | 'Invalid prop `testProp` of type `number` supplied to ' + 637 | '`testComponent`, expected an Immutable.js Map.' 638 | ); 639 | typeCheckFail( 640 | PropTypes.mapOf(React.PropTypes.number), 641 | 'string', 642 | 'Invalid prop `testProp` of type `string` supplied to ' + 643 | '`testComponent`, expected an Immutable.js Map.' 644 | ); 645 | typeCheckFail( 646 | PropTypes.mapOf(React.PropTypes.number), 647 | [1, 2, 3], 648 | 'Invalid prop `testProp` of type `array` supplied to ' + 649 | '`testComponent`, expected an Immutable.js Map.' 650 | ); 651 | }); 652 | 653 | it('should not warn when passing an empty object', function() { 654 | typeCheckPass(PropTypes.mapOf(React.PropTypes.number), Immutable.Map()); 655 | typeCheckPass(PropTypes.mapOf(React.PropTypes.number), Immutable.Map({})); 656 | }); 657 | 658 | it('should be implicitly optional and not warn without values', function() { 659 | typeCheckPass(PropTypes.mapOf(React.PropTypes.number), null); 660 | typeCheckPass(PropTypes.mapOf(React.PropTypes.number), undefined); 661 | }); 662 | 663 | it('should warn for missing required values', function() { 664 | typeCheckFail( 665 | PropTypes.mapOf(React.PropTypes.number).isRequired, 666 | null, 667 | requiredMessage 668 | ); 669 | typeCheckFail( 670 | PropTypes.mapOf(React.PropTypes.number).isRequired, 671 | undefined, 672 | requiredMessage 673 | ); 674 | }); 675 | 676 | it('should support keys validation by passing typeChecker as a second argument', function() { 677 | typeCheckPass( 678 | PropTypes.mapOf( 679 | React.PropTypes.any, 680 | React.PropTypes.string 681 | ), 682 | Immutable.Map({a: 1, b: 2}) 683 | ); 684 | typeCheckPass( 685 | PropTypes.mapOf( 686 | React.PropTypes.any, 687 | React.PropTypes.number 688 | ), 689 | Immutable.Map([[1, 1], [1, 2]]) 690 | ); 691 | typeCheckPass( 692 | PropTypes.mapOf( 693 | React.PropTypes.any, 694 | React.PropTypes.function 695 | ), 696 | Immutable.Map([[() => 1 + 1, 1], [(foo) => 'bar', 2]]) 697 | ); 698 | }); 699 | 700 | it('should support keys validation with Immutable keys', function() { 701 | typeCheckPass( 702 | PropTypes.mapOf( 703 | React.PropTypes.any, 704 | PropTypes.mapContains({ 705 | a: React.PropTypes.number.isRequired, 706 | b: React.PropTypes.string 707 | }) 708 | ), 709 | Immutable.Map([ 710 | [Immutable.Map({a: 1, b: '2'}), 1], 711 | [Immutable.Map({a: 3}), 2] 712 | ]) 713 | ); 714 | }); 715 | 716 | it('should warn with invalid keys in the map', function() { 717 | typeCheckFail( 718 | PropTypes.mapOf( 719 | React.PropTypes.any, 720 | React.PropTypes.number 721 | ), 722 | Immutable.Map({a: 1, b: 2}), 723 | 'Invalid prop `testProp -> key(a)` of type `string` supplied to `testComponent`, ' + 724 | 'expected `number`.' 725 | ); 726 | 727 | typeCheckFail( 728 | PropTypes.mapOf( 729 | React.PropTypes.any, 730 | React.PropTypes.string 731 | ), 732 | Immutable.Map([ 733 | [{a: 1}, 2], 734 | ['a', 1] 735 | ]), 736 | 'Invalid prop `testProp -> key([object Object])` of type `object` supplied to `testComponent`, ' + 737 | 'expected `string`.' 738 | ); 739 | }); 740 | 741 | it('should cause inner warning with invalid immutable key in the map', function() { 742 | typeCheckFail( 743 | PropTypes.mapOf( 744 | React.PropTypes.any, 745 | PropTypes.mapContains({ 746 | a: React.PropTypes.number.isRequired, 747 | b: React.PropTypes.string 748 | }) 749 | ), 750 | Immutable.Map([ 751 | [Immutable.Map({b: '2'}), 1], 752 | [Immutable.Map({a: 3}), 2] 753 | ]), 754 | 'Required prop `testProp -> key(Map { "b": "2" }).a` was not specified in `testComponent`.' 755 | ); 756 | }); 757 | }); 758 | 759 | describe('OrderedMapOf Type', function() { 760 | it('should support the orderedMapOf propTypes', function() { 761 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.number), Immutable.OrderedMap({1: 1, 2: 2, 3: 3})); 762 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.string), Immutable.OrderedMap({1: 'a', 2: 'b', 3: 'c'})); 763 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.OrderedMap({1: 'a', 2: 'b'})); 764 | }); 765 | 766 | it('should support orderedMapOf with complex types', function() { 767 | typeCheckPass( 768 | PropTypes.orderedMapOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 769 | Immutable.OrderedMap({1: {a: 1}, 2: {a: 2}}) 770 | ); 771 | 772 | typeCheckPass( 773 | PropTypes.orderedMapOf(PropTypes.shape({a: React.PropTypes.number.isRequired})), 774 | Immutable.fromJS({1: {a: 1}, 2: {a: 2}}).toOrderedMap() 775 | ); 776 | 777 | function Thing() {} 778 | typeCheckPass( 779 | PropTypes.orderedMapOf(React.PropTypes.instanceOf(Thing)), 780 | Immutable.OrderedMap({ 1: new Thing(), 2: new Thing() }) 781 | ); 782 | }); 783 | 784 | it('should warn with invalid items in the map', function() { 785 | typeCheckFail( 786 | PropTypes.orderedMapOf(React.PropTypes.number), 787 | Immutable.OrderedMap({ 1: 1, 2: 2, 3: 'b' }), 788 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 789 | 'expected `number`.' 790 | ); 791 | }); 792 | 793 | it('should warn with invalid complex types', function() { 794 | function Thing() {} 795 | var name = Thing.name || '<>'; 796 | 797 | typeCheckFail( 798 | PropTypes.orderedMapOf(React.PropTypes.instanceOf(Thing)), 799 | Immutable.OrderedMap({ 1: new Thing(), 2: 'xyz' }), 800 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 801 | name + '`.' 802 | ); 803 | }); 804 | 805 | it('should warn when passed something other than an Immutable.OrderedMap', function() { 806 | typeCheckFail( 807 | PropTypes.orderedMapOf(React.PropTypes.number), 808 | {'0': 'maybe-array', length: 1}, 809 | 'Invalid prop `testProp` of type `object` supplied to ' + 810 | '`testComponent`, expected an Immutable.js OrderedMap.' 811 | ); 812 | typeCheckFail( 813 | PropTypes.orderedMapOf(React.PropTypes.number), 814 | 123, 815 | 'Invalid prop `testProp` of type `number` supplied to ' + 816 | '`testComponent`, expected an Immutable.js OrderedMap.' 817 | ); 818 | typeCheckFail( 819 | PropTypes.orderedMapOf(React.PropTypes.number), 820 | 'string', 821 | 'Invalid prop `testProp` of type `string` supplied to ' + 822 | '`testComponent`, expected an Immutable.js OrderedMap.' 823 | ); 824 | typeCheckFail( 825 | PropTypes.orderedMapOf(React.PropTypes.number), 826 | [1, 2, 3], 827 | 'Invalid prop `testProp` of type `array` supplied to ' + 828 | '`testComponent`, expected an Immutable.js OrderedMap.' 829 | ); 830 | typeCheckFail( 831 | PropTypes.orderedMapOf(React.PropTypes.number), 832 | Immutable.fromJS({a: 1, b: 2 }), 833 | 'Invalid prop `testProp` of type `Immutable.Map` supplied to ' + 834 | '`testComponent`, expected an Immutable.js OrderedMap.' 835 | ); 836 | }); 837 | 838 | it('should not warn when passing an empty object', function() { 839 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.number), Immutable.OrderedMap()); 840 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.number), Immutable.OrderedMap({})); 841 | }); 842 | 843 | it('should be implicitly optional and not warn without values', function() { 844 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.number), null); 845 | typeCheckPass(PropTypes.orderedMapOf(React.PropTypes.number), undefined); 846 | }); 847 | 848 | it('should warn for missing required values', function() { 849 | typeCheckFail( 850 | PropTypes.orderedMapOf(React.PropTypes.number).isRequired, 851 | null, 852 | requiredMessage 853 | ); 854 | typeCheckFail( 855 | PropTypes.orderedMapOf(React.PropTypes.number).isRequired, 856 | undefined, 857 | requiredMessage 858 | ); 859 | }); 860 | 861 | it('should support keys validation by passing typeChecker as a second argument', function() { 862 | typeCheckPass( 863 | PropTypes.orderedMapOf( 864 | React.PropTypes.any, 865 | React.PropTypes.string 866 | ), 867 | Immutable.OrderedMap({a: 1, b: 2}) 868 | ); 869 | typeCheckPass( 870 | PropTypes.orderedMapOf( 871 | React.PropTypes.any, 872 | React.PropTypes.number 873 | ), 874 | Immutable.OrderedMap([[1, 1], [1, 2]]) 875 | ); 876 | typeCheckPass( 877 | PropTypes.orderedMapOf( 878 | React.PropTypes.any, 879 | React.PropTypes.function 880 | ), 881 | Immutable.OrderedMap([[() => 1 + 1, 1], [(foo) => 'bar', 2]]) 882 | ); 883 | }); 884 | 885 | it('should support keys validation with Immutable keys', function() { 886 | typeCheckPass( 887 | PropTypes.orderedMapOf( 888 | React.PropTypes.any, 889 | PropTypes.mapContains({ 890 | a: React.PropTypes.number.isRequired, 891 | b: React.PropTypes.string 892 | }) 893 | ), 894 | Immutable.OrderedMap([ 895 | [Immutable.Map({a: 1, b: '2'}), 1], 896 | [Immutable.Map({a: 3}), 2] 897 | ]) 898 | ); 899 | }); 900 | 901 | it('should warn with invalid keys in the map', function() { 902 | typeCheckFail( 903 | PropTypes.orderedMapOf( 904 | React.PropTypes.any, 905 | React.PropTypes.number 906 | ), 907 | Immutable.OrderedMap({a: 1, b: 2}), 908 | 'Invalid prop `testProp -> key(a)` of type `string` supplied to `testComponent`, ' + 909 | 'expected `number`.' 910 | ); 911 | 912 | typeCheckFail( 913 | PropTypes.orderedMapOf( 914 | React.PropTypes.any, 915 | React.PropTypes.string 916 | ), 917 | Immutable.OrderedMap([ 918 | [{a: 1}, 2], 919 | ['a', 1] 920 | ]), 921 | 'Invalid prop `testProp -> key([object Object])` of type `object` supplied to `testComponent`, ' + 922 | 'expected `string`.' 923 | ); 924 | }); 925 | 926 | it('should cause inner warning with invalid immutable key in the map', function() { 927 | typeCheckFail( 928 | PropTypes.orderedMapOf( 929 | React.PropTypes.any, 930 | PropTypes.mapContains({ 931 | a: React.PropTypes.number.isRequired, 932 | b: React.PropTypes.string 933 | }) 934 | ), 935 | Immutable.OrderedMap([ 936 | [Immutable.Map({b: '2'}), 1], 937 | [Immutable.Map({a: 3}), 2] 938 | ]), 939 | 'Required prop `testProp -> key(Map { "b": "2" }).a` was not specified in `testComponent`.' 940 | ); 941 | }); 942 | }); 943 | 944 | describe('SetOf Type', function() { 945 | it('should support the setOf propTypes', function() { 946 | typeCheckPass(PropTypes.setOf(React.PropTypes.number), Immutable.Set([1, 2, 3])); 947 | typeCheckPass(PropTypes.setOf(React.PropTypes.string), Immutable.Set(['a', 'b', 'c'])); 948 | typeCheckPass(PropTypes.setOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.Set(['a', 'b'])); 949 | }); 950 | 951 | it('should support setOf with complex types', function() { 952 | typeCheckPass( 953 | PropTypes.setOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 954 | Immutable.Set([{a: 1}, {a: 2}]) 955 | ); 956 | 957 | function Thing() {} 958 | typeCheckPass( 959 | PropTypes.setOf(React.PropTypes.instanceOf(Thing)), 960 | Immutable.Set([new Thing(), new Thing() ]) 961 | ); 962 | }); 963 | 964 | it('should warn with invalid items in the set', function() { 965 | typeCheckFail( 966 | PropTypes.setOf(React.PropTypes.number), 967 | Immutable.Set([1, 2, 'b']), 968 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 969 | 'expected `number`.' 970 | ); 971 | }); 972 | 973 | it('should warn with invalid complex types', function() { 974 | function Thing() {} 975 | var name = Thing.name || '<>'; 976 | 977 | typeCheckFail( 978 | PropTypes.setOf(React.PropTypes.instanceOf(Thing)), 979 | Immutable.Set([new Thing(), 'xyz' ]), 980 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 981 | name + '`.' 982 | ); 983 | }); 984 | 985 | it('should warn when passed something other than an Immutable.Set', function() { 986 | typeCheckFail( 987 | PropTypes.setOf(React.PropTypes.number), 988 | {'0': 'maybe-array', length: 1}, 989 | 'Invalid prop `testProp` of type `object` supplied to ' + 990 | '`testComponent`, expected an Immutable.js Set.' 991 | ); 992 | typeCheckFail( 993 | PropTypes.setOf(React.PropTypes.number), 994 | 123, 995 | 'Invalid prop `testProp` of type `number` supplied to ' + 996 | '`testComponent`, expected an Immutable.js Set.' 997 | ); 998 | typeCheckFail( 999 | PropTypes.setOf(React.PropTypes.number), 1000 | 'string', 1001 | 'Invalid prop `testProp` of type `string` supplied to ' + 1002 | '`testComponent`, expected an Immutable.js Set.' 1003 | ); 1004 | typeCheckFail( 1005 | PropTypes.setOf(React.PropTypes.number), 1006 | [1, 2, 3], 1007 | 'Invalid prop `testProp` of type `array` supplied to ' + 1008 | '`testComponent`, expected an Immutable.js Set.' 1009 | ); 1010 | }); 1011 | 1012 | it('should not warn when passing an empty object', function() { 1013 | typeCheckPass(PropTypes.setOf(React.PropTypes.number), Immutable.Set()); 1014 | typeCheckPass(PropTypes.setOf(React.PropTypes.number), Immutable.Set([])); 1015 | }); 1016 | 1017 | it('should be implicitly optional and not warn without values', function() { 1018 | typeCheckPass(PropTypes.setOf(React.PropTypes.number), null); 1019 | typeCheckPass(PropTypes.setOf(React.PropTypes.number), undefined); 1020 | }); 1021 | 1022 | it('should warn for missing required values', function() { 1023 | typeCheckFail( 1024 | PropTypes.setOf(React.PropTypes.number).isRequired, 1025 | null, 1026 | requiredMessage 1027 | ); 1028 | typeCheckFail( 1029 | PropTypes.setOf(React.PropTypes.number).isRequired, 1030 | undefined, 1031 | requiredMessage 1032 | ); 1033 | }); 1034 | }); 1035 | 1036 | describe('OrderedSetOf Type', function() { 1037 | it('should support the orderedSetOf propTypes', function() { 1038 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.number), Immutable.OrderedSet([1, 2, 3])); 1039 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.string), Immutable.OrderedSet(['a', 'b', 'c'])); 1040 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.OrderedSet(['a', 'b'])); 1041 | }); 1042 | 1043 | it('should support orderedSetOf with complex types', function() { 1044 | typeCheckPass( 1045 | PropTypes.orderedSetOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 1046 | Immutable.OrderedSet([{a: 1}, {a: 2}]) 1047 | ); 1048 | 1049 | function Thing() {} 1050 | typeCheckPass( 1051 | PropTypes.orderedSetOf(React.PropTypes.instanceOf(Thing)), 1052 | Immutable.OrderedSet([new Thing(), new Thing() ]) 1053 | ); 1054 | }); 1055 | 1056 | it('should warn with invalid items in the set', function() { 1057 | typeCheckFail( 1058 | PropTypes.orderedSetOf(React.PropTypes.number), 1059 | Immutable.OrderedSet([1, 2, 'b']), 1060 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 1061 | 'expected `number`.' 1062 | ); 1063 | }); 1064 | 1065 | it('should warn with invalid complex types', function() { 1066 | function Thing() {} 1067 | var name = Thing.name || '<>'; 1068 | 1069 | typeCheckFail( 1070 | PropTypes.orderedSetOf(React.PropTypes.instanceOf(Thing)), 1071 | Immutable.OrderedSet([new Thing(), 'xyz' ]), 1072 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 1073 | name + '`.' 1074 | ); 1075 | }); 1076 | 1077 | it('should warn when passed something other than an Immutable.OrderedSet', function() { 1078 | typeCheckFail( 1079 | PropTypes.orderedSetOf(React.PropTypes.number), 1080 | {'0': 'maybe-array', length: 1}, 1081 | 'Invalid prop `testProp` of type `object` supplied to ' + 1082 | '`testComponent`, expected an Immutable.js OrderedSet.' 1083 | ); 1084 | typeCheckFail( 1085 | PropTypes.orderedSetOf(React.PropTypes.number), 1086 | 123, 1087 | 'Invalid prop `testProp` of type `number` supplied to ' + 1088 | '`testComponent`, expected an Immutable.js OrderedSet.' 1089 | ); 1090 | typeCheckFail( 1091 | PropTypes.orderedSetOf(React.PropTypes.number), 1092 | 'string', 1093 | 'Invalid prop `testProp` of type `string` supplied to ' + 1094 | '`testComponent`, expected an Immutable.js OrderedSet.' 1095 | ); 1096 | typeCheckFail( 1097 | PropTypes.orderedSetOf(React.PropTypes.number), 1098 | [1, 2, 3], 1099 | 'Invalid prop `testProp` of type `array` supplied to ' + 1100 | '`testComponent`, expected an Immutable.js OrderedSet.' 1101 | ); 1102 | typeCheckFail( 1103 | PropTypes.orderedSetOf(React.PropTypes.number), 1104 | Immutable.List([1, 2, 3]), 1105 | 'Invalid prop `testProp` of type `Immutable.List` supplied to ' + 1106 | '`testComponent`, expected an Immutable.js OrderedSet.' 1107 | ); 1108 | typeCheckFail( 1109 | PropTypes.orderedSetOf(React.PropTypes.number), 1110 | Immutable.Set([1, 2, 3]), 1111 | 'Invalid prop `testProp` of type `Immutable.Set` supplied to ' + 1112 | '`testComponent`, expected an Immutable.js OrderedSet.' 1113 | ); 1114 | }); 1115 | 1116 | it('should not warn when passing an empty object', function() { 1117 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.number), Immutable.OrderedSet()); 1118 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.number), Immutable.OrderedSet([])); 1119 | }); 1120 | 1121 | it('should be implicitly optional and not warn without values', function() { 1122 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.number), null); 1123 | typeCheckPass(PropTypes.orderedSetOf(React.PropTypes.number), undefined); 1124 | }); 1125 | 1126 | it('should warn for missing required values', function() { 1127 | typeCheckFail( 1128 | PropTypes.orderedSetOf(React.PropTypes.number).isRequired, 1129 | null, 1130 | requiredMessage 1131 | ); 1132 | typeCheckFail( 1133 | PropTypes.orderedSetOf(React.PropTypes.number).isRequired, 1134 | undefined, 1135 | requiredMessage 1136 | ); 1137 | }); 1138 | }); 1139 | 1140 | describe('IterableOf Type', function() { 1141 | it('should support the iterableOf propTypes', function() { 1142 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), Immutable.List([1, 2, 3])); 1143 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.string), Immutable.List(['a', 'b', 'c'])); 1144 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.List(['a', 'b'])); 1145 | 1146 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), Immutable.Map({1: 1, 2: 2, 3: 3})); 1147 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.string), Immutable.Map({1: 'a', 2: 'b', 3: 'c'})); 1148 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.oneOf(['a', 'b'])), Immutable.Map({1: 'a', 2: 'b'})); 1149 | }); 1150 | 1151 | it('should support iterableOf with complex types', function() { 1152 | function Thing() {} 1153 | 1154 | typeCheckPass( 1155 | PropTypes.iterableOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 1156 | Immutable.List([{a: 1}, {a: 2}]) 1157 | ); 1158 | 1159 | typeCheckPass( 1160 | PropTypes.iterableOf(PropTypes.shape({a: React.PropTypes.number.isRequired})), 1161 | Immutable.fromJS([{a: 1}, {a: 2}]) 1162 | ); 1163 | 1164 | typeCheckPass( 1165 | PropTypes.iterableOf(React.PropTypes.instanceOf(Thing)), 1166 | Immutable.List([new Thing(), new Thing()]) 1167 | ); 1168 | 1169 | typeCheckPass( 1170 | PropTypes.iterableOf(React.PropTypes.shape({a: React.PropTypes.number.isRequired})), 1171 | Immutable.Map({1: {a: 1}, 2: {a: 2}}) 1172 | ); 1173 | 1174 | typeCheckPass( 1175 | PropTypes.iterableOf(PropTypes.shape({a: React.PropTypes.number.isRequired})), 1176 | Immutable.fromJS({1: {a: 1}, 2: {a: 2}}) 1177 | ); 1178 | 1179 | typeCheckPass( 1180 | PropTypes.iterableOf(React.PropTypes.instanceOf(Thing)), 1181 | Immutable.Map({ 1: new Thing(), 2: new Thing() }) 1182 | ); 1183 | }); 1184 | 1185 | it('should warn with invalid items in the list', function() { 1186 | typeCheckFail( 1187 | PropTypes.iterableOf(React.PropTypes.number), 1188 | Immutable.List([1, 2, 'b']), 1189 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 1190 | 'expected `number`.' 1191 | ); 1192 | 1193 | typeCheckFail( 1194 | PropTypes.iterableOf(React.PropTypes.number), 1195 | Immutable.Map({ 1: 1, 2: 2, 3: 'b' }), 1196 | 'Invalid prop `testProp[2]` of type `string` supplied to `testComponent`, ' + 1197 | 'expected `number`.' 1198 | ); 1199 | }); 1200 | 1201 | it('should warn with invalid complex types', function() { 1202 | function Thing() {} 1203 | var name = Thing.name || '<>'; 1204 | 1205 | typeCheckFail( 1206 | PropTypes.iterableOf(React.PropTypes.instanceOf(Thing)), 1207 | Immutable.List([new Thing(), 'xyz']), 1208 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 1209 | name + '`.' 1210 | ); 1211 | 1212 | typeCheckFail( 1213 | PropTypes.iterableOf(React.PropTypes.instanceOf(Thing)), 1214 | Immutable.Map({ 1: new Thing(), 2: 'xyz' }), 1215 | 'Invalid prop `testProp[1]` of type `String` supplied to `testComponent`, expected instance of `' + 1216 | name + '`.' 1217 | ); 1218 | }); 1219 | 1220 | it('should warn when passed something other than an Immutable.Iterable', function() { 1221 | typeCheckFail( 1222 | PropTypes.iterableOf(React.PropTypes.number), 1223 | {'0': 'maybe-array', length: 1}, 1224 | 'Invalid prop `testProp` of type `object` supplied to ' + 1225 | '`testComponent`, expected an Immutable.js Iterable.' 1226 | ); 1227 | typeCheckFail( 1228 | PropTypes.iterableOf(React.PropTypes.number), 1229 | 123, 1230 | 'Invalid prop `testProp` of type `number` supplied to ' + 1231 | '`testComponent`, expected an Immutable.js Iterable.' 1232 | ); 1233 | typeCheckFail( 1234 | PropTypes.iterableOf(React.PropTypes.number), 1235 | 'string', 1236 | 'Invalid prop `testProp` of type `string` supplied to ' + 1237 | '`testComponent`, expected an Immutable.js Iterable.' 1238 | ); 1239 | typeCheckFail( 1240 | PropTypes.iterableOf(React.PropTypes.number), 1241 | [1, 2, 3], 1242 | 'Invalid prop `testProp` of type `array` supplied to ' + 1243 | '`testComponent`, expected an Immutable.js Iterable.' 1244 | ); 1245 | }); 1246 | 1247 | it('should not warn when passing an empty iterable', function() { 1248 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), Immutable.List()); 1249 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), Immutable.List([])); 1250 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), Immutable.Map({})); 1251 | }); 1252 | 1253 | it('should be implicitly optional and not warn without values', function() { 1254 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), null); 1255 | typeCheckPass(PropTypes.iterableOf(React.PropTypes.number), undefined); 1256 | }); 1257 | 1258 | it('should warn for missing required values', function() { 1259 | typeCheckFail( 1260 | PropTypes.iterableOf(React.PropTypes.number).isRequired, 1261 | null, 1262 | requiredMessage 1263 | ); 1264 | typeCheckFail( 1265 | PropTypes.iterableOf(React.PropTypes.number).isRequired, 1266 | undefined, 1267 | requiredMessage 1268 | ); 1269 | }); 1270 | }); 1271 | 1272 | describe('RecordOf Type', function() { 1273 | it('should warn for non objects', function() { 1274 | typeCheckFail( 1275 | PropTypes.recordOf({}), 1276 | 'some string', 1277 | 'Invalid prop `testProp` of type `string` supplied to ' + 1278 | '`testComponent`, expected an Immutable.js Record.' 1279 | ); 1280 | typeCheckFail( 1281 | PropTypes.recordOf({}), 1282 | ['array'], 1283 | 'Invalid prop `testProp` of type `array` supplied to ' + 1284 | '`testComponent`, expected an Immutable.js Record.' 1285 | ); 1286 | typeCheckFail( 1287 | PropTypes.recordOf({}), 1288 | {a: 1}, 1289 | 'Invalid prop `testProp` of type `object` supplied to ' + 1290 | '`testComponent`, expected an Immutable.js Record.' 1291 | ); 1292 | typeCheckFail( 1293 | PropTypes.recordOf({}), 1294 | Immutable.Map({ a: 1 }), 1295 | 'Invalid prop `testProp` of type `Immutable.Map` supplied to ' + 1296 | '`testComponent`, expected an Immutable.js Record.' 1297 | ); 1298 | }); 1299 | 1300 | it('should not warn for empty values', function() { 1301 | typeCheckPass(PropTypes.recordOf({}), undefined); 1302 | typeCheckPass(PropTypes.recordOf({}), null); 1303 | }); 1304 | 1305 | it('should not warn for an empty Record object', function() { 1306 | typeCheckPass(PropTypes.recordOf({}).isRequired, new (Immutable.Record({}))()); 1307 | }); 1308 | 1309 | it('should not warn for non specified types', function() { 1310 | typeCheckPass(PropTypes.recordOf({}), new (Immutable.Record({key: 1}))()); 1311 | }); 1312 | 1313 | it('should not warn for valid types', function() { 1314 | typeCheckPass(PropTypes.recordOf({key: React.PropTypes.number}), new (Immutable.Record({key: 1}))()); 1315 | }); 1316 | 1317 | it('should ignore null keys', function() { 1318 | typeCheckPass(PropTypes.recordOf({key: null}), new (Immutable.Record({key: 1}))()); 1319 | }); 1320 | 1321 | it('should warn for required valid types', function() { 1322 | typeCheckFail( 1323 | PropTypes.recordOf({key: React.PropTypes.number.isRequired}), 1324 | new (Immutable.Record({}))(), 1325 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1326 | ); 1327 | }); 1328 | 1329 | it('should warn for the first required type', function() { 1330 | typeCheckFail( 1331 | PropTypes.recordOf({ 1332 | key: React.PropTypes.number.isRequired, 1333 | secondKey: React.PropTypes.number.isRequired 1334 | }), 1335 | new (Immutable.Record({}))(), 1336 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1337 | ); 1338 | }); 1339 | 1340 | it('should warn for invalid key types', function() { 1341 | typeCheckFail(PropTypes.recordOf({key: React.PropTypes.number}), 1342 | new (Immutable.Record({key: 'abc'}))(), 1343 | 'Invalid prop `testProp.key` of type `string` supplied to `testComponent`, ' + 1344 | 'expected `number`.' 1345 | ); 1346 | }); 1347 | 1348 | it('should be implicitly optional and not warn without values', function() { 1349 | typeCheckPass( 1350 | PropTypes.recordOf(PropTypes.recordOf({key: React.PropTypes.number})), null 1351 | ); 1352 | typeCheckPass( 1353 | PropTypes.recordOf(PropTypes.recordOf({key: React.PropTypes.number})), undefined 1354 | ); 1355 | }); 1356 | 1357 | it('should warn for missing required values', function() { 1358 | typeCheckFail( 1359 | PropTypes.recordOf({key: React.PropTypes.number}).isRequired, 1360 | null, 1361 | requiredMessage 1362 | ); 1363 | typeCheckFail( 1364 | PropTypes.recordOf({key: React.PropTypes.number}).isRequired, 1365 | undefined, 1366 | requiredMessage 1367 | ); 1368 | }); 1369 | }); 1370 | 1371 | describe('Shape Types [deprecated]', function() { 1372 | it('should warn for non objects', function() { 1373 | typeCheckFail( 1374 | PropTypes.shape({}), 1375 | 'some string', 1376 | 'Invalid prop `testProp` of type `string` supplied to ' + 1377 | '`testComponent`, expected an Immutable.js Iterable.' 1378 | ); 1379 | typeCheckFail( 1380 | PropTypes.shape({}), 1381 | ['array'], 1382 | 'Invalid prop `testProp` of type `array` supplied to ' + 1383 | '`testComponent`, expected an Immutable.js Iterable.' 1384 | ); 1385 | typeCheckFail( 1386 | PropTypes.shape({}), 1387 | {a: 1}, 1388 | 'Invalid prop `testProp` of type `object` supplied to ' + 1389 | '`testComponent`, expected an Immutable.js Iterable.' 1390 | ); 1391 | }); 1392 | 1393 | it('should not warn for empty values', function() { 1394 | typeCheckPass(PropTypes.shape({}), undefined); 1395 | typeCheckPass(PropTypes.shape({}), null); 1396 | typeCheckPass(PropTypes.shape({}), Immutable.fromJS({})); 1397 | }); 1398 | 1399 | it('should not warn for an empty Immutable object', function() { 1400 | typeCheckPass(PropTypes.shape({}).isRequired, Immutable.fromJS({})); 1401 | }); 1402 | 1403 | it('should not warn for non specified types', function() { 1404 | typeCheckPass(PropTypes.shape({}), Immutable.fromJS({key: 1})); 1405 | }); 1406 | 1407 | it('should not warn for valid types', function() { 1408 | typeCheckPass(PropTypes.shape({key: React.PropTypes.number}), Immutable.fromJS({key: 1})); 1409 | }); 1410 | 1411 | it('should ignore null keys', function() { 1412 | typeCheckPass(PropTypes.shape({key: null}), Immutable.fromJS({key: 1})); 1413 | }); 1414 | 1415 | it('should warn for required valid types', function() { 1416 | typeCheckFail( 1417 | PropTypes.shape({key: React.PropTypes.number.isRequired}), 1418 | Immutable.fromJS({}), 1419 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1420 | ); 1421 | }); 1422 | 1423 | it('should warn for the first required type', function() { 1424 | typeCheckFail( 1425 | PropTypes.shape({ 1426 | key: React.PropTypes.number.isRequired, 1427 | secondKey: React.PropTypes.number.isRequired 1428 | }), 1429 | Immutable.fromJS({}), 1430 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1431 | ); 1432 | }); 1433 | 1434 | it('should warn for invalid key types', function() { 1435 | typeCheckFail(PropTypes.shape({key: React.PropTypes.number}), 1436 | Immutable.fromJS({key: 'abc'}), 1437 | 'Invalid prop `testProp.key` of type `string` supplied to `testComponent`, ' + 1438 | 'expected `number`.' 1439 | ); 1440 | }); 1441 | 1442 | it('should be implicitly optional and not warn without values', function() { 1443 | typeCheckPass( 1444 | PropTypes.shape(PropTypes.shape({key: React.PropTypes.number})), null 1445 | ); 1446 | typeCheckPass( 1447 | PropTypes.shape(PropTypes.shape({key: React.PropTypes.number})), undefined 1448 | ); 1449 | }); 1450 | 1451 | it('should warn for missing required values', function() { 1452 | typeCheckFail( 1453 | PropTypes.shape({key: React.PropTypes.number}).isRequired, 1454 | null, 1455 | requiredMessage 1456 | ); 1457 | typeCheckFail( 1458 | PropTypes.shape({key: React.PropTypes.number}).isRequired, 1459 | undefined, 1460 | requiredMessage 1461 | ); 1462 | }); 1463 | 1464 | it('should probably not validate a list, but does', function() { 1465 | var shape = { 1466 | 0: React.PropTypes.number.isRequired, 1467 | 1: React.PropTypes.string.isRequired, 1468 | 2: React.PropTypes.string 1469 | }; 1470 | typeCheckPass(PropTypes.shape(shape), Immutable.List([1, '2'])); 1471 | }); 1472 | }); 1473 | 1474 | describe('Contains Types', function() { 1475 | it('should warn for non objects', function() { 1476 | typeCheckFail( 1477 | PropTypes.contains({}), 1478 | 'some string', 1479 | 'Invalid prop `testProp` of type `string` supplied to ' + 1480 | '`testComponent`, expected an Immutable.js Iterable.' 1481 | ); 1482 | typeCheckFail( 1483 | PropTypes.contains({}), 1484 | ['array'], 1485 | 'Invalid prop `testProp` of type `array` supplied to ' + 1486 | '`testComponent`, expected an Immutable.js Iterable.' 1487 | ); 1488 | typeCheckFail( 1489 | PropTypes.contains({}), 1490 | {a: 1}, 1491 | 'Invalid prop `testProp` of type `object` supplied to ' + 1492 | '`testComponent`, expected an Immutable.js Iterable.' 1493 | ); 1494 | }); 1495 | 1496 | it('should not warn for empty values', function() { 1497 | typeCheckPass(PropTypes.contains({}), undefined); 1498 | typeCheckPass(PropTypes.contains({}), null); 1499 | typeCheckPass(PropTypes.contains({}), Immutable.fromJS({})); 1500 | }); 1501 | 1502 | it('should not warn for an empty Immutable object', function() { 1503 | typeCheckPass(PropTypes.contains({}).isRequired, Immutable.fromJS({})); 1504 | }); 1505 | 1506 | it('should not warn for non specified types', function() { 1507 | typeCheckPass(PropTypes.contains({}), Immutable.fromJS({key: 1})); 1508 | }); 1509 | 1510 | it('should not warn for valid types', function() { 1511 | typeCheckPass(PropTypes.contains({key: React.PropTypes.number}), Immutable.fromJS({key: 1})); 1512 | }); 1513 | 1514 | it('should ignore null keys', function() { 1515 | typeCheckPass(PropTypes.contains({key: null}), Immutable.fromJS({key: 1})); 1516 | }); 1517 | 1518 | it('should warn for required valid types', function() { 1519 | typeCheckFail( 1520 | PropTypes.contains({key: React.PropTypes.number.isRequired}), 1521 | Immutable.fromJS({}), 1522 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1523 | ); 1524 | }); 1525 | 1526 | it('should warn for the first required type', function() { 1527 | typeCheckFail( 1528 | PropTypes.contains({ 1529 | key: React.PropTypes.number.isRequired, 1530 | secondKey: React.PropTypes.number.isRequired 1531 | }), 1532 | Immutable.fromJS({}), 1533 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1534 | ); 1535 | }); 1536 | 1537 | it('should warn for invalid key types', function() { 1538 | typeCheckFail(PropTypes.contains({key: React.PropTypes.number}), 1539 | Immutable.fromJS({key: 'abc'}), 1540 | 'Invalid prop `testProp.key` of type `string` supplied to `testComponent`, ' + 1541 | 'expected `number`.' 1542 | ); 1543 | }); 1544 | 1545 | it('should be implicitly optional and not warn without values', function() { 1546 | typeCheckPass( 1547 | PropTypes.contains(PropTypes.contains({key: React.PropTypes.number})), null 1548 | ); 1549 | typeCheckPass( 1550 | PropTypes.contains(PropTypes.contains({key: React.PropTypes.number})), undefined 1551 | ); 1552 | }); 1553 | 1554 | it('should warn for missing required values', function() { 1555 | typeCheckFail( 1556 | PropTypes.contains({key: React.PropTypes.number}).isRequired, 1557 | null, 1558 | requiredMessage 1559 | ); 1560 | typeCheckFail( 1561 | PropTypes.contains({key: React.PropTypes.number}).isRequired, 1562 | undefined, 1563 | requiredMessage 1564 | ); 1565 | }); 1566 | 1567 | it('should probably not validate a list, but does', function() { 1568 | var contains = { 1569 | 0: React.PropTypes.number.isRequired, 1570 | 1: React.PropTypes.string.isRequired, 1571 | 2: React.PropTypes.string 1572 | }; 1573 | typeCheckPass(PropTypes.contains(contains), Immutable.List([1, '2'])); 1574 | }); 1575 | }); 1576 | 1577 | describe('MapContains Types', function() { 1578 | it('should warn for non objects', function() { 1579 | typeCheckFail( 1580 | PropTypes.mapContains({}), 1581 | 'some string', 1582 | 'Invalid prop `testProp` of type `string` supplied to ' + 1583 | '`testComponent`, expected an Immutable.js Map.' 1584 | ); 1585 | typeCheckFail( 1586 | PropTypes.mapContains({}), 1587 | ['array'], 1588 | 'Invalid prop `testProp` of type `array` supplied to ' + 1589 | '`testComponent`, expected an Immutable.js Map.' 1590 | ); 1591 | typeCheckFail( 1592 | PropTypes.mapContains({}), 1593 | {a: 1}, 1594 | 'Invalid prop `testProp` of type `object` supplied to ' + 1595 | '`testComponent`, expected an Immutable.js Map.' 1596 | ); 1597 | }); 1598 | 1599 | it('should not warn for empty values', function() { 1600 | typeCheckPass(PropTypes.mapContains({}), undefined); 1601 | typeCheckPass(PropTypes.mapContains({}), null); 1602 | typeCheckPass(PropTypes.mapContains({}), Immutable.fromJS({})); 1603 | }); 1604 | 1605 | it('should not warn for an empty Immutable object', function() { 1606 | typeCheckPass(PropTypes.mapContains({}).isRequired, Immutable.fromJS({})); 1607 | }); 1608 | 1609 | it('should not warn for non specified types', function() { 1610 | typeCheckPass(PropTypes.mapContains({}), Immutable.fromJS({key: 1})); 1611 | }); 1612 | 1613 | it('should not warn for valid types', function() { 1614 | typeCheckPass(PropTypes.mapContains({key: React.PropTypes.number}), Immutable.fromJS({key: 1})); 1615 | }); 1616 | 1617 | it('should not warn for nested valid types', function() { 1618 | typeCheckPass( 1619 | PropTypes.mapContains({ 1620 | data: PropTypes.listOf(PropTypes.mapContains({ 1621 | id: React.PropTypes.number.isRequired 1622 | })).isRequired 1623 | }), 1624 | Immutable.fromJS({data: [{id: 1}, {id: 2}]}) 1625 | ); 1626 | }); 1627 | 1628 | it('should warn for nested invalid types', function() { 1629 | typeCheckFail( 1630 | PropTypes.mapContains({ 1631 | data: PropTypes.listOf(PropTypes.mapContains({ 1632 | id: React.PropTypes.number.isRequired 1633 | })).isRequired 1634 | }), 1635 | Immutable.fromJS({data: [{id: 1}, {}]}), 1636 | 'Required prop `testProp.data[1].id` was not specified in `testComponent`.' 1637 | ); 1638 | }); 1639 | 1640 | it('should ignore null keys', function() { 1641 | typeCheckPass(PropTypes.mapContains({key: null}), Immutable.fromJS({key: 1})); 1642 | }); 1643 | 1644 | it('should warn for required valid types', function() { 1645 | typeCheckFail( 1646 | PropTypes.mapContains({key: React.PropTypes.number.isRequired}), 1647 | Immutable.fromJS({}), 1648 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1649 | ); 1650 | }); 1651 | 1652 | it('should warn for the first required type', function() { 1653 | typeCheckFail( 1654 | PropTypes.mapContains({ 1655 | key: React.PropTypes.number.isRequired, 1656 | secondKey: React.PropTypes.number.isRequired 1657 | }), 1658 | Immutable.fromJS({}), 1659 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1660 | ); 1661 | }); 1662 | 1663 | it('should warn for invalid key types', function() { 1664 | typeCheckFail(PropTypes.mapContains({key: React.PropTypes.number}), 1665 | Immutable.fromJS({key: 'abc'}), 1666 | 'Invalid prop `testProp.key` of type `string` supplied to `testComponent`, ' + 1667 | 'expected `number`.' 1668 | ); 1669 | }); 1670 | 1671 | it('should be implicitly optional and not warn without values', function() { 1672 | typeCheckPass( 1673 | PropTypes.mapContains(PropTypes.mapContains({key: React.PropTypes.number})), null 1674 | ); 1675 | typeCheckPass( 1676 | PropTypes.mapContains(PropTypes.mapContains({key: React.PropTypes.number})), undefined 1677 | ); 1678 | }); 1679 | 1680 | it('should warn for missing required values', function() { 1681 | typeCheckFail( 1682 | PropTypes.mapContains({key: React.PropTypes.number}).isRequired, 1683 | null, 1684 | requiredMessage 1685 | ); 1686 | typeCheckFail( 1687 | PropTypes.mapContains({key: React.PropTypes.number}).isRequired, 1688 | undefined, 1689 | requiredMessage 1690 | ); 1691 | }); 1692 | 1693 | it('should not validate a list', function() { 1694 | var contains = { 1695 | 0: React.PropTypes.number.isRequired, 1696 | 1: React.PropTypes.string.isRequired, 1697 | 2: React.PropTypes.string 1698 | }; 1699 | typeCheckFail( 1700 | PropTypes.mapContains(contains), 1701 | Immutable.List([1, '2']), 1702 | 'Invalid prop `testProp` of type `Immutable.List` supplied to `testComponent`, expected an Immutable.js Map.' 1703 | ); 1704 | }); 1705 | }); 1706 | 1707 | describe('OrderedMapContains Types', function() { 1708 | it('should warn for non objects', function() { 1709 | typeCheckFail( 1710 | PropTypes.orderedMapContains({}), 1711 | 'some string', 1712 | 'Invalid prop `testProp` of type `string` supplied to ' + 1713 | '`testComponent`, expected an Immutable.js OrderedMap.' 1714 | ); 1715 | typeCheckFail( 1716 | PropTypes.orderedMapContains({}), 1717 | ['array'], 1718 | 'Invalid prop `testProp` of type `array` supplied to ' + 1719 | '`testComponent`, expected an Immutable.js OrderedMap.' 1720 | ); 1721 | typeCheckFail( 1722 | PropTypes.orderedMapContains({}), 1723 | {a: 1}, 1724 | 'Invalid prop `testProp` of type `object` supplied to ' + 1725 | '`testComponent`, expected an Immutable.js OrderedMap.' 1726 | ); 1727 | }); 1728 | 1729 | it('should not warn for empty values', function() { 1730 | typeCheckPass(PropTypes.orderedMapContains({}), undefined); 1731 | typeCheckPass(PropTypes.orderedMapContains({}), null); 1732 | typeCheckPass(PropTypes.orderedMapContains({}), Immutable.OrderedMap({})); 1733 | }); 1734 | 1735 | it('should not warn for an empty Immutable object', function() { 1736 | typeCheckPass(PropTypes.orderedMapContains({}).isRequired, Immutable.OrderedMap({})); 1737 | }); 1738 | 1739 | it('should not warn for non specified types', function() { 1740 | typeCheckPass(PropTypes.orderedMapContains({}), Immutable.OrderedMap({key: 1})); 1741 | }); 1742 | 1743 | it('should not warn for valid types', function() { 1744 | typeCheckPass(PropTypes.orderedMapContains({key: React.PropTypes.number}), Immutable.OrderedMap({key: 1})); 1745 | }); 1746 | 1747 | it('should not warn for nested valid types', function() { 1748 | typeCheckPass( 1749 | PropTypes.orderedMapContains({ 1750 | data: PropTypes.listOf(PropTypes.orderedMapContains({ 1751 | id: React.PropTypes.number.isRequired 1752 | })).isRequired 1753 | }), 1754 | Immutable.OrderedMap({data: Immutable.List([Immutable.OrderedMap({id: 1}), Immutable.OrderedMap({id: 2})])}) 1755 | ); 1756 | }); 1757 | 1758 | it('should warn for nested invalid types', function() { 1759 | typeCheckFail( 1760 | PropTypes.orderedMapContains({ 1761 | data: PropTypes.listOf(PropTypes.orderedMapContains({ 1762 | id: React.PropTypes.number.isRequired 1763 | })).isRequired 1764 | }), 1765 | Immutable.OrderedMap({data: Immutable.List([Immutable.OrderedMap({id: 1}), Immutable.OrderedMap({})])}), 1766 | 'Required prop `testProp.data[1].id` was not specified in `testComponent`.' 1767 | ); 1768 | }); 1769 | 1770 | it('should ignore null keys', function() { 1771 | typeCheckPass(PropTypes.orderedMapContains({key: null}), Immutable.OrderedMap({key: 1})); 1772 | }); 1773 | 1774 | it('should warn for required valid types', function() { 1775 | typeCheckFail( 1776 | PropTypes.orderedMapContains({key: React.PropTypes.number.isRequired}), 1777 | Immutable.OrderedMap({}), 1778 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1779 | ); 1780 | }); 1781 | 1782 | it('should warn for the first required type', function() { 1783 | typeCheckFail( 1784 | PropTypes.orderedMapContains({ 1785 | key: React.PropTypes.number.isRequired, 1786 | secondKey: React.PropTypes.number.isRequired 1787 | }), 1788 | Immutable.OrderedMap({}), 1789 | 'Required prop `testProp.key` was not specified in `testComponent`.' 1790 | ); 1791 | }); 1792 | 1793 | it('should warn for invalid key types', function() { 1794 | typeCheckFail(PropTypes.orderedMapContains({key: React.PropTypes.number}), 1795 | Immutable.OrderedMap({key: 'abc'}), 1796 | 'Invalid prop `testProp.key` of type `string` supplied to `testComponent`, ' + 1797 | 'expected `number`.' 1798 | ); 1799 | }); 1800 | 1801 | it('should be implicitly optional and not warn without values', function() { 1802 | typeCheckPass( 1803 | PropTypes.orderedMapContains(PropTypes.orderedMapContains({key: React.PropTypes.number})), null 1804 | ); 1805 | typeCheckPass( 1806 | PropTypes.orderedMapContains(PropTypes.orderedMapContains({key: React.PropTypes.number})), undefined 1807 | ); 1808 | }); 1809 | 1810 | it('should warn for missing required values', function() { 1811 | typeCheckFail( 1812 | PropTypes.orderedMapContains({key: React.PropTypes.number}).isRequired, 1813 | null, 1814 | requiredMessage 1815 | ); 1816 | typeCheckFail( 1817 | PropTypes.orderedMapContains({key: React.PropTypes.number}).isRequired, 1818 | undefined, 1819 | requiredMessage 1820 | ); 1821 | }); 1822 | 1823 | it('should not validate a list', function() { 1824 | var contains = { 1825 | 0: React.PropTypes.number.isRequired, 1826 | 1: React.PropTypes.string.isRequired, 1827 | 2: React.PropTypes.string 1828 | }; 1829 | typeCheckFail( 1830 | PropTypes.orderedMapContains(contains), 1831 | Immutable.List([1, '2']), 1832 | 'Invalid prop `testProp` of type `Immutable.List` supplied to `testComponent`, expected an Immutable.js OrderedMap.' 1833 | ); 1834 | }); 1835 | }); 1836 | }); 1837 | -------------------------------------------------------------------------------- /typings/__tests__/ImmutablePropTest.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import * as ImmutablePropTypes from 'react-immutable-proptypes'; 3 | import * as Immutable from 'immutable'; 4 | 5 | // test primitive types 6 | export const propTypesPrimitives = { 7 | oldListTypeChecker: React.PropTypes.instanceOf(Immutable.List), 8 | anotherWay: ImmutablePropTypes.list, 9 | requiredList: ImmutablePropTypes.list.isRequired, 10 | mapsToo: ImmutablePropTypes.map, 11 | evenIterable: ImmutablePropTypes.iterable, 12 | orderedMapYes: ImmutablePropTypes.orderedMap, 13 | setYes: ImmutablePropTypes.set, 14 | orderedSetYes: ImmutablePropTypes.orderedSet, 15 | stackYes: ImmutablePropTypes.stack, 16 | seqYes: ImmutablePropTypes.seq, 17 | recordYes: ImmutablePropTypes.record, 18 | }; 19 | 20 | 21 | // Test Contains 22 | export const containsTest = { 23 | aMap: ImmutablePropTypes.contains({ 24 | aList: ImmutablePropTypes.contains({ 25 | 0: React.PropTypes.number, 26 | 1: React.PropTypes.string, 27 | 2: React.PropTypes.number.isRequired, 28 | }).isRequired, 29 | }) 30 | }; 31 | 32 | // Test MapOf 33 | export const aMap = ImmutablePropTypes.mapOf( 34 | React.PropTypes.any, // validation for values 35 | ImmutablePropTypes.mapContains({ // validation for keys 36 | a: React.PropTypes.number.isRequired, 37 | b: React.PropTypes.string 38 | }) 39 | ); 40 | 41 | // validation for keys (same is in mapOf) 42 | const mapVal = ImmutablePropTypes.mapContains({ // validation for keys 43 | a: React.PropTypes.number.isRequired, 44 | b: React.PropTypes.string 45 | }); 46 | 47 | // Test orderedMapOf 48 | export const aOrderedMapOf = ImmutablePropTypes.orderedMapOf( 49 | React.PropTypes.any, 50 | mapVal 51 | ); 52 | 53 | 54 | // Test listOf 55 | const aListOf = ImmutablePropTypes.listOf( 56 | React.PropTypes.number, // validation for values 57 | ); 58 | 59 | // test compatibility with react types 60 | if (aListOf === React.PropTypes.arrayOf(React.PropTypes.number)) { 61 | alert('should be comparable with reacht types'); 62 | } 63 | 64 | // Test orderedSetOf 65 | export const aOrderedSetOf = ImmutablePropTypes.orderedSetOf( 66 | React.PropTypes.number, // validation for values 67 | ); 68 | 69 | // Test stackOf 70 | export const aStackOf = ImmutablePropTypes.stackOf( 71 | React.PropTypes.string, // validation for values 72 | ); 73 | 74 | // Test iterableOf 75 | export const aIterableOf = ImmutablePropTypes.iterableOf( 76 | React.PropTypes.string, // validation for values 77 | ); 78 | 79 | 80 | // Test recordOf 81 | export const aRecordOf = ImmutablePropTypes.recordOf({ 82 | keyA: React.PropTypes.string, 83 | keyB: ImmutablePropTypes.seq.isRequired 84 | }); 85 | 86 | // Test mapContains 87 | export const aMapContains = ImmutablePropTypes.mapContains({ 88 | aList: ImmutablePropTypes.list.isRequired, 89 | }); 90 | 91 | // Test shape 92 | export const aSahpe = ImmutablePropTypes.shape({ 93 | aList: ImmutablePropTypes.list.isRequired, 94 | }); 95 | 96 | 97 | // Test with component 98 | 99 | React.createClass<{}, {}>({ 100 | propTypes: { 101 | myRequiredImmutableList: ImmutablePropTypes.listOf( 102 | ImmutablePropTypes.contains({ 103 | someNumberProp: React.PropTypes.number.isRequired 104 | }) 105 | ).isRequired 106 | }, 107 | render: () => { return null; } 108 | }); 109 | 110 | React.createClass<{}, {}>({ 111 | propTypes: { 112 | myRequiredImmutableList: ImmutablePropTypes.listOf( 113 | ImmutablePropTypes.contains({ 114 | someNumberProp: React.PropTypes.number.isRequired 115 | }) 116 | ).isRequired 117 | }, 118 | render: () => { return null; } 119 | }); 120 | -------------------------------------------------------------------------------- /typings/index.d.ts: -------------------------------------------------------------------------------- 1 | // Typescript typings for `react-immutable-proptypes` 2 | 3 | /** Copy of `React.PropTypes`'s `Validator` */ 4 | interface Validator { 5 | (object: T, key: string, componentName: string, ...rest: any[]): Error | null; 6 | } 7 | 8 | /** Copy of `React.PropTypes`'s `Requireable` */ 9 | interface Requireable extends Validator { 10 | isRequired: Validator; 11 | } 12 | 13 | /** . 14 | * Modification of `React.PropTypes`'s `ValidationMap` type 15 | * 16 | * `type ValidationMap = { [K in keyof T]?: Validator };` 17 | * 18 | * original seemd too generic, since it allowed stings and numbers as args 19 | */ 20 | type ValidatorMap = { [key: string]: Validator }; 21 | 22 | /** combination of */ 23 | type ValidaterOrValidatorMap = Validator | ValidatorMap 24 | 25 | 26 | declare module 'react-immutable-proptypes' { 27 | /** 28 | * `ImmutablePropTypes.listOf` is based on `React.PropTypes.array` and 29 | * is specific to `Immutable.List` 30 | */ 31 | function listOf(typeChecker: ValidaterOrValidatorMap): Requireable; 32 | 33 | /** 34 | * `ImmutablePropTypes.mapOf` allows you to control both map values and keys 35 | * (in `Immutable.Map`, keys could be anything including another Immutable collections). 36 | * 37 | * 38 | * It accepts two arguments - first one for values, second one for keys (_optional_). 39 | * 40 | * If you are interested in validation of keys only, just pass `React.PropTypes.any` as 41 | * the first argument. 42 | */ 43 | function mapOf(valuesTypeChecker: Requireable, keysTypeChecker?: Requireable): Requireable; 44 | 45 | /** 46 | * `ImmutablePropTypes.orderedMapOf` is basically the same as `mapOf`, 47 | * but it is specific to `Immutable.OrderedMap`. 48 | */ 49 | function orderedMapOf(valuesTypeChecker: Requireable, keysTypeChecker: Requireable): Requireable; 50 | 51 | /** 52 | * `ImmutablePropTypes.setOf` is basically the same as `listOf`, 53 | * but it is specific to `Immutable.Set`. 54 | */ 55 | function setOf(typeChecker: Requireable): Requireable; 56 | 57 | /** 58 | * `ImmutablePropTypes.orderedSetOf` is basically the same as `listOf`, 59 | * but it is specific to `Immutable.OrderedSet`. 60 | */ 61 | function orderedSetOf(typeChecker: Requireable): Requireable; 62 | 63 | /** 64 | * `ImmutablePropTypes.stackOf` is basically the same as `listOf`, 65 | * but it is specific to `Immutable.Stack`. 66 | */ 67 | function stackOf(typeChecker: Requireable): Requireable; 68 | 69 | /** 70 | * `ImmutablePropTypes.iterableOf` is the generic form of `listOf`/`mapOf`. 71 | * It is useful when there is no need to validate anything other than Immutable.js 72 | * compatible (ie. `Immutable.Iterable`). 73 | * 74 | * Continue to use `listOf` and/or `mapOf` when you know the type. 75 | */ 76 | function iterableOf(typeChecker: Requireable): Requireable; 77 | 78 | /** 79 | * `ImmutablePropTypes.recordOf` is like contains, 80 | * except it operates on `Record` properties. 81 | */ 82 | function recordOf(recordKeys: ValidaterOrValidatorMap): Requireable; 83 | 84 | /** 85 | * `ImmutablePropTypes.mapContains` is based on `React.PropTypes.shape` and will only work 86 | * with `Immutable.Map`. 87 | */ 88 | function shape(shapeTypes: ValidaterOrValidatorMap): Requireable; 89 | 90 | /** 91 | * ImmutablePropTypes.contains (formerly `shape`) is based on `React.PropTypes.shape` 92 | * and will try to work with any `Immutable.Iterable`. 93 | * 94 | * In my usage it is the most used validator, as I'm often trying to validate that a `map` 95 | * has certain properties with certain values. 96 | * @return {Requireable} 97 | */ 98 | function contains(shapeTypes: ValidaterOrValidatorMap): Requireable; 99 | 100 | /** 101 | * `ImmutablePropTypes.mapContains` is based on `React.PropTypes.shape` and will only work 102 | * with `Immutable.Map`. 103 | */ 104 | function mapContains(shapeTypes: ValidaterOrValidatorMap): Requireable; 105 | 106 | /** checker for `Immutable.List.isList` */ 107 | const list: Requireable; 108 | /** checker for `Immutable.Map.isMap` */ 109 | const map: Requireable; 110 | /** checker for `Immutable.OrderedMap.isOrderedMap` */ 111 | const orderedMap: Requireable; 112 | /** checker for `Immutable.Set.isSet` */ 113 | const set: Requireable; 114 | /** checker for `Immutable.OrderedSet.isOrderedSet` */ 115 | const orderedSet: Requireable; 116 | /** checker for `Immutable.Stack.isStack` */ 117 | const stack: Requireable; 118 | /** checker for `Immutable.Seq.isSeq` */ 119 | const seq: Requireable; 120 | /** checker for `instanceof Record` */ 121 | const record: Requireable; 122 | /** checker for `Immutable.Iterable.isIterable` */ 123 | const iterable: Requireable; 124 | } 125 | --------------------------------------------------------------------------------