From 6bedb267da7dd63fda1e0d0bdf0b5942671b644e Mon Sep 17 00:00:00 2001 From: Kai Moseley Date: Fri, 4 Aug 2017 16:56:37 +0100 Subject: [PATCH] Implement batched updates and custom types --- .babelrc | 4 +- package-lock.json | 3225 +++++++++++++++++++ package.json | 36 +- readme.md | 71 +- src/__tests__/buildStoreChunk.test.js | 248 +- src/__tests__/reducers.test.js | 2 +- src/__tests__/structure.test.js | 21 + src/__tests__/validatePayload.test.js | 41 +- src/index.js | 2 + src/reducers.js | 1 + src/reducers/__tests__/batchUpdates.test.js | 61 + src/reducers/arrayReducer.js | 47 +- src/reducers/batchUpdates.js | 36 + src/reducers/objectReducer.js | 44 +- src/reducers/primitiveReducer.js | 43 +- src/structure.js | 13 + src/validatePayload.js | 24 +- 17 files changed, 3716 insertions(+), 203 deletions(-) create mode 100644 package-lock.json create mode 100644 src/reducers/__tests__/batchUpdates.test.js create mode 100644 src/reducers/batchUpdates.js diff --git a/.babelrc b/.babelrc index 295464a..e3b5825 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,4 @@ { - "presets": ["es2015", "react"], - "plugins": ["transform-es2015-modules-commonjs", "transform-object-rest-spread", "transform-flow-strip-types"] + "presets": ["es2015", "flow"], + "plugins": ["transform-object-rest-spread"] } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..42f1ae4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3225 @@ +{ + "name": "redux-scc", + "version": "0.5.0", + "lockfileVersion": 1, + "dependencies": { + "abab": { + "version": "1.0.3", + "resolved": "https://npm.onfido.co.uk:443/abab/-/abab-1.0.3.tgz", + "integrity": "sha1-uB3l9ydOxOdW15fNg08wNkJyTl0=", + "dev": true + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://npm.onfido.co.uk:443/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://npm.onfido.co.uk:443/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", + "dev": true + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://npm.onfido.co.uk:443/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://npm.onfido.co.uk:443/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://npm.onfido.co.uk:443/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://npm.onfido.co.uk:443/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://npm.onfido.co.uk:443/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://npm.onfido.co.uk:443/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "resolved": "https://npm.onfido.co.uk:443/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://npm.onfido.co.uk:443/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://npm.onfido.co.uk:443/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://npm.onfido.co.uk:443/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://npm.onfido.co.uk:443/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://npm.onfido.co.uk:443/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "async": { + "version": "2.5.0", + "resolved": "https://npm.onfido.co.uk:443/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://npm.onfido.co.uk:443/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://npm.onfido.co.uk:443/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://npm.onfido.co.uk:443/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, + "babel-cli": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-cli/-/babel-cli-6.24.1.tgz", + "integrity": "sha1-IHzXBbumFImy6kG1MSNBz2rKIoM=", + "dev": true + }, + "babel-code-frame": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-code-frame/-/babel-code-frame-6.22.0.tgz", + "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "dev": true + }, + "babel-core": { + "version": "6.25.0", + "resolved": "https://npm.onfido.co.uk:443/babel-core/-/babel-core-6.25.0.tgz", + "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=", + "dev": true + }, + "babel-generator": { + "version": "6.25.0", + "resolved": "https://npm.onfido.co.uk:443/babel-generator/-/babel-generator-6.25.0.tgz", + "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=", + "dev": true + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true + }, + "babel-helper-define-map": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz", + "integrity": "sha1-epdH8ljYlH0y1RX2qhx70CIEoIA=", + "dev": true + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true + }, + "babel-helper-regex": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz", + "integrity": "sha1-024i+rEAjXnYhkjjIRaGgShFbOg=", + "dev": true + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true + }, + "babel-jest": { + "version": "17.0.2", + "resolved": "https://npm.onfido.co.uk:443/babel-jest/-/babel-jest-17.0.2.tgz", + "integrity": "sha1-jVHg0DdZcTwzHxCOsLLqpMbv/3Q=", + "dev": true, + "dependencies": { + "babel-plugin-istanbul": { + "version": "2.0.3", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-istanbul/-/babel-plugin-istanbul-2.0.3.tgz", + "integrity": "sha1-JmswS5EJYH1gdIR0OUZ2mC9mDfQ=", + "dev": true + }, + "babel-plugin-jest-hoist": { + "version": "17.0.2", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-17.0.2.tgz", + "integrity": "sha1-ITSIzoJZkKzUww+IfcoJ//60UjU=", + "dev": true + }, + "babel-preset-jest": { + "version": "17.0.2", + "resolved": "https://npm.onfido.co.uk:443/babel-preset-jest/-/babel-preset-jest-17.0.2.tgz", + "integrity": "sha1-FB6TXevhZKqgNkwiDTHMshdkk7I=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://npm.onfido.co.uk:443/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true + }, + "test-exclude": { + "version": "2.1.3", + "resolved": "https://npm.onfido.co.uk:443/test-exclude/-/test-exclude-2.1.3.tgz", + "integrity": "sha1-qNiWjh2oMmb5hk8oUsVeIg8GQ0o=", + "dev": true + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true + }, + "babel-plugin-istanbul": { + "version": "4.1.4", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz", + "integrity": "sha1-GN3oS/POMp/d8/QQP66SFFbY5Yc=", + "dev": true + }, + "babel-plugin-jest-hoist": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", + "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", + "dev": true + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz", + "integrity": "sha1-dsKV3DpHQbFmWt/TFnIV3P8ypXY=", + "dev": true + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz", + "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "dev": true + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz", + "integrity": "sha1-h11ryb52HFiirj/u5dxIldjH+SE=", + "dev": true + }, + "babel-plugin-transform-regenerator": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz", + "integrity": "sha1-uNowWtQ8PJm0hI5P5AN7dw0jxBg=", + "dev": true + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true + }, + "babel-polyfill": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-polyfill/-/babel-polyfill-6.23.0.tgz", + "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", + "dev": true + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true + }, + "babel-preset-flow": { + "version": "6.23.0", + "resolved": "https://npm.onfido.co.uk:443/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", + "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", + "dev": true + }, + "babel-preset-jest": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", + "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", + "dev": true + }, + "babel-register": { + "version": "6.24.1", + "resolved": "https://npm.onfido.co.uk:443/babel-register/-/babel-register-6.24.1.tgz", + "integrity": "sha1-fhDhOi9xBlvfrVoXh7pFvKbe118=", + "dev": true + }, + "babel-runtime": { + "version": "6.25.0", + "resolved": "https://npm.onfido.co.uk:443/babel-runtime/-/babel-runtime-6.25.0.tgz", + "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", + "dev": true + }, + "babel-template": { + "version": "6.25.0", + "resolved": "https://npm.onfido.co.uk:443/babel-template/-/babel-template-6.25.0.tgz", + "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", + "dev": true + }, + "babel-traverse": { + "version": "6.25.0", + "resolved": "https://npm.onfido.co.uk:443/babel-traverse/-/babel-traverse-6.25.0.tgz", + "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", + "dev": true + }, + "babel-types": { + "version": "6.25.0", + "resolved": "https://npm.onfido.co.uk:443/babel-types/-/babel-types-6.25.0.tgz", + "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", + "dev": true + }, + "babylon": { + "version": "6.17.4", + "resolved": "https://npm.onfido.co.uk:443/babylon/-/babylon-6.17.4.tgz", + "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true + }, + "binary-extensions": { + "version": "1.9.0", + "resolved": "https://npm.onfido.co.uk:443/binary-extensions/-/binary-extensions-1.9.0.tgz", + "integrity": "sha1-ZlBsFs5vTWkopbPNajPKQelB43s=", + "dev": true, + "optional": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://npm.onfido.co.uk:443/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://npm.onfido.co.uk:443/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://npm.onfido.co.uk:443/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://npm.onfido.co.uk:443/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://npm.onfido.co.uk:443/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "bser": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://npm.onfido.co.uk:443/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://npm.onfido.co.uk:443/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://npm.onfido.co.uk:443/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://npm.onfido.co.uk:443/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://npm.onfido.co.uk:443/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "optional": true + }, + "ci-info": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/ci-info/-/ci-info-1.0.0.tgz", + "integrity": "sha1-3FKF8rTiUYIWg2gcOBwziPRuxTQ=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://npm.onfido.co.uk:443/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://npm.onfido.co.uk:443/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://npm.onfido.co.uk:443/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://npm.onfido.co.uk:443/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://npm.onfido.co.uk:443/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://npm.onfido.co.uk:443/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true + }, + "commander": { + "version": "2.11.0", + "resolved": "https://npm.onfido.co.uk:443/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://npm.onfido.co.uk:443/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "content-type-parser": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/content-type-parser/-/content-type-parser-1.0.1.tgz", + "integrity": "sha1-w+VpiMU8ZRJ/tG1AMqOpACRv3JQ=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://npm.onfido.co.uk:443/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "core-js": { + "version": "2.4.1", + "resolved": "https://npm.onfido.co.uk:443/core-js/-/core-js-2.4.1.tgz", + "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://npm.onfido.co.uk:443/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://npm.onfido.co.uk:443/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://npm.onfido.co.uk:443/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://npm.onfido.co.uk:443/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://npm.onfido.co.uk:443/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://npm.onfido.co.uk:443/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://npm.onfido.co.uk:443/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://npm.onfido.co.uk:443/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true + }, + "diff": { + "version": "3.3.0", + "resolved": "https://npm.onfido.co.uk:443/diff/-/diff-3.3.0.tgz", + "integrity": "sha512-w0XZubFWn0Adlsapj9EAWX0FqWdO4tz8kc3RiYdWLh4k/V8PTb6i0SMgXt0vRM3zyKnT8tKO7mUlieRQHIjMNg==", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://npm.onfido.co.uk:443/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true + }, + "errno": { + "version": "0.1.4", + "resolved": "https://npm.onfido.co.uk:443/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "dev": true + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://npm.onfido.co.uk:443/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://npm.onfido.co.uk:443/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://npm.onfido.co.uk:443/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://npm.onfido.co.uk:443/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://npm.onfido.co.uk:443/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true + } + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://npm.onfido.co.uk:443/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://npm.onfido.co.uk:443/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://npm.onfido.co.uk:443/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "exec-sh": { + "version": "0.2.0", + "resolved": "https://npm.onfido.co.uk:443/exec-sh/-/exec-sh-0.2.0.tgz", + "integrity": "sha1-FPdd4/INKG75MwmbLOUKkDWc7xA=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://npm.onfido.co.uk:443/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://npm.onfido.co.uk:443/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://npm.onfido.co.uk:443/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://npm.onfido.co.uk:443/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://npm.onfido.co.uk:443/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://npm.onfido.co.uk:443/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://npm.onfido.co.uk:443/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://npm.onfido.co.uk:443/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://npm.onfido.co.uk:443/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://npm.onfido.co.uk:443/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://npm.onfido.co.uk:443/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://npm.onfido.co.uk:443/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true + }, + "fs-readdir-recursive": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz", + "integrity": "sha1-jNF0XItPiinIyuw5JHaSG6GV9WA=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.1.2", + "resolved": "https://npm.onfido.co.uk:443/fsevents/-/fsevents-1.1.2.tgz", + "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "dev": true, + "optional": true, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "optional": true + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.36", + "bundled": true, + "dev": true, + "optional": true + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "optional": true + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://npm.onfido.co.uk:443/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://npm.onfido.co.uk:443/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://npm.onfido.co.uk:443/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "https://npm.onfido.co.uk:443/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://npm.onfido.co.uk:443/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://npm.onfido.co.uk:443/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://npm.onfido.co.uk:443/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "dev": true, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://npm.onfido.co.uk:443/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://npm.onfido.co.uk:443/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://npm.onfido.co.uk:443/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://npm.onfido.co.uk:443/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://npm.onfido.co.uk:443/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://npm.onfido.co.uk:443/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://npm.onfido.co.uk:443/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz", + "integrity": "sha1-eb96eF6klf5mFl5zQVPzY/9UN9o=", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://npm.onfido.co.uk:443/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://npm.onfido.co.uk:443/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://npm.onfido.co.uk:443/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://npm.onfido.co.uk:443/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://npm.onfido.co.uk:443/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://npm.onfido.co.uk:443/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true + }, + "is-ci": { + "version": "1.0.10", + "resolved": "https://npm.onfido.co.uk:443/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://npm.onfido.co.uk:443/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://npm.onfido.co.uk:443/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://npm.onfido.co.uk:443/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://npm.onfido.co.uk:443/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://npm.onfido.co.uk:443/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://npm.onfido.co.uk:443/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://npm.onfido.co.uk:443/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-api": { + "version": "1.1.11", + "resolved": "https://npm.onfido.co.uk:443/istanbul-api/-/istanbul-api-1.1.11.tgz", + "integrity": "sha1-/MC0YeKzvaceMFFVE4I4doJX2d4=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", + "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.0.7", + "resolved": "https://npm.onfido.co.uk:443/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz", + "integrity": "sha512-3U2HB9y1ZV9UmFlE12Fx+nPtFqIymzrqCksrXujm3NVbAZIJg/RfYgO1XiIa0mbmxTjWpVEVlkIZJ25xVIAfkQ==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "1.7.4", + "resolved": "https://npm.onfido.co.uk:443/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz", + "integrity": "sha1-6f2SDkdn89Ge3HZeLWs/XMvQ7qg=", + "dev": true + }, + "istanbul-lib-report": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", + "integrity": "sha512-tvF+YmCmH4thnez6JFX06ujIA19WPa9YUiwjc1uALF2cv5dmE3It8b5I8Ob7FHJ70H9Y5yF+TDkVa/mcADuw1Q==", + "dev": true, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://npm.onfido.co.uk:443/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.1", + "resolved": "https://npm.onfido.co.uk:443/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz", + "integrity": "sha512-mukVvSXCn9JQvdJl8wP/iPhqig0MRtuWuD4ZNKo6vB2Ik//AmhAKe3QnPN02dmkRe3lTudFk3rzoHhwU4hb94w==", + "dev": true + }, + "istanbul-reports": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/istanbul-reports/-/istanbul-reports-1.1.1.tgz", + "integrity": "sha512-P8G873A0kW24XRlxHVGhMJBhQ8gWAec+dae7ZxOBzxT4w+a9ATSPvRVK3LB1RAJ9S8bg2tOyWHAGW40Zd2dKfw==", + "dev": true + }, + "jest": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest/-/jest-20.0.4.tgz", + "integrity": "sha1-PdJgwpidba1nix6cxNkZRPbWAqw=", + "dev": true, + "dependencies": { + "jest-cli": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest-cli/-/jest-cli-20.0.4.tgz", + "integrity": "sha1-5TKxnYiuW8bEF+iwWTpv6VSx3JM=", + "dev": true + } + } + }, + "jest-changed-files": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-changed-files/-/jest-changed-files-20.0.3.tgz", + "integrity": "sha1-k5TVzGXEOEBhSb7xv01Sto4D4/g=", + "dev": true + }, + "jest-config": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest-config/-/jest-config-20.0.4.tgz", + "integrity": "sha1-43kwqyIXyRNgXv8T5712PsSPruo=", + "dev": true + }, + "jest-diff": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-diff/-/jest-diff-20.0.3.tgz", + "integrity": "sha1-gfKI/Z5nXw+yPHXxwrGURf5YZhc=", + "dev": true + }, + "jest-docblock": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-docblock/-/jest-docblock-20.0.3.tgz", + "integrity": "sha1-F76phDQswz2DxQ++FUXqDvqkRxI=", + "dev": true + }, + "jest-environment-jsdom": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz", + "integrity": "sha1-BIqKwS7iJfcZBBdxODS7mZeH3pk=", + "dev": true + }, + "jest-environment-node": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-environment-node/-/jest-environment-node-20.0.3.tgz", + "integrity": "sha1-1Ii8RhKvLCRumG6K52caCZFj1AM=", + "dev": true + }, + "jest-haste-map": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest-haste-map/-/jest-haste-map-20.0.4.tgz", + "integrity": "sha1-ZT61XIic48Ah97lGk/IKQVm63wM=", + "dev": true + }, + "jest-jasmine2": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz", + "integrity": "sha1-/MWxQReA2RHQQpAu8YWehS5g1eE=", + "dev": true + }, + "jest-matcher-utils": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", + "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "dev": true + }, + "jest-matchers": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-matchers/-/jest-matchers-20.0.3.tgz", + "integrity": "sha1-ymnbHDLbWm9wf6XgQBq7VXAN/WA=", + "dev": true + }, + "jest-message-util": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-message-util/-/jest-message-util-20.0.3.tgz", + "integrity": "sha1-auwoRDBvyw5udNV5bBAG2W/dgxw=", + "dev": true + }, + "jest-mock": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-mock/-/jest-mock-20.0.3.tgz", + "integrity": "sha1-i8Bw6QQUqhVcEajWTIaaDVxx2lk=", + "dev": true + }, + "jest-regex-util": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-regex-util/-/jest-regex-util-20.0.3.tgz", + "integrity": "sha1-hburXRM+RGJbGfr4xqpRItCF12I=", + "dev": true + }, + "jest-resolve": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest-resolve/-/jest-resolve-20.0.4.tgz", + "integrity": "sha1-lEiz6La6/BVHlETGSZBFt//ll6U=", + "dev": true + }, + "jest-resolve-dependencies": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz", + "integrity": "sha1-bhSntxevDyyzZnxUneQK8Bexcjo=", + "dev": true + }, + "jest-runtime": { + "version": "20.0.4", + "resolved": "https://npm.onfido.co.uk:443/jest-runtime/-/jest-runtime-20.0.4.tgz", + "integrity": "sha1-osgCIZxCA/dU3xQE5JAYYWnRJNg=", + "dev": true, + "dependencies": { + "babel-jest": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/babel-jest/-/babel-jest-20.0.3.tgz", + "integrity": "sha1-5KA7E9wQOJ4UD8ZF0J/8TO0wFnE=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://npm.onfido.co.uk:443/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "jest-snapshot": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-snapshot/-/jest-snapshot-20.0.3.tgz", + "integrity": "sha1-W4R+GtsaTZCFKn+fElCG4YfHZWY=", + "dev": true + }, + "jest-util": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-util/-/jest-util-20.0.3.tgz", + "integrity": "sha1-DAf32A2C9OWmfG+LnD/n9lz9Mq0=", + "dev": true + }, + "jest-validate": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/jest-validate/-/jest-validate-20.0.3.tgz", + "integrity": "sha1-0M/R3k9XnymEhJJcKA+PHZTsPKs=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://npm.onfido.co.uk:443/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.9.1", + "resolved": "https://npm.onfido.co.uk:443/js-yaml/-/js-yaml-3.9.1.tgz", + "integrity": "sha512-CbcG379L1e+mWBnLvHWWeLs8GyV/EMw862uLI3c+GxVyDHWZcjZinwuBd3iW2pgxgIlksW/1vNJa4to+RvDOww==", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://npm.onfido.co.uk:443/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsdom": { + "version": "9.12.0", + "resolved": "https://npm.onfido.co.uk:443/jsdom/-/jsdom-9.12.0.tgz", + "integrity": "sha1-6MVG//ywbADUgzyoRBD+1/igl9Q=", + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://npm.onfido.co.uk:443/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://npm.onfido.co.uk:443/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://npm.onfido.co.uk:443/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://npm.onfido.co.uk:443/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://npm.onfido.co.uk:443/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://npm.onfido.co.uk:443/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://npm.onfido.co.uk:443/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://npm.onfido.co.uk:443/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true + }, + "leven": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://npm.onfido.co.uk:443/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://npm.onfido.co.uk:443/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://npm.onfido.co.uk:443/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash-es": { + "version": "4.17.4", + "resolved": "https://npm.onfido.co.uk:443/lodash-es/-/lodash-es-4.17.4.tgz", + "integrity": "sha1-3MHXVS4VCgZABzupyzHXDwMpUOc=" + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.find": { + "version": "4.6.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.find/-/lodash.find-4.6.0.tgz", + "integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E=" + }, + "lodash.flowright": { + "version": "3.5.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.flowright/-/lodash.flowright-3.5.0.tgz", + "integrity": "sha1-K1//OZcW1+fcVyT+k0n2cGUYTWc=" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isfunction": { + "version": "3.0.8", + "resolved": "https://npm.onfido.co.uk:443/lodash.isfunction/-/lodash.isfunction-3.0.8.tgz", + "integrity": "sha1-TbcJ/IG8So/XEnpFilNGxc3OLGs=" + }, + "lodash.isobject": { + "version": "3.0.2", + "resolved": "https://npm.onfido.co.uk:443/lodash.isobject/-/lodash.isobject-3.0.2.tgz", + "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=" + }, + "lodash.keys": { + "version": "4.2.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.keys/-/lodash.keys-4.2.0.tgz", + "integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.omit": { + "version": "4.5.0", + "resolved": "https://npm.onfido.co.uk:443/lodash.omit/-/lodash.omit-4.5.0.tgz", + "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://npm.onfido.co.uk:443/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=" + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://npm.onfido.co.uk:443/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true + }, + "merge": { + "version": "1.2.0", + "resolved": "https://npm.onfido.co.uk:443/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://npm.onfido.co.uk:443/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true + }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://npm.onfido.co.uk:443/mime-db/-/mime-db-1.29.0.tgz", + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=", + "dev": true + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://npm.onfido.co.uk:443/mime-types/-/mime-types-2.1.16.tgz", + "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://npm.onfido.co.uk:443/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://npm.onfido.co.uk:443/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://npm.onfido.co.uk:443/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.6.2", + "resolved": "https://npm.onfido.co.uk:443/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=", + "dev": true, + "optional": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://npm.onfido.co.uk:443/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://npm.onfido.co.uk:443/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-notifier": { + "version": "5.1.2", + "resolved": "https://npm.onfido.co.uk:443/node-notifier/-/node-notifier-5.1.2.tgz", + "integrity": "sha1-L6nhJgX6EACdRFSdb82KY93g5P8=", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://npm.onfido.co.uk:443/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://npm.onfido.co.uk:443/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwmatcher": { + "version": "1.4.1", + "resolved": "https://npm.onfido.co.uk:443/nwmatcher/-/nwmatcher-1.4.1.tgz", + "integrity": "sha1-eumwew6oBNt+JfBctf5Al9TklJ8=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://npm.onfido.co.uk:443/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://npm.onfido.co.uk:443/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://npm.onfido.co.uk:443/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://npm.onfido.co.uk:443/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://npm.onfido.co.uk:443/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://npm.onfido.co.uk:443/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://npm.onfido.co.uk:443/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://npm.onfido.co.uk:443/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://npm.onfido.co.uk:443/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true + }, + "p-map": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/p-map/-/p-map-1.1.1.tgz", + "integrity": "sha1-BfXkrpegaDcbwqXMhr+9vBnErno=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://npm.onfido.co.uk:443/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://npm.onfido.co.uk:443/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true + }, + "parse5": { + "version": "1.5.1", + "resolved": "https://npm.onfido.co.uk:443/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://npm.onfido.co.uk:443/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://npm.onfido.co.uk:443/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://npm.onfido.co.uk:443/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://npm.onfido.co.uk:443/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://npm.onfido.co.uk:443/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://npm.onfido.co.uk:443/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://npm.onfido.co.uk:443/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://npm.onfido.co.uk:443/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://npm.onfido.co.uk:443/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-format": { + "version": "20.0.3", + "resolved": "https://npm.onfido.co.uk:443/pretty-format/-/pretty-format-20.0.3.tgz", + "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "dev": true, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://npm.onfido.co.uk:443/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true + } + } + }, + "private": { + "version": "0.1.7", + "resolved": "https://npm.onfido.co.uk:443/private/-/private-0.1.7.tgz", + "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://npm.onfido.co.uk:443/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true, + "optional": true + }, + "prr": { + "version": "0.0.0", + "resolved": "https://npm.onfido.co.uk:443/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://npm.onfido.co.uk:443/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://npm.onfido.co.uk:443/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://npm.onfido.co.uk:443/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://npm.onfido.co.uk:443/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://npm.onfido.co.uk:443/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://npm.onfido.co.uk:443/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://npm.onfido.co.uk:443/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://npm.onfido.co.uk:443/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://npm.onfido.co.uk:443/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "optional": true + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "optional": true + }, + "redux": { + "version": "3.7.2", + "resolved": "https://npm.onfido.co.uk:443/redux/-/redux-3.7.2.tgz", + "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==" + }, + "regenerate": { + "version": "1.3.2", + "resolved": "https://npm.onfido.co.uk:443/regenerate/-/regenerate-1.3.2.tgz", + "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://npm.onfido.co.uk:443/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + }, + "regenerator-transform": { + "version": "0.9.11", + "resolved": "https://npm.onfido.co.uk:443/regenerator-transform/-/regenerator-transform-0.9.11.tgz", + "integrity": "sha1-On0GdSDLe3F2dp61/4aGkb7+EoM=", + "dev": true + }, + "regex-cache": { + "version": "0.4.3", + "resolved": "https://npm.onfido.co.uk:443/regex-cache/-/regex-cache-0.4.3.tgz", + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://npm.onfido.co.uk:443/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://npm.onfido.co.uk:443/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://npm.onfido.co.uk:443/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", + "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://npm.onfido.co.uk:443/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://npm.onfido.co.uk:443/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://npm.onfido.co.uk:443/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://npm.onfido.co.uk:443/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://npm.onfido.co.uk:443/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://npm.onfido.co.uk:443/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://npm.onfido.co.uk:443/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://npm.onfido.co.uk:443/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://npm.onfido.co.uk:443/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "sane": { + "version": "1.6.0", + "resolved": "https://npm.onfido.co.uk:443/sane/-/sane-1.6.0.tgz", + "integrity": "sha1-lhDEUjB6E10pwf3+JUcDQYDEZ3U=", + "dev": true, + "dependencies": { + "bser": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/bser/-/bser-1.0.2.tgz", + "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "dev": true + }, + "fb-watchman": { + "version": "1.9.2", + "resolved": "https://npm.onfido.co.uk:443/fb-watchman/-/fb-watchman-1.9.2.tgz", + "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://npm.onfido.co.uk:443/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://npm.onfido.co.uk:443/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://npm.onfido.co.uk:443/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true, + "optional": true + }, + "shellwords": { + "version": "0.1.0", + "resolved": "https://npm.onfido.co.uk:443/shellwords/-/shellwords-0.1.0.tgz", + "integrity": "sha1-Zq/Ue2oSky2Qccv9mKUueFzQuhQ=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://npm.onfido.co.uk:443/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://npm.onfido.co.uk:443/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "dev": true + }, + "source-map-support": { + "version": "0.4.15", + "resolved": "https://npm.onfido.co.uk:443/source-map-support/-/source-map-support-0.4.15.tgz", + "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "dev": true + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://npm.onfido.co.uk:443/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://npm.onfido.co.uk:443/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://npm.onfido.co.uk:443/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://npm.onfido.co.uk:443/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://npm.onfido.co.uk:443/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "optional": true + }, + "string-length": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/string-length/-/string-length-1.0.1.tgz", + "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://npm.onfido.co.uk:443/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://npm.onfido.co.uk:443/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://npm.onfido.co.uk:443/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://npm.onfido.co.uk:443/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://npm.onfido.co.uk:443/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, + "test-exclude": { + "version": "4.1.1", + "resolved": "https://npm.onfido.co.uk:443/test-exclude/-/test-exclude-4.1.1.tgz", + "integrity": "sha512-35+Asrsk3XHJDBgf/VRFexPgh3UyETv8IAn/LRTiZjVy6rjPVqdEk8dJcJYBzl1w0XCJM48lvTy8SfEsCWS4nA==", + "dev": true + }, + "throat": { + "version": "3.2.0", + "resolved": "https://npm.onfido.co.uk:443/throat/-/throat-3.2.0.tgz", + "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "dev": true + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://npm.onfido.co.uk:443/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://npm.onfido.co.uk:443/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://npm.onfido.co.uk:443/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://npm.onfido.co.uk:443/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://npm.onfido.co.uk:443/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://npm.onfido.co.uk:443/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://npm.onfido.co.uk:443/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://npm.onfido.co.uk:443/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "dependencies": { + "yargs": { + "version": "3.10.0", + "resolved": "https://npm.onfido.co.uk:443/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://npm.onfido.co.uk:443/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "optional": true + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://npm.onfido.co.uk:443/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://npm.onfido.co.uk:443/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://npm.onfido.co.uk:443/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://npm.onfido.co.uk:443/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://npm.onfido.co.uk:443/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true + }, + "watch": { + "version": "0.10.0", + "resolved": "https://npm.onfido.co.uk:443/watch/-/watch-0.10.0.tgz", + "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", + "dev": true + }, + "webidl-conversions": { + "version": "4.0.1", + "resolved": "https://npm.onfido.co.uk:443/webidl-conversions/-/webidl-conversions-4.0.1.tgz", + "integrity": "sha1-gBWherg+fhsxFjhIas6B2mziBqA=", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.1", + "resolved": "https://npm.onfido.co.uk:443/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz", + "integrity": "sha1-PGxFGhmO567FWx7GHQkgxngBpfQ=", + "dev": true + }, + "whatwg-url": { + "version": "4.8.0", + "resolved": "https://npm.onfido.co.uk:443/whatwg-url/-/whatwg-url-4.8.0.tgz", + "integrity": "sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA=", + "dev": true, + "dependencies": { + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://npm.onfido.co.uk:443/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + } + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://npm.onfido.co.uk:443/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://npm.onfido.co.uk:443/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://npm.onfido.co.uk:443/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://npm.onfido.co.uk:443/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "worker-farm": { + "version": "1.4.1", + "resolved": "https://npm.onfido.co.uk:443/worker-farm/-/worker-farm-1.4.1.tgz", + "integrity": "sha512-tgFAtgOYLPutkAyzgpS6VJFL5HY+0ui1Tvua+fITgz8ByaJTMFGtazR6xxQfwfiAcbwE+2fLG/K49wc2TfwCNw==", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://npm.onfido.co.uk:443/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://npm.onfido.co.uk:443/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://npm.onfido.co.uk:443/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://npm.onfido.co.uk:443/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://npm.onfido.co.uk:443/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://npm.onfido.co.uk:443/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://npm.onfido.co.uk:443/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://npm.onfido.co.uk:443/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://npm.onfido.co.uk:443/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://npm.onfido.co.uk:443/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + } + } +} diff --git a/package.json b/package.json index 16f31ef..239f3ca 100644 --- a/package.json +++ b/package.json @@ -10,49 +10,39 @@ }, "author": "Kai Moseley", "license": "ISC", - "jest": { - "roots": [ - "/src" - ], - "moduleFileExtensions": [ - "js", - "jsx", - "json" - ], - "moduleDirectories": [ - "node_modules" - ], - "modulePaths": [ - "/src" - ] - }, "repository": { "type": "git", "url": "https://github.com/TheComfyChair/redux-scc" }, "devDependencies": { - "babel-cli": "^6.18.0", + "babel-cli": "^6.24.1", "babel-core": "^6.18.2", "babel-eslint": "^6.1.2", "babel-jest": "^17.0.2", "babel-loader": "^6.2.5", - "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", - "babel-plugin-transform-flow-strip-types": "^6.14.0", - "babel-plugin-transform-object-rest-spread": "^6.8.0", - "babel-preset-es2015": "^6.18.0", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-flow": "^6.23.0", "babel-preset-react": "^6.11.1", "eslint": "^3.2.2", "eslint-loader": "^1.5.0", "eslint-plugin-babel": "^3.3.0", "eslint-plugin-flowtype": "^2.18.1", - "eslint-plugin-react": "^6.0.0" + "eslint-plugin-react": "^6.0.0", + "jest": "^20.0.4", + "regenerator-runtime": "^0.10.5", + "webpack": "^3.4.1" }, "dependencies": { + "lodash.filter": "^4.6.0", "lodash.find": "^4.6.0", "lodash.flowright": "^3.5.0", + "lodash.includes": "^4.3.0", "lodash.isfunction": "^3.0.8", "lodash.isobject": "^3.0.2", + "lodash.keys": "^4.2.0", + "lodash.map": "^4.6.0", "lodash.omit": "^4.5.0", - "redux": "^3.6.0" + "redux": "^3.7.2" } } diff --git a/readme.md b/readme.md index e196d51..2992ab3 100644 --- a/readme.md +++ b/readme.md @@ -11,13 +11,6 @@ The behaviors are purposefully simple, and do not do much extend beyond basic up You can then simply put the reducer into the store and being to build your application on top of the action generators and selectors that have been returned. -#### But these actions are super limited, how can I achieve 'X'? -This boils down to how you intend to construct your application. Redux-scc is very opinionated on what functionality is in the domain of the reducer, and that functionality is purely the maintenance of the store shape over time. It has no interest in specific business logic, and instead relies on that logic occuring elsewhere. That logic will dispatch redux-scc actions as required in order to update the store whenever it is relevant to do so. - -Where your business logic lives is entirely up to you, but my personal choice right now would be either redux-sagas or redux-thunks, as they make the most logical sense and make it trivial to dispatch actions to redux-scc as appropriate. RxJS is also another option if you're after a more functional way to handle your side effects. - -The advantage of this seperation is that the functionality you have to write is now focused entirely on that business logic - you can safely assume that the updating of the store has been taken care of and will 'just work'. That makes the functionality in question less complex, and much easier to test as a result. Plus, no more writing boilerplate reducer code! - #### How to use it To use redux-scc you need to be aware of two things: The buildStoreChunk() function, and the Types object. @@ -52,16 +45,43 @@ Types.string(defaultValue = '') Types.number(defaultValue = 0) Types.boolean(defaultValue = false) + //Complex Types.arrayOf(structure, defaultValue = []) Types.reducer(structure) Types.shape(structure) + +//Custom types +Types.custom({ + validator, //(value: any) => boolean + validationErrorMessage, //(value: any) => string, +})(defaultValue) ``` The types are roughly divided into two categories: simple types (which do not have any internal structure to deal with), and complex types (which do). The structure of complex types is built up using a combination of objects containing Types, or Types. Examples can be found below. +The custom type allows you to define arbitrary validation to be applied, which allows you do anything your heart desires! An example of this may +be to define a type which only accepts objects that are an instance of moment: + +``` +const momentType = Types.custom({ + validator: value => value instanceof moment, + validationErrorMessage: value => `${ value } is not an instance of moment!`, +}); +``` + +Or maybe you want to create a type with a maximum accepted value: + +``` +const maxValueType = (maxValue: number) => Types.custom({ + validator: value => typeof value === 'number' && value < maxValue, + validationErrorMessage: value => `${ value } must be less than ${ maxValue }`, +}); +``` + +Like all other types, you can also use a custom type to create a reducer. #### Actions API -##### Primitive/any +##### Primitive/any/custom - replace(value: any): Replaces the current reducer value with the value provided. - reset(): Resets the reducer value to the initial value. @@ -81,6 +101,41 @@ The types are roughly divided into two categories: simple types (which do not ha - shift(value: any): Add the value to the beginning of the array. - unshift(): Remove the first element of the array. +#### Batch update +Automatically generating these actions is a nice time saver, but an issue with them at the moment is that, if you want to update several parts of the store, +these actions will need to be dispatched individually. This makes 'time travel' in Redux much more difficult, as the +various updates occur individually and cannot easily be rolled back. Additionally, each update will result in redux informing subscribers of +an update! Redux-scc avoids this by providing `batchUpdate`. + +batchUpdate takes a name (so you can easily identify the action in the redux dev tools), and an array of redux-scc actions. These +actions will be performed as part of one redux update, thus avoiding the unfortunate side effects mentioned above. + +``` +const anExampleBatchUpdate = batchUpdate({ + name: 'an example!', + actions: [ + actions.someReduxSccReducer.reset(), + actions.anotherReduxSccReducer.replace('foo!'), + ], +}); +``` + +If a reducer is affected by the actions multiple times, the actions will play out sequentially. + +``` +//We start with the reducer (which is an array type reducer) having state: [4,5,6] + +const exampleBatchedUpdateHittingSameReducerMultipleTimes = batchUpdate({ + name: 'multiple update funsies!', + actions: [ + actions.removeAtIndex(1), //removes 5 - [4,6] + actions.replaceAtIndex(23, 1), //replaces 6 with 23 - [4, 23] + actions.push(43), //adds 43 to the end of the array - [4, 23, 43] + ], +}); + +``` + #### Examples ##### Basic diff --git a/src/__tests__/buildStoreChunk.test.js b/src/__tests__/buildStoreChunk.test.js index eda70ac..27fcc5a 100644 --- a/src/__tests__/buildStoreChunk.test.js +++ b/src/__tests__/buildStoreChunk.test.js @@ -1,117 +1,153 @@ import { - buildStoreChunk, +buildStoreChunk, } from '../buildStoreChunk'; import { - Types, +Types, } from '../structure'; import { - createStore, - combineReducers, +batchUpdate, +} from '../reducers/batchUpdates'; +import { +createStore, +combineReducers, } from 'redux'; import isFunction from 'lodash/isFunction'; + describe('buildStoreChunk', () => { - describe('buildStoreChunk', () => { - it('Will throw error if a structure is not defined', () => { - expect(() => buildStoreChunk('toast')).toThrowError(/structure/); - }); - it('Will accept a single reducer (no nesting)', () => { - expect(Object.keys(buildStoreChunk('toast', Types.reducer(Types.string()) )) ) - .toEqual(['reducers', 'actions', 'selectors']); - }); - it('Will return an object containing reducers, actions, and selectors as the result', () => { - expect(Object.keys(buildStoreChunk('toast', { - example: Types.reducer(Types.string()), - }))).toEqual(['reducers', 'actions', 'selectors']); - }); - - describe('Resulting chunk', () => { - const chunk = buildStoreChunk('example', { - nested1: Types.reducer(Types.string('foo')), - nested2: Types.reducer(Types.shape({ - foo: Types.number(), - bar: Types.string(), - })), - nested3: Types.reducer(Types.arrayOf(Types.number(), [1, 2, 3])), - nested4: Types.reducer({ - innerNested1: Types.reducer(Types.string('bar')), - innerNested2: Types.reducer({ - innerNested3: Types.reducer(Types.string('baz')), - }), - }), - }); - const nonNestedChunk = buildStoreChunk('example2', Types.reducer(Types.string('foo'))); - - describe('Selectors', () => { - const store = createStore(combineReducers({ - ...chunk.reducers, - })); - - it('Selectors object has the correct top level structure for a nested chunk', () => { - expect(Object.keys(chunk.selectors)).toEqual(['nested1', 'nested2', 'nested3', 'nested4']); - }); - it('Selectors object is a function for a non-nested chunk', () => { - expect(isFunction(nonNestedChunk.selectors)).toBe(true); - }); - it('Nested selectors object has the correct structure for a defined reducer', () => { - expect(Object.keys(chunk.selectors.nested4)).toEqual(['innerNested1', 'innerNested2']); - }); - it('Selector returns correct value', () => { - expect(chunk.selectors.nested1(store.getState())).toEqual('foo'); - }); - it('Nested selector returns correct value', () => { - expect(chunk.selectors.nested4.innerNested1(store.getState())).toEqual('bar'); - }); - }); - - describe('Actions', () => { - it('Actions object has the correct top level structure for a nested chunk', () => { - expect(Object.keys(chunk.actions)).toEqual(['nested1', 'nested2', 'nested3', 'nested4']); - }); - it('Actions object has the correct top level structure for a non nested chunk', () => { - expect(Object.keys(nonNestedChunk.actions)).toEqual(['replace', 'reset']); - }); - it('Nested actions object has the correct structure for a chunk', () => { - expect(Object.keys(chunk.actions.nested4)).toEqual(['innerNested1', 'innerNested2']); - }); - it('Replace actions return an object that contains a type and payload', () => { - expect(Object.keys(chunk.actions.nested1.replace('bar'))).toEqual(['type', 'payload']); - expect(Object.keys(chunk.actions.nested2.replace({}))).toEqual(['type', 'payload']); - expect(Object.keys(chunk.actions.nested3.replace([]))).toEqual(['type', 'payload', 'index']); - }); - }); - - describe('Combined actions and selectors (nested chunk)', () => { - const store = createStore(combineReducers({ - ...chunk.reducers, - ...nonNestedChunk.reducers, - })); - - it('Dispatching an action should correctly update the store', () => { - store.dispatch(chunk.actions.nested1.replace('bar')); - expect(chunk.selectors.nested1(store.getState())).toEqual('bar'); - - store.dispatch(chunk.actions.nested1.reset()); - expect(chunk.selectors.nested1(store.getState())).toEqual('foo'); - }); - }); - - describe('Combined actions and selectors (non nested chunk)', () => { - const store = createStore(combineReducers({ - ...chunk.reducers, - ...nonNestedChunk.reducers, - })); - - it('Dispatching an action should correctly update the store', () => { - store.dispatch(nonNestedChunk.actions.replace('bar')); - expect(nonNestedChunk.selectors(store.getState())).toEqual('bar'); - - store.dispatch(nonNestedChunk.actions.reset()); - expect(nonNestedChunk.selectors(store.getState())).toEqual('foo'); - }); - }); - - }); - + it('Will throw error if a structure is not defined', () => { + expect(() => buildStoreChunk('toast')).toThrowError(/structure/); }); + it('Will accept a single reducer (no nesting)', () => { + expect(Object.keys(buildStoreChunk('toast', Types.reducer(Types.string()) )) ) + .toEqual(['reducers', 'actions', 'selectors']); + }); + it('Will return an object containing reducers, actions, and selectors as the result', () => { + expect(Object.keys(buildStoreChunk('toast', { + example: Types.reducer(Types.string()), + }))).toEqual(['reducers', 'actions', 'selectors']); + }); + + describe('Resulting chunk', () => { + const chunk = buildStoreChunk('example', { + nested1: Types.reducer(Types.string('foo')), + nested2: Types.reducer(Types.shape({ + foo: Types.number(), + bar: Types.string(), + })), + nested3: Types.reducer(Types.arrayOf(Types.number(), [1, 2, 3])), + nested4: Types.reducer({ + innerNested1: Types.reducer(Types.string('bar')), + innerNested2: Types.reducer({ + innerNested3: Types.reducer(Types.string('baz')), + }), + }), + }); + const nonNestedChunk = buildStoreChunk('example2', Types.reducer(Types.string('foo'))); + + describe('Selectors', () => { + const store = createStore(combineReducers({ + ...chunk.reducers, + })); + + it('Selectors object has the correct top level structure for a nested chunk', () => { + expect(Object.keys(chunk.selectors)).toEqual(['nested1', 'nested2', 'nested3', 'nested4']); + }); + it('Selectors object is a function for a non-nested chunk', () => { + expect(isFunction(nonNestedChunk.selectors)).toBe(true); + }); + it('Nested selectors object has the correct structure for a defined reducer', () => { + expect(Object.keys(chunk.selectors.nested4)).toEqual(['innerNested1', 'innerNested2']); + }); + it('Selector returns correct value', () => { + expect(chunk.selectors.nested1(store.getState())).toEqual('foo'); + }); + it('Nested selector returns correct value', () => { + expect(chunk.selectors.nested4.innerNested1(store.getState())).toEqual('bar'); + }); + }); + + describe('Actions', () => { + it('Actions object has the correct top level structure for a nested chunk', () => { + expect(Object.keys(chunk.actions)).toEqual(['nested1', 'nested2', 'nested3', 'nested4']); + }); + it('Actions object has the correct top level structure for a non nested chunk', () => { + expect(Object.keys(nonNestedChunk.actions)).toEqual(['replace', 'reset']); + }); + it('Nested actions object has the correct structure for a chunk', () => { + expect(Object.keys(chunk.actions.nested4)).toEqual(['innerNested1', 'innerNested2']); + }); + it('Replace actions return an object that contains a type and payload', () => { + expect(Object.keys(chunk.actions.nested1.replace('bar'))).toEqual(['type', 'payload']); + expect(Object.keys(chunk.actions.nested2.replace({}))).toEqual(['type', 'payload']); + expect(Object.keys(chunk.actions.nested3.replace([]))).toEqual(['type', 'payload', 'index']); + }); + }); + + describe('Combined actions and selectors (nested chunk)', () => { + const store = createStore(combineReducers({ + ...chunk.reducers, + ...nonNestedChunk.reducers, + })); + + it('Dispatching an action should correctly update the store', () => { + store.dispatch(chunk.actions.nested1.replace('bar')); + expect(chunk.selectors.nested1(store.getState())).toEqual('bar'); + + store.dispatch(chunk.actions.nested1.reset()); + expect(chunk.selectors.nested1(store.getState())).toEqual('foo'); + }); + }); + + describe('Combined actions and selectors (non nested chunk)', () => { + const store = createStore(combineReducers({ + ...chunk.reducers, + ...nonNestedChunk.reducers, + })); + + it('Dispatching an action should correctly update the store', () => { + store.dispatch(nonNestedChunk.actions.replace('bar')); + expect(nonNestedChunk.selectors(store.getState())).toEqual('bar'); + + store.dispatch(nonNestedChunk.actions.reset()); + expect(nonNestedChunk.selectors(store.getState())).toEqual('foo'); + }); + }); + + + describe('Batch updates', () => { + const store = createStore(combineReducers({ + ...chunk.reducers, + ...nonNestedChunk.reducers, + })); + + it('Dispatching a batchUpdate updates the store correctly', () => { + store.dispatch(batchUpdate({ + name: 'batchUpdateFunsies', + actions: [ + nonNestedChunk.actions.replace('bar'), + chunk.actions.nested2.update({ + foo: 4, + }), + chunk.actions.nested2.update({ + bar: 'boop!', + }), + chunk.actions.nested3.replace([ + 4,5,6 + ]), + chunk.actions.nested3.removeAtIndex(1), + ], + })); + expect(nonNestedChunk.selectors(store.getState())).toEqual('bar'); + expect(chunk.selectors.nested2(store.getState())).toEqual({ + foo: 4, + bar: 'boop!', + }); + expect(chunk.selectors.nested3(store.getState())).toEqual([ + 4,6, + ]); + }); + }); + }); + }); diff --git a/src/__tests__/reducers.test.js b/src/__tests__/reducers.test.js index 951e6e3..4d79c7e 100644 --- a/src/__tests__/reducers.test.js +++ b/src/__tests__/reducers.test.js @@ -51,7 +51,7 @@ describe('reducers', () => { describe('determineReducerType', () => { it('should return the correct creator function for the default mapping', () => { - forEach(omit(Types, 'reducer', 'wildcardKey'), structureType => { + forEach({ custom: Types.custom(), ...omit(Types, 'reducer', 'wildcardKey', 'custom') }, structureType => { const returnVal = determineReducerType(Types.reducer(structureType()), { name: 'toast', locationString: 'toasty', diff --git a/src/__tests__/structure.test.js b/src/__tests__/structure.test.js index 6a357e1..fe0799b 100644 --- a/src/__tests__/structure.test.js +++ b/src/__tests__/structure.test.js @@ -19,6 +19,7 @@ describe('Type descriptions', () => { expect(Types.number()().defaultValue).toBe(0); expect(Types.boolean()().defaultValue).toBe(false); expect(Types.arrayOf()().defaultValue).toEqual([]); + expect(Types.custom()()().defaultValue).toBeUndefined(); }); it('will return the default value provided (except for reducer and shape)', () => { @@ -26,6 +27,7 @@ describe('Type descriptions', () => { expect(Types.number(5)().defaultValue).toBe(5); expect(Types.boolean(true)().defaultValue).toBe(true); expect(Types.arrayOf(Types.number(), [1, 2, 3])().defaultValue).toEqual([1, 2, 3]); + expect(Types.custom()('foo')().defaultValue).toBe('foo'); }); it('will return the correct typeofValue (for string, number, and boolean)', () => { @@ -40,4 +42,23 @@ describe('Type descriptions', () => { expect(Types.arrayOf(structureTest)().structure).toEqual(structureTest); expect(Types.reducer(structureTest)().structure).toEqual(structureTest); }); + + it('custom value correctly exposes the validator and validation error message properties', () => { + const customValidator = () => false; + const customErrorMessage = () => 'Hai!'; + const customType = Types.custom({ + validator: customValidator, + validationErrorMessage: customErrorMessage, + })()(); + + expect(customType.validator).toEqual(customValidator); + expect(customType.validationErrorMessage).toEqual(customErrorMessage); + }); + + it('custom value acts the same as any when no configuration provided', () => { + const unconfiguredCustom = Types.custom()()(); + expect(unconfiguredCustom.validator('toasty')).toBe(true); + expect(unconfiguredCustom.validator()).toBe(true); + expect(unconfiguredCustom.validator(null)).toBe(true); + }); }); diff --git a/src/__tests__/validatePayload.test.js b/src/__tests__/validatePayload.test.js index 2dc7152..51d498d 100644 --- a/src/__tests__/validatePayload.test.js +++ b/src/__tests__/validatePayload.test.js @@ -1,6 +1,6 @@ import { Types } from '../structure'; import { - validatePrimitive, + validateValue, validateShape, validateArray, getTypeValidation, @@ -10,20 +10,31 @@ import { describe('Validation functionality', () => { - describe('Primitives', () => { + describe('Primitives/Custom', () => { + const customType = Types.custom({ + validator: value => value === 3, + validationErrorMessage: value => `Oh noes! ${ value }`, + })(); + it('Number primitive should allow for numbers', () => { - expect(validatePrimitive(Types.number(), 3)).toBe(3); + expect(validateValue(Types.number(), 3)).toBe(3); }); it('String primitive should allow for string', () => { - expect(validatePrimitive(Types.string(), 'toast')).toBe('toast'); + expect(validateValue(Types.string(), 'toast')).toBe('toast'); }); it('Boolean primitive should allow for string', () => { - expect(validatePrimitive(Types.boolean(), true)).toBe(true); + expect(validateValue(Types.boolean(), true)).toBe(true); }); it('Any should allow for anything', () => { const date = new Date(); - expect(validatePrimitive(Types.any(), date)).toEqual(date); - }) + expect(validateValue(Types.any(), date)).toEqual(date); + }); + it('should validate custom values using the custom validator', () => { + expect(validateValue(customType, 3)).toBe(3); + }); + it('should return undefined from custom validators which failed', () => { + expect(validateValue(customType, 4)).toBeUndefined(); + }); }); describe('Arrays', () => { @@ -45,11 +56,12 @@ describe('Validation functionality', () => { .toEqual([{test1: 3},{test1: 4}]); }); const testArrayStructure3 = Types.arrayOf(Types.shape({ - test1: Types.arrayOf(Types.number()) + test1: Types.arrayOf(Types.number()), + test2: Types.custom({ validator: value => value === 'foo' })(), })); it('Arrays should allow for complex objects - test 2', () => { - expect(validateArray(testArrayStructure3, [{test1: [3,4,5]}])) - .toEqual([{test1: [3,4,5]}]); + expect(validateArray(testArrayStructure3, [{test1: [3,4,5], test2: 'foo' }])) + .toEqual([{test1: [3,4,5], test2: 'foo' }]); }); it('Array should return an empty array if a non-array is passed', () => { expect(validateArray('foo')).toEqual([]); @@ -59,14 +71,15 @@ describe('Validation functionality', () => { describe('Objects', () => { const testObjectStructure = Types.shape({ test1: Types.string(), - test2: Types.number() + test2: Types.number(), + test3: Types.custom({ validator: value => value !== 4 })(), }); it('Object of primitives should allow all props present in the structure', () => { - expect(validateShape(testObjectStructure, { test1: 'toast', test2: 3 })) - .toEqual({ test1: 'toast', test2: 3 }); + expect(validateShape(testObjectStructure, { test1: 'toast', test2: 3, test3: 1 })) + .toEqual({ test1: 'toast', test2: 3, test3: 1 }); }); it('Object of primitives should only allow for props with values which match their config', () => { - expect(validateShape(testObjectStructure, { test1: 5, test2: 3 })) + expect(validateShape(testObjectStructure, { test1: 5, test2: 3, test3: 4 })) .toEqual({ test2: 3 }); }); it('Object of primitives should strip any properties not part of the config', () => { diff --git a/src/index.js b/src/index.js index 6a1325e..ed6b707 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,9 @@ import { Types } from './structure'; import { buildStoreChunk } from './buildStoreChunk'; +import { batchUpdate } from './reducers/batchUpdates'; export { Types, buildStoreChunk, + batchUpdate, } diff --git a/src/reducers.js b/src/reducers.js index 3fe4ddb..6cc7f55 100644 --- a/src/reducers.js +++ b/src/reducers.js @@ -49,6 +49,7 @@ export const REDUCER_CREATOR_MAPPING: { [key: PropTypeKeys]: any } = { [PROP_TYPES._string]: createPrimitiveReducer, [PROP_TYPES._number]: createPrimitiveReducer, [PROP_TYPES._any]: createPrimitiveReducer, + [PROP_TYPES._custom]: createPrimitiveReducer, }; diff --git a/src/reducers/__tests__/batchUpdates.test.js b/src/reducers/__tests__/batchUpdates.test.js new file mode 100644 index 0000000..7bed142 --- /dev/null +++ b/src/reducers/__tests__/batchUpdates.test.js @@ -0,0 +1,61 @@ +//@flow +import { + getApplicableBatchActions, + batchUpdate, + isBatchAction, + BATCH_UPDATE, +} from '../batchUpdates'; + + +describe('getApplicableBatchActions', () => { + const exampleBehaviors = { + foo: { + reducer: () => {}, + }, + }; + const exampleBatchActions = [ + { type: 'foo', payload: 'boop' }, + { type: 'bar', payload: 'boop' }, + ]; + + it('should return an array of all applicable batch actions', () => { + expect(getApplicableBatchActions(exampleBehaviors)(exampleBatchActions)).toEqual([ + { type: 'foo', payload: 'boop' }, + ]); + }); +}); + + +describe('isBatchAction', () => { + it('should return true if action contains batch action string', () => { + expect(isBatchAction(`Boop!${ BATCH_UPDATE }`)).toBe(true); + }); + + + it('should return false if action does not contain batch action string', () => { + expect(isBatchAction('')).toBe(false); + }); + + + it('should not crash if undefined or null is passed', () => { + expect(isBatchAction()).toBe(false); + expect(isBatchAction(null)).toBe(false); + }); +}); + + +describe('batchUpdate action', () => { + it('should return an action with a type including the batch update string and name', () => { + expect(batchUpdate({ + name: 'boop!' + }).type).toMatch(new RegExp(`${ BATCH_UPDATE }`)); + }); + + + it('should return actions as the payload', () => { + const example = []; + expect(batchUpdate({ + actions: example, + }).payload).toBe(example); + }); +}); \ No newline at end of file diff --git a/src/reducers/arrayReducer.js b/src/reducers/arrayReducer.js index 86340d7..e740062 100644 --- a/src/reducers/arrayReducer.js +++ b/src/reducers/arrayReducer.js @@ -38,13 +38,18 @@ export type ArraySelector = (state: Object) => Array; //============================== // JS imports //============================== -import reduce from 'lodash/reduce'; import isArray from 'lodash/isArray'; import isNumber from 'lodash/isNumber'; -import { validateArray, validateShape, validatePrimitive } from '../validatePayload'; +import { validateArray, validateShape, validateValue } from '../validatePayload'; import { createReducerBehaviors } from '../reducers'; import { updateAtIndex, removeAtIndex } from '../utils/arrayUtils'; import { PROP_TYPES } from '../structure'; +import { + isBatchAction, + getApplicableBatchActions +} from './batchUpdates'; + +const reduce = require('lodash/fp/reduce').convert({ cap: false }); function checkIndex(index: ?number, payload: any = '', behaviorName: string): boolean { @@ -151,17 +156,29 @@ export function createReducer(arrayTypeDescription: ArrayStructureType, behavior //Return the array reducer. return (state: Array = initialValue, { type, payload, index }: ArrayReducerAction) => { - //If the action type does not match any of the specified behaviors, just return the current state. - if (!behaviors[type]) return state; - //Validating the payload of an array is more tricky, as we do not know ahead of time if the - //payload should be an object, primitive, or an array. However, we can still validate here based on the - //payload type passed. - return behaviors[type].reducer( - state, - behaviors[type].validate ? applyValidation(arrayTypeDescription, payload) : payload, + const matchedBehaviors = behaviors[type] + ? [{ type, payload }] + : isBatchAction(type) + ? getApplicableBatchActions(behaviors)(payload) + : []; + + if (matchedBehaviors.length) { + //Call every behaviour relevant to this reducer as part of this action call, + //and merge the result (later actions take priority). + //Sanitize the payload using the reducer shape, then apply the sanitized + //payload to the state using the behavior linked to this action type. + return reduce((interimState, matchedBehavior) => behaviors[matchedBehavior.type].reducer( + interimState, + behaviors[matchedBehavior.type].validate + ? applyValidation(arrayTypeDescription, matchedBehavior.payload) + : matchedBehavior.payload, initialValue, - index - ); + index, + ), state)(matchedBehaviors); + } + + //If the action type does not match any of the specified behaviors, just return the current state. + return state; } } @@ -180,18 +197,18 @@ export function applyValidation(arrayTypeDescription: ArrayStructureType, payloa // to use, by checking the structure of the array. const { structure } = arrayTypeDescription(); if (structure().type === PROP_TYPES._shape) return validateShape(structure, payload); - return validatePrimitive(structure, payload); + return validateValue(structure, payload); } function createActions(behaviorsConfig: ArrayReducerBehaviorsConfig, locationString: string): ArrayActions { //Take a reducer behavior config object, and create actions using the location string - return reduce(behaviorsConfig, (memo, behavior, name) => ({ + return reduce((memo, behavior, name) => ({ ...memo, [name]: (payload: Array, index: ?number) => ({ type: `${locationString}.${name}`, payload: (behavior.action || (payload => payload))(payload), index, }) - }), {}); + }), {})(behaviorsConfig); } diff --git a/src/reducers/batchUpdates.js b/src/reducers/batchUpdates.js new file mode 100644 index 0000000..7102662 --- /dev/null +++ b/src/reducers/batchUpdates.js @@ -0,0 +1,36 @@ +//@flow +import keys from 'lodash/fp/keys'; +import includes from 'lodash/fp/includes'; +import filter from 'lodash/fp/filter'; + +export const BATCH_UPDATE = '(redux-scc-batch-action)'; + + +type BatchUpdateInterface = { + name?: string, + actions: Array<{ type: string, payload: any, meta?: any }>, +}; +type Behaviors = { + [key: string]: { + [key: string]: { + reducer: (state: mixed, payload: mixed | void, initialState: mixed) => mixed, + }, + }; +} + +export const batchUpdate = ({ + name = '', + actions, +}: BatchUpdateInterface) => ({ + type: `${ name }${ BATCH_UPDATE }`, + payload: actions, +}); + + +export const isBatchAction = (actionType: string) => actionType + ? actionType.indexOf(BATCH_UPDATE) > -1 + : false; + + +export const getApplicableBatchActions = (behaviors: Behaviors) => + filter(({ type }) => includes(type)(keys(behaviors))); \ No newline at end of file diff --git a/src/reducers/objectReducer.js b/src/reducers/objectReducer.js index 2b86e21..07c900c 100644 --- a/src/reducers/objectReducer.js +++ b/src/reducers/objectReducer.js @@ -38,13 +38,18 @@ export type ShapeReducerOptions = { //============================== // JS imports //============================== -import reduce from 'lodash/reduce'; import isObject from 'lodash/isObject'; import omit from 'lodash/omit'; +import merge from 'lodash/fp/merge'; import { validateShape } from '../validatePayload'; import { createReducerBehaviors } from '../reducers'; import { PROP_TYPES } from '../structure'; +import { + isBatchAction, + getApplicableBatchActions +} from './batchUpdates'; +const reduce = require('lodash/fp/reduce').convert({ cap: false }); //============================== // Shape behaviors @@ -92,12 +97,12 @@ export function createShapeReducer(reducerShape: StructureType, { export function calculateDefaults(reducerStructure: any) { - return reduce(omit(reducerStructure, ['_wildcardKey']), (memo, propValue, propName) => ({ + return reduce((memo, propValue, propName) => ({ ...memo, [propName]: propValue().type === PROP_TYPES._shape ? calculateDefaults(propValue().structure) : propValue().defaultValue, - }), {}); + }), {})(omit(reducerStructure, ['_wildcardKey'])); } @@ -105,28 +110,41 @@ export function createReducer(objectStructure: StructureType, behaviors: ShapeRe const initialState: Object = validateShape(objectStructure, calculateDefaults(objectStructure().structure)); return (state = initialState, { type, payload }: ShapeReducerAction) => { //If the action type does not match any of the specified behaviors, just return the current state. - if (!behaviors[type]) return state; + const matchedBehaviors = behaviors[type] + ? [{ type, payload }] + : isBatchAction(type) + ? getApplicableBatchActions(behaviors)(payload) + : []; - //Sanitize the payload using the reducer shape, then apply the sanitized - //payload to the state using the behavior linked to this action type. - return behaviors[type].reducer( - state, - behaviors[type].validate ? validateShape(objectStructure, payload) : payload, - initialState - ); + if (matchedBehaviors.length) { + //Sanitize the payload using the reducer shape, then apply the sanitized + //payload to the state using the behavior linked to this action type. + return reduce((interimState, matchedBehavior) => merge( + interimState, + behaviors[matchedBehavior.type].reducer( + interimState, + behaviors[matchedBehavior.type].validate + ? validateShape(objectStructure, matchedBehavior.payload) + : matchedBehavior.payload, + initialState + ) + ), state)(matchedBehaviors); + } + + return state; } } function createActions(behaviorsConfig: ShapeReducerBehaviorsConfig, locationString: string): ShapeActions { //Take a reducer behavior config object, and create actions using the location string - return reduce(behaviorsConfig, (memo, behavior, name) => ({ + return reduce((memo, behavior, name) => ({ ...memo, [name]: (payload: Object) => ({ type: `${locationString}.${name}`, payload: (behavior.action || (payload => payload))(payload), }) - }), {}); + }), {})(behaviorsConfig); } diff --git a/src/reducers/primitiveReducer.js b/src/reducers/primitiveReducer.js index 3c06ff5..9fbd481 100644 --- a/src/reducers/primitiveReducer.js +++ b/src/reducers/primitiveReducer.js @@ -36,9 +36,14 @@ export type PrimitiveReducerOptions = { //============================== // JS imports //============================== -import reduce from 'lodash/reduce'; -import { validatePrimitive } from '../validatePayload'; +import { validateValue } from '../validatePayload'; import { createReducerBehaviors } from '../reducers'; +import { + isBatchAction, + getApplicableBatchActions +} from './batchUpdates'; + +const reduce = require('lodash/fp/reduce').convert({ cap: false }); //============================== @@ -81,31 +86,43 @@ export function createPrimitiveReducer(primitiveType: PrimitiveType, { function createReducer(primitiveType: PrimitiveType, behaviors: PrimitiveReducerBehaviors): PrimitiveReducer { //Calculate and validate the initial state of the reducer - const initialState: mixed = validatePrimitive(primitiveType, primitiveType().defaultValue); + const initialState: mixed = validateValue(primitiveType, primitiveType().defaultValue); return (state = initialState, { type, payload }: PrimitiveReducerAction) => { //If the action type does not match any of the specified behaviors, just return the current state. - if (!behaviors[type]) return state; + const matchedBehaviors = behaviors[type] + ? [{ type, payload }] + : isBatchAction(type) + ? getApplicableBatchActions(behaviors)(payload) + : []; - //Sanitize the payload using the reducer shape, then apply the sanitized - //payload to the state using the behavior linked to this action type. - return behaviors[type].reducer( - state, - behaviors[type].validate ? validatePrimitive(primitiveType, payload) : payload, - initialState - ); + if (matchedBehaviors.length) { + //Call every behaviour relevant to this reducer as part of this action call, + //and merge the result (later actions take priority). + //Sanitize the payload using the reducer shape, then apply the sanitized + //payload to the state using the behavior linked to this action type. + return reduce((interimState, matchedBehavior) => behaviors[matchedBehavior.type].reducer( + interimState, + behaviors[matchedBehavior.type].validate + ? validateValue(primitiveType, matchedBehavior.payload) + : matchedBehavior.payload, + initialState + ), state)(matchedBehaviors); + } + + return state; } } function createActions(behaviorsConfig: PrimitiveReducerBehaviorsConfig, locationString: string): PrimitiveActions { //Take a reducer behavior config object, and create actions using the location string - return reduce(behaviorsConfig, (memo, behavior, name) => ({ + return reduce((memo, behavior, name) => ({ ...memo, [name]: (payload: mixed) => ({ type: `${locationString}.${name}`, payload: (behavior.action || (payload => payload))(payload), }) - }), {}); + }), {})(behaviorsConfig); } diff --git a/src/structure.js b/src/structure.js index 3c87948..4859bbf 100644 --- a/src/structure.js +++ b/src/structure.js @@ -44,6 +44,7 @@ export const PROP_TYPES = { _array: '_array', _any: '_any', _wildcardKey: '_wildcardKey', + _custom: '_custom', }; //The types objects are used in order to build up the structure of a store chunk, and provide/accept @@ -82,5 +83,17 @@ export const Types: TypesObject = { type: PROP_TYPES._shape, structure, }), + custom: ({ + validator = () => true, + validationErrorMessage = (value: any) => `${ value } failed custom type validation`, + }: { + validator: (value: any) => boolean, + validationErrorMessage: (value: any) => string, + } = {}) => (defaultValue: any) => () => ({ + type: PROP_TYPES._custom, + defaultValue, + validator, + validationErrorMessage, + }), wildcardKey: () => PROP_TYPES._wildcardKey, }; diff --git a/src/validatePayload.js b/src/validatePayload.js index 00dd0f4..09eace6 100644 --- a/src/validatePayload.js +++ b/src/validatePayload.js @@ -60,10 +60,17 @@ export function validateShape(objectStructure: any, value: mixed): Object { } -export function validatePrimitive(primitive: any, value: any): mixed { - //Validate primitives using the typeofValue property of the primitive type definitions. - if (typeof value === primitive().typeofValue || primitive().typeofValue === 'any') return value; - return console.warn(`The value, ${value}, did not match the type specified (${primitive().type}).`); +export function validateValue(primitive: any, value: any): mixed { + const evaluatedPrimitive = primitive(); + //If this value is a custom value, then we should apply it's custom validator! + if (evaluatedPrimitive.type === PROP_TYPES._custom) { + if (evaluatedPrimitive.validator(value)) return value; + return console.warn(evaluatedPrimitive.validationErrorMessage(value)); + } + + //Otherwise we will use the standard, basic, typeof checks. + if (typeof value === evaluatedPrimitive.typeofValue || evaluatedPrimitive.typeofValue === 'any') return value; + return console.warn(`The value, ${value}, did not match the type specified (${evaluatedPrimitive.type}).`); } @@ -82,12 +89,13 @@ export function validateArray(arrayStructure: any, value: Array): Array