From 0d95feb3e9f09a6feeedbd30e0cc831129fb5251 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Mon, 26 Oct 2020 18:16:42 +0530 Subject: [PATCH] updates java files --- 25780367.java | 2 - 4) BEATBOX using JS/index.html | 124 +- 4) BEATBOX using JS/script.js | 206 +- 4) BEATBOX using JS/style.css | 112 +- 5) JARVIS/app.js | 176 +- 5) JARVIS/index.html | 380 +- 5) JARVIS/styles.css | 146 +- ATM.c | 28 +- AVL tree.c | 982 +- ArrayElementFrequency.java | 98 +- BuildRoads.cpp | 108 +- BuildingTeams.cpp | 176 +- C++/Memory Game - 1.cpp | 894 +- C++/Movie Database - 2.cpp | 806 +- C++/Student System - 3.cpp | 378 +- C++/Vending Machine - 4.cpp | 814 +- CountingRooms.cpp | 134 +- Factorial.java | 42 +- FindGreatestNumber.java | 70 +- GamerNishant_RadixSort.cpp.cpp | 118 +- HelloWorld.java | 18 +- JAVA /MergeSortInLinkedList/ListNode.class | Bin 395 -> 0 bytes .../MergeSortIn2LinkedList.class | Bin 1241 -> 0 bytes .../MergeSortIn2LinkedList.java | 64 - JavaScript/insertion_sort.js | 23 - Javacode/Avltree.java | 213 - Javacode/sort.java | 30 - Kadane Algorithm.txt | 29 - LCM-GCD.java | 28 - LICENSE | 21 - Languages/.DS_Store | Bin 10244 -> 0 bytes Languages/APIs/first_request.js | 19 - Languages/APIs/movie-rating/index.js | 22 - .../APIs/movie-rating/node_modules/.bin/mime | 1 - .../movie-rating/node_modules/.bin/sshpk-conv | 1 - .../movie-rating/node_modules/.bin/sshpk-sign | 1 - .../node_modules/.bin/sshpk-verify | 1 - .../APIs/movie-rating/node_modules/.bin/uuid | 1 - .../node_modules/accepts/HISTORY.md | 236 - .../movie-rating/node_modules/accepts/LICENSE | 23 - .../node_modules/accepts/README.md | 142 - .../node_modules/accepts/index.js | 238 - .../node_modules/accepts/package.json | 86 - .../node_modules/ajv/.tonic_example.js | 20 - .../movie-rating/node_modules/ajv/LICENSE | 22 - .../movie-rating/node_modules/ajv/README.md | 1359 --- .../node_modules/ajv/dist/ajv.bundle.js | 7172 ------------ .../node_modules/ajv/dist/ajv.min.js | 3 - .../node_modules/ajv/dist/ajv.min.js.map | 1 - .../node_modules/ajv/lib/ajv.d.ts | 390 - .../movie-rating/node_modules/ajv/lib/ajv.js | 497 - .../node_modules/ajv/lib/cache.js | 26 - .../node_modules/ajv/lib/compile/async.js | 90 - .../node_modules/ajv/lib/compile/equal.js | 5 - .../ajv/lib/compile/error_classes.js | 34 - .../node_modules/ajv/lib/compile/formats.js | 149 - .../node_modules/ajv/lib/compile/index.js | 387 - .../node_modules/ajv/lib/compile/resolve.js | 270 - .../node_modules/ajv/lib/compile/rules.js | 66 - .../ajv/lib/compile/schema_obj.js | 9 - .../ajv/lib/compile/ucs2length.js | 20 - .../node_modules/ajv/lib/compile/util.js | 274 - .../movie-rating/node_modules/ajv/lib/data.js | 49 - .../node_modules/ajv/lib/definition_schema.js | 37 - .../node_modules/ajv/lib/dot/_limit.jst | 104 - .../node_modules/ajv/lib/dot/_limitItems.jst | 10 - .../node_modules/ajv/lib/dot/_limitLength.jst | 10 - .../ajv/lib/dot/_limitProperties.jst | 10 - .../node_modules/ajv/lib/dot/allOf.jst | 34 - .../node_modules/ajv/lib/dot/anyOf.jst | 48 - .../node_modules/ajv/lib/dot/coerce.def | 61 - .../node_modules/ajv/lib/dot/comment.jst | 9 - .../node_modules/ajv/lib/dot/const.jst | 11 - .../node_modules/ajv/lib/dot/contains.jst | 57 - .../node_modules/ajv/lib/dot/custom.jst | 191 - .../node_modules/ajv/lib/dot/defaults.def | 47 - .../node_modules/ajv/lib/dot/definitions.def | 201 - .../node_modules/ajv/lib/dot/dependencies.jst | 80 - .../node_modules/ajv/lib/dot/enum.jst | 30 - .../node_modules/ajv/lib/dot/errors.def | 194 - .../node_modules/ajv/lib/dot/format.jst | 106 - .../node_modules/ajv/lib/dot/if.jst | 75 - .../node_modules/ajv/lib/dot/items.jst | 100 - .../node_modules/ajv/lib/dot/missing.def | 39 - .../node_modules/ajv/lib/dot/multipleOf.jst | 20 - .../node_modules/ajv/lib/dot/not.jst | 43 - .../node_modules/ajv/lib/dot/oneOf.jst | 54 - .../node_modules/ajv/lib/dot/pattern.jst | 14 - .../node_modules/ajv/lib/dot/properties.jst | 244 - .../ajv/lib/dot/propertyNames.jst | 54 - .../node_modules/ajv/lib/dot/ref.jst | 85 - .../node_modules/ajv/lib/dot/required.jst | 108 - .../node_modules/ajv/lib/dot/uniqueItems.jst | 62 - .../node_modules/ajv/lib/dot/validate.jst | 282 - .../node_modules/ajv/lib/dotjs/README.md | 3 - .../node_modules/ajv/lib/dotjs/_limit.js | 157 - .../node_modules/ajv/lib/dotjs/_limitItems.js | 77 - .../ajv/lib/dotjs/_limitLength.js | 82 - .../ajv/lib/dotjs/_limitProperties.js | 77 - .../node_modules/ajv/lib/dotjs/allOf.js | 43 - .../node_modules/ajv/lib/dotjs/anyOf.js | 74 - .../node_modules/ajv/lib/dotjs/comment.js | 14 - .../node_modules/ajv/lib/dotjs/const.js | 56 - .../node_modules/ajv/lib/dotjs/contains.js | 82 - .../node_modules/ajv/lib/dotjs/custom.js | 228 - .../ajv/lib/dotjs/dependencies.js | 168 - .../node_modules/ajv/lib/dotjs/enum.js | 66 - .../node_modules/ajv/lib/dotjs/format.js | 150 - .../node_modules/ajv/lib/dotjs/if.js | 104 - .../node_modules/ajv/lib/dotjs/index.js | 33 - .../node_modules/ajv/lib/dotjs/items.js | 141 - .../node_modules/ajv/lib/dotjs/multipleOf.js | 77 - .../node_modules/ajv/lib/dotjs/not.js | 84 - .../node_modules/ajv/lib/dotjs/oneOf.js | 73 - .../node_modules/ajv/lib/dotjs/pattern.js | 75 - .../node_modules/ajv/lib/dotjs/properties.js | 330 - .../ajv/lib/dotjs/propertyNames.js | 82 - .../node_modules/ajv/lib/dotjs/ref.js | 124 - .../node_modules/ajv/lib/dotjs/required.js | 270 - .../node_modules/ajv/lib/dotjs/uniqueItems.js | 86 - .../node_modules/ajv/lib/dotjs/validate.js | 494 - .../node_modules/ajv/lib/keyword.js | 146 - .../node_modules/ajv/lib/refs/data.json | 17 - .../ajv/lib/refs/json-schema-draft-04.json | 149 - .../ajv/lib/refs/json-schema-draft-06.json | 154 - .../ajv/lib/refs/json-schema-draft-07.json | 168 - .../ajv/lib/refs/json-schema-secure.json | 94 - .../node_modules/ajv/package.json | 125 - .../node_modules/ajv/scripts/.eslintrc.yml | 3 - .../node_modules/ajv/scripts/bundle.js | 61 - .../node_modules/ajv/scripts/compile-dots.js | 73 - .../node_modules/ajv/scripts/info | 10 - .../node_modules/ajv/scripts/prepare-tests | 12 - .../ajv/scripts/publish-built-version | 32 - .../node_modules/ajv/scripts/travis-gh-pages | 23 - .../node_modules/array-flatten/LICENSE | 21 - .../node_modules/array-flatten/README.md | 43 - .../array-flatten/array-flatten.js | 64 - .../node_modules/array-flatten/package.json | 64 - .../movie-rating/node_modules/asn1/LICENSE | 19 - .../movie-rating/node_modules/asn1/README.md | 50 - .../node_modules/asn1/lib/ber/errors.js | 13 - .../node_modules/asn1/lib/ber/index.js | 27 - .../node_modules/asn1/lib/ber/reader.js | 262 - .../node_modules/asn1/lib/ber/types.js | 36 - .../node_modules/asn1/lib/ber/writer.js | 317 - .../node_modules/asn1/lib/index.js | 20 - .../node_modules/asn1/package.json | 75 - .../node_modules/assert-plus/AUTHORS | 6 - .../node_modules/assert-plus/CHANGES.md | 14 - .../node_modules/assert-plus/README.md | 162 - .../node_modules/assert-plus/assert.js | 211 - .../node_modules/assert-plus/package.json | 87 - .../node_modules/asynckit/LICENSE | 21 - .../node_modules/asynckit/README.md | 233 - .../node_modules/asynckit/bench.js | 76 - .../node_modules/asynckit/index.js | 6 - .../node_modules/asynckit/lib/abort.js | 29 - .../node_modules/asynckit/lib/async.js | 34 - .../node_modules/asynckit/lib/defer.js | 26 - .../node_modules/asynckit/lib/iterate.js | 75 - .../asynckit/lib/readable_asynckit.js | 91 - .../asynckit/lib/readable_parallel.js | 25 - .../asynckit/lib/readable_serial.js | 25 - .../asynckit/lib/readable_serial_ordered.js | 29 - .../node_modules/asynckit/lib/state.js | 37 - .../node_modules/asynckit/lib/streamify.js | 141 - .../node_modules/asynckit/lib/terminator.js | 29 - .../node_modules/asynckit/package.json | 91 - .../node_modules/asynckit/parallel.js | 43 - .../node_modules/asynckit/serial.js | 17 - .../node_modules/asynckit/serialOrdered.js | 75 - .../node_modules/asynckit/stream.js | 21 - .../node_modules/aws-sign2/LICENSE | 55 - .../node_modules/aws-sign2/README.md | 4 - .../node_modules/aws-sign2/index.js | 212 - .../node_modules/aws-sign2/package.json | 50 - .../node_modules/aws4/.travis.yml | 5 - .../movie-rating/node_modules/aws4/LICENSE | 19 - .../movie-rating/node_modules/aws4/README.md | 523 - .../movie-rating/node_modules/aws4/aws4.js | 332 - .../movie-rating/node_modules/aws4/lru.js | 96 - .../node_modules/aws4/package.json | 104 - .../node_modules/bcrypt-pbkdf/CONTRIBUTING.md | 13 - .../node_modules/bcrypt-pbkdf/LICENSE | 66 - .../node_modules/bcrypt-pbkdf/README.md | 45 - .../node_modules/bcrypt-pbkdf/index.js | 556 - .../node_modules/bcrypt-pbkdf/package.json | 44 - .../node_modules/body-parser/HISTORY.md | 609 -- .../node_modules/body-parser/LICENSE | 23 - .../node_modules/body-parser/README.md | 443 - .../node_modules/body-parser/index.js | 157 - .../node_modules/body-parser/lib/read.js | 181 - .../body-parser/lib/types/json.js | 230 - .../node_modules/body-parser/lib/types/raw.js | 101 - .../body-parser/lib/types/text.js | 121 - .../body-parser/lib/types/urlencoded.js | 284 - .../node_modules/body-parser/package.json | 91 - .../node_modules/bytes/History.md | 87 - .../movie-rating/node_modules/bytes/LICENSE | 23 - .../movie-rating/node_modules/bytes/Readme.md | 126 - .../movie-rating/node_modules/bytes/index.js | 162 - .../node_modules/bytes/package.json | 84 - .../node_modules/caseless/LICENSE | 28 - .../node_modules/caseless/README.md | 45 - .../node_modules/caseless/index.js | 67 - .../node_modules/caseless/package.json | 56 - .../node_modules/caseless/test.js | 67 - .../node_modules/combined-stream/License | 19 - .../node_modules/combined-stream/Readme.md | 138 - .../combined-stream/lib/combined_stream.js | 208 - .../node_modules/combined-stream/package.json | 58 - .../node_modules/combined-stream/yarn.lock | 17 - .../content-disposition/HISTORY.md | 55 - .../node_modules/content-disposition/LICENSE | 22 - .../content-disposition/README.md | 148 - .../node_modules/content-disposition/index.js | 458 - .../content-disposition/package.json | 79 - .../node_modules/content-type/HISTORY.md | 24 - .../node_modules/content-type/LICENSE | 22 - .../node_modules/content-type/README.md | 92 - .../node_modules/content-type/index.js | 222 - .../node_modules/content-type/package.json | 76 - .../node_modules/cookie-signature/.npmignore | 4 - .../node_modules/cookie-signature/History.md | 38 - .../node_modules/cookie-signature/Readme.md | 42 - .../node_modules/cookie-signature/index.js | 51 - .../cookie-signature/package.json | 57 - .../node_modules/cookie/HISTORY.md | 123 - .../movie-rating/node_modules/cookie/LICENSE | 24 - .../node_modules/cookie/README.md | 253 - .../movie-rating/node_modules/cookie/index.js | 198 - .../node_modules/cookie/package.json | 78 - .../node_modules/core-util-is/LICENSE | 19 - .../node_modules/core-util-is/README.md | 3 - .../node_modules/core-util-is/float.patch | 604 -- .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 62 - .../node_modules/core-util-is/test.js | 68 - .../node_modules/dashdash/CHANGES.md | 364 - .../node_modules/dashdash/LICENSE.txt | 24 - .../node_modules/dashdash/README.md | 574 - .../dashdash/etc/dashdash.bash_completion.in | 389 - .../node_modules/dashdash/lib/dashdash.js | 1055 -- .../node_modules/dashdash/package.json | 67 - .../node_modules/debug/.coveralls.yml | 1 - .../movie-rating/node_modules/debug/.eslintrc | 11 - .../node_modules/debug/.npmignore | 9 - .../node_modules/debug/.travis.yml | 14 - .../node_modules/debug/CHANGELOG.md | 362 - .../movie-rating/node_modules/debug/LICENSE | 19 - .../movie-rating/node_modules/debug/Makefile | 50 - .../movie-rating/node_modules/debug/README.md | 312 - .../node_modules/debug/component.json | 19 - .../node_modules/debug/karma.conf.js | 70 - .../movie-rating/node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 91 - .../node_modules/debug/src/browser.js | 185 - .../node_modules/debug/src/debug.js | 202 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/inspector-log.js | 15 - .../node_modules/debug/src/node.js | 248 - .../node_modules/delayed-stream/.npmignore | 1 - .../node_modules/delayed-stream/License | 19 - .../node_modules/delayed-stream/Makefile | 7 - .../node_modules/delayed-stream/Readme.md | 141 - .../delayed-stream/lib/delayed_stream.js | 107 - .../node_modules/delayed-stream/package.json | 62 - .../movie-rating/node_modules/depd/History.md | 96 - .../movie-rating/node_modules/depd/LICENSE | 22 - .../movie-rating/node_modules/depd/Readme.md | 280 - .../movie-rating/node_modules/depd/index.js | 522 - .../node_modules/depd/lib/browser/index.js | 77 - .../depd/lib/compat/callsite-tostring.js | 103 - .../depd/lib/compat/event-listener-count.js | 22 - .../node_modules/depd/lib/compat/index.js | 79 - .../node_modules/depd/package.json | 79 - .../movie-rating/node_modules/destroy/LICENSE | 22 - .../node_modules/destroy/README.md | 60 - .../node_modules/destroy/index.js | 75 - .../node_modules/destroy/package.json | 71 - .../node_modules/ecc-jsbn/LICENSE | 21 - .../node_modules/ecc-jsbn/README.md | 8 - .../node_modules/ecc-jsbn/index.js | 58 - .../node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 - .../node_modules/ecc-jsbn/lib/ec.js | 561 - .../node_modules/ecc-jsbn/lib/sec.js | 170 - .../node_modules/ecc-jsbn/package.json | 65 - .../node_modules/ecc-jsbn/test.js | 14 - .../node_modules/ee-first/LICENSE | 22 - .../node_modules/ee-first/README.md | 80 - .../node_modules/ee-first/index.js | 95 - .../node_modules/ee-first/package.json | 63 - .../node_modules/encodeurl/HISTORY.md | 14 - .../node_modules/encodeurl/LICENSE | 22 - .../node_modules/encodeurl/README.md | 128 - .../node_modules/encodeurl/index.js | 60 - .../node_modules/encodeurl/package.json | 78 - .../node_modules/escape-html/LICENSE | 24 - .../node_modules/escape-html/Readme.md | 43 - .../node_modules/escape-html/index.js | 78 - .../node_modules/escape-html/package.json | 59 - .../movie-rating/node_modules/etag/HISTORY.md | 83 - .../movie-rating/node_modules/etag/LICENSE | 22 - .../movie-rating/node_modules/etag/README.md | 159 - .../movie-rating/node_modules/etag/index.js | 131 - .../node_modules/etag/package.json | 86 - .../node_modules/express/History.md | 3477 ------ .../movie-rating/node_modules/express/LICENSE | 24 - .../node_modules/express/Readme.md | 155 - .../node_modules/express/index.js | 11 - .../node_modules/express/lib/application.js | 644 -- .../node_modules/express/lib/express.js | 116 - .../express/lib/middleware/init.js | 43 - .../express/lib/middleware/query.js | 47 - .../node_modules/express/lib/request.js | 525 - .../node_modules/express/lib/response.js | 1142 -- .../node_modules/express/lib/router/index.js | 662 -- .../node_modules/express/lib/router/layer.js | 181 - .../node_modules/express/lib/router/route.js | 216 - .../node_modules/express/lib/utils.js | 306 - .../node_modules/express/lib/view.js | 182 - .../node_modules/express/package.json | 154 - .../node_modules/extend/.editorconfig | 20 - .../node_modules/extend/.eslintrc | 17 - .../node_modules/extend/.jscs.json | 175 - .../node_modules/extend/.travis.yml | 230 - .../node_modules/extend/CHANGELOG.md | 83 - .../movie-rating/node_modules/extend/LICENSE | 23 - .../node_modules/extend/README.md | 81 - .../node_modules/extend/component.json | 32 - .../movie-rating/node_modules/extend/index.js | 117 - .../node_modules/extend/package.json | 75 - .../node_modules/extsprintf/.gitmodules | 0 .../node_modules/extsprintf/.npmignore | 2 - .../node_modules/extsprintf/LICENSE | 19 - .../node_modules/extsprintf/Makefile | 24 - .../node_modules/extsprintf/Makefile.targ | 285 - .../node_modules/extsprintf/README.md | 46 - .../node_modules/extsprintf/jsl.node.conf | 137 - .../node_modules/extsprintf/lib/extsprintf.js | 183 - .../node_modules/extsprintf/package.json | 44 - .../node_modules/fast-deep-equal/LICENSE | 21 - .../node_modules/fast-deep-equal/README.md | 58 - .../node_modules/fast-deep-equal/index.d.ts | 4 - .../node_modules/fast-deep-equal/index.js | 55 - .../node_modules/fast-deep-equal/package.json | 86 - .../fast-json-stable-stringify/.eslintrc.yml | 26 - .../fast-json-stable-stringify/.npmignore | 4 - .../fast-json-stable-stringify/.travis.yml | 8 - .../fast-json-stable-stringify/LICENSE | 18 - .../fast-json-stable-stringify/README.md | 119 - .../benchmark/index.js | 31 - .../benchmark/test.json | 137 - .../example/key_cmp.js | 7 - .../example/nested.js | 3 - .../fast-json-stable-stringify/example/str.js | 3 - .../example/value_cmp.js | 7 - .../fast-json-stable-stringify/index.js | 59 - .../fast-json-stable-stringify/package.json | 78 - .../fast-json-stable-stringify/test/cmp.js | 13 - .../fast-json-stable-stringify/test/nested.js | 44 - .../fast-json-stable-stringify/test/str.js | 46 - .../test/to-json.js | 22 - .../node_modules/finalhandler/HISTORY.md | 187 - .../node_modules/finalhandler/LICENSE | 22 - .../node_modules/finalhandler/README.md | 148 - .../node_modules/finalhandler/index.js | 331 - .../node_modules/finalhandler/package.json | 80 - .../node_modules/forever-agent/LICENSE | 55 - .../node_modules/forever-agent/README.md | 4 - .../node_modules/forever-agent/index.js | 138 - .../node_modules/forever-agent/package.json | 50 - .../node_modules/form-data/License | 19 - .../node_modules/form-data/README.md | 234 - .../node_modules/form-data/README.md.bak | 234 - .../node_modules/form-data/lib/browser.js | 2 - .../node_modules/form-data/lib/form_data.js | 457 - .../node_modules/form-data/lib/populate.js | 10 - .../node_modules/form-data/package.json | 98 - .../node_modules/form-data/yarn.lock | 2662 ----- .../node_modules/forwarded/HISTORY.md | 16 - .../node_modules/forwarded/LICENSE | 22 - .../node_modules/forwarded/README.md | 57 - .../node_modules/forwarded/index.js | 76 - .../node_modules/forwarded/package.json | 78 - .../node_modules/fresh/HISTORY.md | 70 - .../movie-rating/node_modules/fresh/LICENSE | 23 - .../movie-rating/node_modules/fresh/README.md | 119 - .../movie-rating/node_modules/fresh/index.js | 137 - .../node_modules/fresh/package.json | 90 - .../node_modules/getpass/.npmignore | 8 - .../node_modules/getpass/.travis.yml | 9 - .../movie-rating/node_modules/getpass/LICENSE | 18 - .../node_modules/getpass/README.md | 32 - .../node_modules/getpass/lib/index.js | 123 - .../node_modules/getpass/package.json | 50 - .../node_modules/har-schema/LICENSE | 13 - .../node_modules/har-schema/README.md | 49 - .../har-schema/lib/afterRequest.json | 30 - .../har-schema/lib/beforeRequest.json | 30 - .../node_modules/har-schema/lib/browser.json | 20 - .../node_modules/har-schema/lib/cache.json | 21 - .../node_modules/har-schema/lib/content.json | 29 - .../node_modules/har-schema/lib/cookie.json | 36 - .../node_modules/har-schema/lib/creator.json | 20 - .../node_modules/har-schema/lib/entry.json | 53 - .../node_modules/har-schema/lib/har.json | 13 - .../node_modules/har-schema/lib/header.json | 20 - .../node_modules/har-schema/lib/index.js | 22 - .../node_modules/har-schema/lib/log.json | 36 - .../node_modules/har-schema/lib/page.json | 32 - .../har-schema/lib/pageTimings.json | 18 - .../node_modules/har-schema/lib/postData.json | 43 - .../node_modules/har-schema/lib/query.json | 20 - .../node_modules/har-schema/lib/request.json | 57 - .../node_modules/har-schema/lib/response.json | 54 - .../node_modules/har-schema/lib/timings.json | 42 - .../node_modules/har-schema/package.json | 86 - .../node_modules/har-validator/LICENSE | 9 - .../node_modules/har-validator/README.md | 37 - .../node_modules/har-validator/lib/async.js | 105 - .../node_modules/har-validator/lib/error.js | 17 - .../node_modules/har-validator/lib/promise.js | 102 - .../node_modules/har-validator/package.json | 76 - .../node_modules/http-errors/HISTORY.md | 149 - .../node_modules/http-errors/LICENSE | 23 - .../node_modules/http-errors/README.md | 163 - .../node_modules/http-errors/index.js | 266 - .../node_modules/http-errors/package.json | 93 - .../http-signature/.dir-locals.el | 6 - .../node_modules/http-signature/.npmignore | 7 - .../node_modules/http-signature/CHANGES.md | 46 - .../node_modules/http-signature/LICENSE | 18 - .../node_modules/http-signature/README.md | 79 - .../http-signature/http_signing.md | 363 - .../node_modules/http-signature/lib/index.js | 29 - .../node_modules/http-signature/lib/parser.js | 315 - .../node_modules/http-signature/lib/signer.js | 401 - .../node_modules/http-signature/lib/utils.js | 112 - .../node_modules/http-signature/lib/verify.js | 88 - .../node_modules/http-signature/package.json | 77 - .../node_modules/iconv-lite/Changelog.md | 162 - .../node_modules/iconv-lite/LICENSE | 21 - .../node_modules/iconv-lite/README.md | 156 - .../iconv-lite/encodings/dbcs-codec.js | 555 - .../iconv-lite/encodings/dbcs-data.js | 176 - .../iconv-lite/encodings/index.js | 22 - .../iconv-lite/encodings/internal.js | 188 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 174 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../encodings/tables/gbk-added.json | 55 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - .../iconv-lite/encodings/utf16.js | 177 - .../node_modules/iconv-lite/encodings/utf7.js | 290 - .../iconv-lite/lib/bom-handling.js | 52 - .../iconv-lite/lib/extend-node.js | 217 - .../node_modules/iconv-lite/lib/index.d.ts | 24 - .../node_modules/iconv-lite/lib/index.js | 153 - .../node_modules/iconv-lite/lib/streams.js | 121 - .../node_modules/iconv-lite/package.json | 77 - .../node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 7 - .../node_modules/inherits/inherits_browser.js | 23 - .../node_modules/inherits/package.json | 61 - .../node_modules/ipaddr.js/LICENSE | 19 - .../node_modules/ipaddr.js/README.md | 233 - .../node_modules/ipaddr.js/ipaddr.min.js | 1 - .../node_modules/ipaddr.js/lib/ipaddr.js | 673 -- .../node_modules/ipaddr.js/lib/ipaddr.js.d.ts | 71 - .../node_modules/ipaddr.js/package.json | 69 - .../node_modules/is-typedarray/LICENSE.md | 18 - .../node_modules/is-typedarray/README.md | 16 - .../node_modules/is-typedarray/index.js | 41 - .../node_modules/is-typedarray/package.json | 59 - .../node_modules/is-typedarray/test.js | 34 - .../node_modules/isstream/.jshintrc | 59 - .../node_modules/isstream/.npmignore | 1 - .../node_modules/isstream/.travis.yml | 12 - .../node_modules/isstream/LICENSE.md | 11 - .../node_modules/isstream/README.md | 66 - .../node_modules/isstream/isstream.js | 27 - .../node_modules/isstream/package.json | 61 - .../node_modules/isstream/test.js | 168 - .../movie-rating/node_modules/jsbn/.npmignore | 2 - .../movie-rating/node_modules/jsbn/LICENSE | 40 - .../movie-rating/node_modules/jsbn/README.md | 175 - .../node_modules/jsbn/example.html | 12 - .../movie-rating/node_modules/jsbn/example.js | 3 - .../movie-rating/node_modules/jsbn/index.js | 1357 --- .../node_modules/jsbn/package.json | 53 - .../json-schema-traverse/.eslintrc.yml | 27 - .../json-schema-traverse/.travis.yml | 8 - .../node_modules/json-schema-traverse/LICENSE | 21 - .../json-schema-traverse/README.md | 83 - .../json-schema-traverse/index.js | 89 - .../json-schema-traverse/package.json | 70 - .../json-schema-traverse/spec/.eslintrc.yml | 6 - .../spec/fixtures/schema.js | 125 - .../json-schema-traverse/spec/index.spec.js | 171 - .../node_modules/json-schema/README.md | 5 - .../json-schema/draft-00/hyper-schema | 68 - .../json-schema/draft-00/json-ref | 26 - .../node_modules/json-schema/draft-00/links | 33 - .../node_modules/json-schema/draft-00/schema | 155 - .../json-schema/draft-01/hyper-schema | 68 - .../json-schema/draft-01/json-ref | 26 - .../node_modules/json-schema/draft-01/links | 33 - .../node_modules/json-schema/draft-01/schema | 155 - .../json-schema/draft-02/hyper-schema | 68 - .../json-schema/draft-02/json-ref | 26 - .../node_modules/json-schema/draft-02/links | 35 - .../node_modules/json-schema/draft-02/schema | 166 - .../json-schema/draft-03/examples/address | 20 - .../json-schema/draft-03/examples/calendar | 53 - .../json-schema/draft-03/examples/card | 105 - .../json-schema/draft-03/examples/geo | 8 - .../json-schema/draft-03/examples/interfaces | 23 - .../json-schema/draft-03/hyper-schema | 60 - .../json-schema/draft-03/json-ref | 26 - .../node_modules/json-schema/draft-03/links | 35 - .../node_modules/json-schema/draft-03/schema | 174 - .../json-schema/draft-04/hyper-schema | 60 - .../node_modules/json-schema/draft-04/links | 41 - .../node_modules/json-schema/draft-04/schema | 189 - .../json-schema/draft-zyp-json-schema-03.xml | 1120 -- .../json-schema/draft-zyp-json-schema-04.xml | 1072 -- .../node_modules/json-schema/lib/links.js | 66 - .../node_modules/json-schema/lib/validate.js | 273 - .../node_modules/json-schema/package.json | 71 - .../node_modules/json-schema/test/tests.js | 95 - .../json-stringify-safe/.npmignore | 1 - .../json-stringify-safe/CHANGELOG.md | 14 - .../node_modules/json-stringify-safe/LICENSE | 15 - .../node_modules/json-stringify-safe/Makefile | 35 - .../json-stringify-safe/README.md | 52 - .../json-stringify-safe/package.json | 66 - .../json-stringify-safe/stringify.js | 27 - .../json-stringify-safe/test/mocha.opts | 2 - .../test/stringify_test.js | 246 - .../node_modules/jsprim/CHANGES.md | 49 - .../node_modules/jsprim/CONTRIBUTING.md | 19 - .../movie-rating/node_modules/jsprim/LICENSE | 19 - .../node_modules/jsprim/README.md | 287 - .../node_modules/jsprim/lib/jsprim.js | 735 -- .../node_modules/jsprim/package.json | 49 - .../node_modules/media-typer/HISTORY.md | 22 - .../node_modules/media-typer/LICENSE | 22 - .../node_modules/media-typer/README.md | 81 - .../node_modules/media-typer/index.js | 270 - .../node_modules/media-typer/package.json | 61 - .../node_modules/merge-descriptors/HISTORY.md | 21 - .../node_modules/merge-descriptors/LICENSE | 23 - .../node_modules/merge-descriptors/README.md | 48 - .../node_modules/merge-descriptors/index.js | 60 - .../merge-descriptors/package.json | 69 - .../node_modules/methods/HISTORY.md | 29 - .../movie-rating/node_modules/methods/LICENSE | 24 - .../node_modules/methods/README.md | 51 - .../node_modules/methods/index.js | 69 - .../node_modules/methods/package.json | 79 - .../node_modules/mime-db/HISTORY.md | 417 - .../movie-rating/node_modules/mime-db/LICENSE | 22 - .../node_modules/mime-db/README.md | 94 - .../movie-rating/node_modules/mime-db/db.json | 7834 -------------- .../node_modules/mime-db/index.js | 11 - .../node_modules/mime-db/package.json | 101 - .../node_modules/mime-types/HISTORY.md | 308 - .../node_modules/mime-types/LICENSE | 23 - .../node_modules/mime-types/README.md | 113 - .../node_modules/mime-types/index.js | 188 - .../node_modules/mime-types/package.json | 87 - .../movie-rating/node_modules/mime/.npmignore | 0 .../node_modules/mime/CHANGELOG.md | 164 - .../movie-rating/node_modules/mime/LICENSE | 21 - .../movie-rating/node_modules/mime/README.md | 90 - .../movie-rating/node_modules/mime/cli.js | 8 - .../movie-rating/node_modules/mime/mime.js | 108 - .../node_modules/mime/package.json | 73 - .../node_modules/mime/src/build.js | 53 - .../node_modules/mime/src/test.js | 60 - .../movie-rating/node_modules/mime/types.json | 1 - .../movie-rating/node_modules/ms/index.js | 152 - .../movie-rating/node_modules/ms/license.md | 21 - .../movie-rating/node_modules/ms/package.json | 69 - .../movie-rating/node_modules/ms/readme.md | 51 - .../node_modules/negotiator/HISTORY.md | 103 - .../node_modules/negotiator/LICENSE | 24 - .../node_modules/negotiator/README.md | 203 - .../node_modules/negotiator/index.js | 124 - .../node_modules/negotiator/lib/charset.js | 169 - .../node_modules/negotiator/lib/encoding.js | 184 - .../node_modules/negotiator/lib/language.js | 179 - .../node_modules/negotiator/lib/mediaType.js | 294 - .../node_modules/negotiator/package.json | 84 - .../node_modules/oauth-sign/LICENSE | 55 - .../node_modules/oauth-sign/README.md | 11 - .../node_modules/oauth-sign/index.js | 146 - .../node_modules/oauth-sign/package.json | 56 - .../node_modules/on-finished/HISTORY.md | 88 - .../node_modules/on-finished/LICENSE | 23 - .../node_modules/on-finished/README.md | 154 - .../node_modules/on-finished/index.js | 196 - .../node_modules/on-finished/package.json | 73 - .../node_modules/parseurl/HISTORY.md | 58 - .../node_modules/parseurl/LICENSE | 24 - .../node_modules/parseurl/README.md | 133 - .../node_modules/parseurl/index.js | 158 - .../node_modules/parseurl/package.json | 81 - .../node_modules/path-to-regexp/History.md | 36 - .../node_modules/path-to-regexp/LICENSE | 21 - .../node_modules/path-to-regexp/Readme.md | 35 - .../node_modules/path-to-regexp/index.js | 129 - .../node_modules/path-to-regexp/package.json | 59 - .../node_modules/performance-now/.npmignore | 1 - .../performance-now/.tm_properties | 7 - .../node_modules/performance-now/.travis.yml | 6 - .../node_modules/performance-now/README.md | 30 - .../performance-now/lib/performance-now.js | 36 - .../lib/performance-now.js.map | 10 - .../node_modules/performance-now/license.txt | 7 - .../node_modules/performance-now/package.json | 65 - .../performance-now/src/index.d.ts | 8 - .../src/performance-now.coffee | 17 - .../performance-now/test/mocha.opts | 3 - .../test/performance-now.coffee | 43 - .../performance-now/test/scripts.coffee | 27 - .../test/scripts/delayed-call.coffee | 11 - .../test/scripts/delayed-require.coffee | 12 - .../test/scripts/difference.coffee | 6 - .../test/scripts/initial-value.coffee | 10 - .../node_modules/proxy-addr/HISTORY.md | 150 - .../node_modules/proxy-addr/LICENSE | 22 - .../node_modules/proxy-addr/README.md | 155 - .../node_modules/proxy-addr/index.js | 327 - .../node_modules/proxy-addr/package.json | 82 - .../movie-rating/node_modules/psl/LICENSE | 9 - .../movie-rating/node_modules/psl/README.md | 215 - .../node_modules/psl/browserstack-logo.svg | 90 - .../node_modules/psl/data/rules.json | 8795 --------------- .../movie-rating/node_modules/psl/dist/psl.js | 9606 ----------------- .../node_modules/psl/dist/psl.min.js | 1 - .../movie-rating/node_modules/psl/index.js | 269 - .../node_modules/psl/package.json | 77 - .../node_modules/punycode/LICENSE-MIT.txt | 20 - .../node_modules/punycode/README.md | 122 - .../node_modules/punycode/package.json | 85 - .../node_modules/punycode/punycode.es6.js | 441 - .../node_modules/punycode/punycode.js | 440 - .../node_modules/qs/.editorconfig | 30 - .../node_modules/qs/.eslintignore | 1 - .../movie-rating/node_modules/qs/.eslintrc | 21 - .../movie-rating/node_modules/qs/CHANGELOG.md | 256 - .../APIs/movie-rating/node_modules/qs/LICENSE | 28 - .../movie-rating/node_modules/qs/README.md | 570 - .../movie-rating/node_modules/qs/dist/qs.js | 782 -- .../node_modules/qs/lib/formats.js | 18 - .../movie-rating/node_modules/qs/lib/index.js | 11 - .../movie-rating/node_modules/qs/lib/parse.js | 242 - .../node_modules/qs/lib/stringify.js | 269 - .../movie-rating/node_modules/qs/lib/utils.js | 230 - .../movie-rating/node_modules/qs/package.json | 87 - .../node_modules/qs/test/.eslintrc | 17 - .../node_modules/qs/test/index.js | 7 - .../node_modules/qs/test/parse.js | 676 -- .../node_modules/qs/test/stringify.js | 679 -- .../node_modules/qs/test/utils.js | 136 - .../node_modules/range-parser/HISTORY.md | 56 - .../node_modules/range-parser/LICENSE | 23 - .../node_modules/range-parser/README.md | 84 - .../node_modules/range-parser/index.js | 162 - .../node_modules/range-parser/package.json | 91 - .../node_modules/raw-body/HISTORY.md | 270 - .../node_modules/raw-body/LICENSE | 22 - .../node_modules/raw-body/README.md | 219 - .../node_modules/raw-body/index.d.ts | 87 - .../node_modules/raw-body/index.js | 286 - .../node_modules/raw-body/package.json | 90 - .../node_modules/request/CHANGELOG.md | 709 -- .../movie-rating/node_modules/request/LICENSE | 55 - .../node_modules/request/README.md | 1097 -- .../node_modules/request/index.js | 155 - .../node_modules/request/lib/auth.js | 167 - .../node_modules/request/lib/cookies.js | 38 - .../request/lib/getProxyFromURI.js | 79 - .../node_modules/request/lib/har.js | 205 - .../node_modules/request/lib/hawk.js | 89 - .../node_modules/request/lib/helpers.js | 66 - .../node_modules/request/lib/multipart.js | 112 - .../node_modules/request/lib/oauth.js | 148 - .../node_modules/request/lib/querystring.js | 50 - .../node_modules/request/lib/redirect.js | 154 - .../node_modules/request/lib/tunnel.js | 175 - .../request/node_modules/qs/.editorconfig | 30 - .../request/node_modules/qs/.eslintignore | 1 - .../request/node_modules/qs/.eslintrc | 19 - .../request/node_modules/qs/CHANGELOG.md | 226 - .../request/node_modules/qs/LICENSE | 28 - .../request/node_modules/qs/README.md | 475 - .../request/node_modules/qs/dist/qs.js | 638 -- .../request/node_modules/qs/lib/formats.js | 18 - .../request/node_modules/qs/lib/index.js | 11 - .../request/node_modules/qs/lib/parse.js | 174 - .../request/node_modules/qs/lib/stringify.js | 210 - .../request/node_modules/qs/lib/utils.js | 213 - .../request/node_modules/qs/package.json | 80 - .../request/node_modules/qs/test/.eslintrc | 15 - .../request/node_modules/qs/test/index.js | 7 - .../request/node_modules/qs/test/parse.js | 574 - .../request/node_modules/qs/test/stringify.js | 597 - .../request/node_modules/qs/test/utils.js | 34 - .../node_modules/request/package.json | 116 - .../node_modules/request/request.js | 1551 --- .../node_modules/safe-buffer/LICENSE | 21 - .../node_modules/safe-buffer/README.md | 584 - .../node_modules/safe-buffer/index.d.ts | 187 - .../node_modules/safe-buffer/index.js | 62 - .../node_modules/safe-buffer/package.json | 63 - .../node_modules/safer-buffer/LICENSE | 21 - .../safer-buffer/Porting-Buffer.md | 268 - .../node_modules/safer-buffer/Readme.md | 156 - .../node_modules/safer-buffer/dangerous.js | 58 - .../node_modules/safer-buffer/package.json | 60 - .../node_modules/safer-buffer/safer.js | 77 - .../node_modules/safer-buffer/tests.js | 406 - .../movie-rating/node_modules/send/HISTORY.md | 496 - .../movie-rating/node_modules/send/LICENSE | 23 - .../movie-rating/node_modules/send/README.md | 329 - .../movie-rating/node_modules/send/index.js | 1129 -- .../send/node_modules/ms/index.js | 162 - .../send/node_modules/ms/license.md | 21 - .../send/node_modules/ms/package.json | 69 - .../send/node_modules/ms/readme.md | 60 - .../node_modules/send/package.json | 106 - .../node_modules/serve-static/HISTORY.md | 451 - .../node_modules/serve-static/LICENSE | 25 - .../node_modules/serve-static/README.md | 259 - .../node_modules/serve-static/index.js | 210 - .../node_modules/serve-static/package.json | 77 - .../node_modules/setprototypeof/LICENSE | 13 - .../node_modules/setprototypeof/README.md | 31 - .../node_modules/setprototypeof/index.d.ts | 2 - .../node_modules/setprototypeof/index.js | 17 - .../node_modules/setprototypeof/package.json | 64 - .../node_modules/setprototypeof/test/index.js | 24 - .../node_modules/sshpk/.npmignore | 9 - .../node_modules/sshpk/.travis.yml | 11 - .../movie-rating/node_modules/sshpk/LICENSE | 18 - .../movie-rating/node_modules/sshpk/README.md | 804 -- .../node_modules/sshpk/bin/sshpk-conv | 243 - .../node_modules/sshpk/bin/sshpk-sign | 191 - .../node_modules/sshpk/bin/sshpk-verify | 167 - .../node_modules/sshpk/lib/algs.js | 168 - .../node_modules/sshpk/lib/certificate.js | 410 - .../node_modules/sshpk/lib/dhe.js | 397 - .../node_modules/sshpk/lib/ed-compat.js | 92 - .../node_modules/sshpk/lib/errors.js | 84 - .../node_modules/sshpk/lib/fingerprint.js | 220 - .../node_modules/sshpk/lib/formats/auto.js | 124 - .../node_modules/sshpk/lib/formats/dnssec.js | 287 - .../sshpk/lib/formats/openssh-cert.js | 352 - .../node_modules/sshpk/lib/formats/pem.js | 290 - .../node_modules/sshpk/lib/formats/pkcs1.js | 373 - .../node_modules/sshpk/lib/formats/pkcs8.js | 631 -- .../node_modules/sshpk/lib/formats/putty.js | 99 - .../node_modules/sshpk/lib/formats/rfc4253.js | 166 - .../sshpk/lib/formats/ssh-private.js | 262 - .../node_modules/sshpk/lib/formats/ssh.js | 115 - .../sshpk/lib/formats/x509-pem.js | 88 - .../node_modules/sshpk/lib/formats/x509.js | 752 -- .../node_modules/sshpk/lib/identity.js | 373 - .../node_modules/sshpk/lib/index.js | 40 - .../node_modules/sshpk/lib/key.js | 294 - .../node_modules/sshpk/lib/private-key.js | 246 - .../node_modules/sshpk/lib/signature.js | 314 - .../node_modules/sshpk/lib/ssh-buffer.js | 149 - .../node_modules/sshpk/lib/utils.js | 404 - .../node_modules/sshpk/man/man1/sshpk-conv.1 | 135 - .../node_modules/sshpk/man/man1/sshpk-sign.1 | 81 - .../sshpk/man/man1/sshpk-verify.1 | 68 - .../node_modules/sshpk/package.json | 96 - .../node_modules/statuses/HISTORY.md | 65 - .../node_modules/statuses/LICENSE | 23 - .../node_modules/statuses/README.md | 127 - .../node_modules/statuses/codes.json | 66 - .../node_modules/statuses/index.js | 113 - .../node_modules/statuses/package.json | 90 - .../node_modules/toidentifier/LICENSE | 21 - .../node_modules/toidentifier/README.md | 61 - .../node_modules/toidentifier/index.js | 30 - .../node_modules/toidentifier/package.json | 76 - .../node_modules/tough-cookie/LICENSE | 12 - .../node_modules/tough-cookie/README.md | 507 - .../node_modules/tough-cookie/lib/cookie.js | 1431 --- .../node_modules/tough-cookie/lib/memstore.js | 176 - .../tough-cookie/lib/pathMatch.js | 61 - .../tough-cookie/lib/permuteDomain.js | 56 - .../tough-cookie/lib/pubsuffix-psl.js | 38 - .../node_modules/tough-cookie/lib/store.js | 71 - .../node_modules/punycode/LICENSE-MIT.txt | 20 - .../node_modules/punycode/README.md | 176 - .../node_modules/punycode/package.json | 87 - .../node_modules/punycode/punycode.js | 533 - .../node_modules/tough-cookie/package.json | 94 - .../node_modules/tunnel-agent/LICENSE | 55 - .../node_modules/tunnel-agent/README.md | 4 - .../node_modules/tunnel-agent/index.js | 244 - .../node_modules/tunnel-agent/package.json | 55 - .../node_modules/tweetnacl/.npmignore | 4 - .../node_modules/tweetnacl/AUTHORS.md | 28 - .../node_modules/tweetnacl/CHANGELOG.md | 221 - .../node_modules/tweetnacl/LICENSE | 24 - .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 - .../node_modules/tweetnacl/README.md | 459 - .../node_modules/tweetnacl/nacl-fast.js | 2388 ---- .../node_modules/tweetnacl/nacl-fast.min.js | 2 - .../node_modules/tweetnacl/nacl.d.ts | 98 - .../node_modules/tweetnacl/nacl.js | 1175 -- .../node_modules/tweetnacl/nacl.min.js | 1 - .../node_modules/tweetnacl/package.json | 86 - .../node_modules/type-is/HISTORY.md | 259 - .../movie-rating/node_modules/type-is/LICENSE | 23 - .../node_modules/type-is/README.md | 170 - .../node_modules/type-is/index.js | 266 - .../node_modules/type-is/package.json | 85 - .../node_modules/unpipe/HISTORY.md | 4 - .../movie-rating/node_modules/unpipe/LICENSE | 22 - .../node_modules/unpipe/README.md | 43 - .../movie-rating/node_modules/unpipe/index.js | 69 - .../node_modules/unpipe/package.json | 63 - .../node_modules/uri-js/README.md | 199 - .../node_modules/uri-js/bower.json | 47 - .../node_modules/uri-js/dist/es5/uri.all.d.ts | 59 - .../node_modules/uri-js/dist/es5/uri.all.js | 1389 --- .../uri-js/dist/es5/uri.all.js.map | 1 - .../uri-js/dist/es5/uri.all.min.d.ts | 59 - .../uri-js/dist/es5/uri.all.min.js | 3 - .../uri-js/dist/es5/uri.all.min.js.map | 1 - .../uri-js/dist/esnext/index.d.ts | 1 - .../node_modules/uri-js/dist/esnext/index.js | 13 - .../uri-js/dist/esnext/index.js.map | 1 - .../uri-js/dist/esnext/regexps-iri.d.ts | 3 - .../uri-js/dist/esnext/regexps-iri.js | 3 - .../uri-js/dist/esnext/regexps-iri.js.map | 1 - .../uri-js/dist/esnext/regexps-uri.d.ts | 4 - .../uri-js/dist/esnext/regexps-uri.js | 42 - .../uri-js/dist/esnext/regexps-uri.js.map | 1 - .../uri-js/dist/esnext/schemes/http.d.ts | 3 - .../uri-js/dist/esnext/schemes/http.js | 27 - .../uri-js/dist/esnext/schemes/http.js.map | 1 - .../uri-js/dist/esnext/schemes/https.d.ts | 3 - .../uri-js/dist/esnext/schemes/https.js | 9 - .../uri-js/dist/esnext/schemes/https.js.map | 1 - .../uri-js/dist/esnext/schemes/mailto.d.ts | 12 - .../uri-js/dist/esnext/schemes/mailto.js | 148 - .../uri-js/dist/esnext/schemes/mailto.js.map | 1 - .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 7 - .../uri-js/dist/esnext/schemes/urn-uuid.js | 23 - .../dist/esnext/schemes/urn-uuid.js.map | 1 - .../uri-js/dist/esnext/schemes/urn.d.ts | 10 - .../uri-js/dist/esnext/schemes/urn.js | 49 - .../uri-js/dist/esnext/schemes/urn.js.map | 1 - .../node_modules/uri-js/dist/esnext/uri.d.ts | 59 - .../node_modules/uri-js/dist/esnext/uri.js | 480 - .../uri-js/dist/esnext/uri.js.map | 1 - .../node_modules/uri-js/dist/esnext/util.d.ts | 6 - .../node_modules/uri-js/dist/esnext/util.js | 36 - .../uri-js/dist/esnext/util.js.map | 1 - .../node_modules/uri-js/package.json | 93 - .../node_modules/uri-js/rollup.config.js | 32 - .../node_modules/uri-js/src/index.ts | 18 - .../node_modules/uri-js/src/punycode.d.ts | 24 - .../node_modules/uri-js/src/regexps-iri.ts | 4 - .../node_modules/uri-js/src/regexps-uri.ts | 89 - .../node_modules/uri-js/src/schemes/http.ts | 36 - .../node_modules/uri-js/src/schemes/https.ts | 11 - .../node_modules/uri-js/src/schemes/mailto.ts | 182 - .../uri-js/src/schemes/urn-uuid.ts | 36 - .../node_modules/uri-js/src/schemes/urn.ts | 69 - .../node_modules/uri-js/src/uri.ts | 556 - .../node_modules/uri-js/src/util.ts | 40 - .../node_modules/uri-js/tests/qunit.css | 118 - .../node_modules/uri-js/tests/qunit.js | 1042 -- .../uri-js/tests/test-es5-min.html | 17 - .../node_modules/uri-js/tests/test-es5.html | 17 - .../node_modules/uri-js/tests/tests.js | 774 -- .../node_modules/uri-js/tsconfig.json | 20 - .../node_modules/uri-js/yarn.lock | 1902 ---- .../node_modules/utils-merge/.npmignore | 9 - .../node_modules/utils-merge/LICENSE | 20 - .../node_modules/utils-merge/README.md | 34 - .../node_modules/utils-merge/index.js | 23 - .../node_modules/utils-merge/package.json | 66 - .../movie-rating/node_modules/uuid/AUTHORS | 5 - .../node_modules/uuid/CHANGELOG.md | 112 - .../movie-rating/node_modules/uuid/LICENSE.md | 21 - .../movie-rating/node_modules/uuid/README.md | 293 - .../movie-rating/node_modules/uuid/bin/uuid | 65 - .../movie-rating/node_modules/uuid/index.js | 8 - .../node_modules/uuid/lib/bytesToUuid.js | 24 - .../node_modules/uuid/lib/md5-browser.js | 216 - .../movie-rating/node_modules/uuid/lib/md5.js | 25 - .../node_modules/uuid/lib/rng-browser.js | 34 - .../movie-rating/node_modules/uuid/lib/rng.js | 8 - .../node_modules/uuid/lib/sha1-browser.js | 89 - .../node_modules/uuid/lib/sha1.js | 25 - .../movie-rating/node_modules/uuid/lib/v35.js | 57 - .../node_modules/uuid/package.json | 95 - .../APIs/movie-rating/node_modules/uuid/v1.js | 109 - .../APIs/movie-rating/node_modules/uuid/v3.js | 4 - .../APIs/movie-rating/node_modules/uuid/v4.js | 29 - .../APIs/movie-rating/node_modules/uuid/v5.js | 3 - .../movie-rating/node_modules/vary/HISTORY.md | 39 - .../movie-rating/node_modules/vary/LICENSE | 22 - .../movie-rating/node_modules/vary/README.md | 101 - .../movie-rating/node_modules/vary/index.js | 149 - .../node_modules/vary/package.json | 78 - .../node_modules/verror/.npmignore | 9 - .../node_modules/verror/CHANGES.md | 28 - .../node_modules/verror/CONTRIBUTING.md | 19 - .../movie-rating/node_modules/verror/LICENSE | 19 - .../node_modules/verror/README.md | 528 - .../node_modules/verror/lib/verror.js | 451 - .../node_modules/verror/package.json | 51 - Languages/APIs/movie-rating/package-lock.json | 691 -- Languages/APIs/movie-rating/package.json | 15 - Languages/APIs/movie-rating/untitled | 0 Languages/APIs/node_modules/.bin/sshpk-conv | 1 - Languages/APIs/node_modules/.bin/sshpk-sign | 1 - Languages/APIs/node_modules/.bin/sshpk-verify | 1 - Languages/APIs/node_modules/.bin/uuid | 1 - .../APIs/node_modules/ajv/.tonic_example.js | 20 - Languages/APIs/node_modules/ajv/LICENSE | 22 - Languages/APIs/node_modules/ajv/README.md | 1359 --- .../APIs/node_modules/ajv/dist/ajv.bundle.js | 7172 ------------ .../APIs/node_modules/ajv/dist/ajv.min.js | 3 - .../APIs/node_modules/ajv/dist/ajv.min.js.map | 1 - Languages/APIs/node_modules/ajv/lib/ajv.d.ts | 390 - Languages/APIs/node_modules/ajv/lib/ajv.js | 497 - Languages/APIs/node_modules/ajv/lib/cache.js | 26 - .../node_modules/ajv/lib/compile/async.js | 90 - .../node_modules/ajv/lib/compile/equal.js | 5 - .../ajv/lib/compile/error_classes.js | 34 - .../node_modules/ajv/lib/compile/formats.js | 149 - .../node_modules/ajv/lib/compile/index.js | 387 - .../node_modules/ajv/lib/compile/resolve.js | 270 - .../node_modules/ajv/lib/compile/rules.js | 66 - .../ajv/lib/compile/schema_obj.js | 9 - .../ajv/lib/compile/ucs2length.js | 20 - .../APIs/node_modules/ajv/lib/compile/util.js | 274 - Languages/APIs/node_modules/ajv/lib/data.js | 49 - .../node_modules/ajv/lib/definition_schema.js | 37 - .../APIs/node_modules/ajv/lib/dot/_limit.jst | 104 - .../node_modules/ajv/lib/dot/_limitItems.jst | 10 - .../node_modules/ajv/lib/dot/_limitLength.jst | 10 - .../ajv/lib/dot/_limitProperties.jst | 10 - .../APIs/node_modules/ajv/lib/dot/allOf.jst | 34 - .../APIs/node_modules/ajv/lib/dot/anyOf.jst | 48 - .../APIs/node_modules/ajv/lib/dot/coerce.def | 61 - .../APIs/node_modules/ajv/lib/dot/comment.jst | 9 - .../APIs/node_modules/ajv/lib/dot/const.jst | 11 - .../node_modules/ajv/lib/dot/contains.jst | 57 - .../APIs/node_modules/ajv/lib/dot/custom.jst | 191 - .../node_modules/ajv/lib/dot/defaults.def | 47 - .../node_modules/ajv/lib/dot/definitions.def | 201 - .../node_modules/ajv/lib/dot/dependencies.jst | 80 - .../APIs/node_modules/ajv/lib/dot/enum.jst | 30 - .../APIs/node_modules/ajv/lib/dot/errors.def | 194 - .../APIs/node_modules/ajv/lib/dot/format.jst | 106 - .../APIs/node_modules/ajv/lib/dot/if.jst | 75 - .../APIs/node_modules/ajv/lib/dot/items.jst | 100 - .../APIs/node_modules/ajv/lib/dot/missing.def | 39 - .../node_modules/ajv/lib/dot/multipleOf.jst | 20 - .../APIs/node_modules/ajv/lib/dot/not.jst | 43 - .../APIs/node_modules/ajv/lib/dot/oneOf.jst | 54 - .../APIs/node_modules/ajv/lib/dot/pattern.jst | 14 - .../node_modules/ajv/lib/dot/properties.jst | 244 - .../ajv/lib/dot/propertyNames.jst | 54 - .../APIs/node_modules/ajv/lib/dot/ref.jst | 85 - .../node_modules/ajv/lib/dot/required.jst | 108 - .../node_modules/ajv/lib/dot/uniqueItems.jst | 62 - .../node_modules/ajv/lib/dot/validate.jst | 282 - .../APIs/node_modules/ajv/lib/dotjs/README.md | 3 - .../APIs/node_modules/ajv/lib/dotjs/_limit.js | 157 - .../node_modules/ajv/lib/dotjs/_limitItems.js | 77 - .../ajv/lib/dotjs/_limitLength.js | 82 - .../ajv/lib/dotjs/_limitProperties.js | 77 - .../APIs/node_modules/ajv/lib/dotjs/allOf.js | 43 - .../APIs/node_modules/ajv/lib/dotjs/anyOf.js | 74 - .../node_modules/ajv/lib/dotjs/comment.js | 14 - .../APIs/node_modules/ajv/lib/dotjs/const.js | 56 - .../node_modules/ajv/lib/dotjs/contains.js | 82 - .../APIs/node_modules/ajv/lib/dotjs/custom.js | 228 - .../ajv/lib/dotjs/dependencies.js | 168 - .../APIs/node_modules/ajv/lib/dotjs/enum.js | 66 - .../APIs/node_modules/ajv/lib/dotjs/format.js | 150 - .../APIs/node_modules/ajv/lib/dotjs/if.js | 104 - .../APIs/node_modules/ajv/lib/dotjs/index.js | 33 - .../APIs/node_modules/ajv/lib/dotjs/items.js | 141 - .../node_modules/ajv/lib/dotjs/multipleOf.js | 77 - .../APIs/node_modules/ajv/lib/dotjs/not.js | 84 - .../APIs/node_modules/ajv/lib/dotjs/oneOf.js | 73 - .../node_modules/ajv/lib/dotjs/pattern.js | 75 - .../node_modules/ajv/lib/dotjs/properties.js | 330 - .../ajv/lib/dotjs/propertyNames.js | 82 - .../APIs/node_modules/ajv/lib/dotjs/ref.js | 124 - .../node_modules/ajv/lib/dotjs/required.js | 270 - .../node_modules/ajv/lib/dotjs/uniqueItems.js | 86 - .../node_modules/ajv/lib/dotjs/validate.js | 494 - .../APIs/node_modules/ajv/lib/keyword.js | 146 - .../APIs/node_modules/ajv/lib/refs/data.json | 17 - .../ajv/lib/refs/json-schema-draft-04.json | 149 - .../ajv/lib/refs/json-schema-draft-06.json | 154 - .../ajv/lib/refs/json-schema-draft-07.json | 168 - .../ajv/lib/refs/json-schema-secure.json | 94 - Languages/APIs/node_modules/ajv/package.json | 125 - .../node_modules/ajv/scripts/.eslintrc.yml | 3 - .../APIs/node_modules/ajv/scripts/bundle.js | 61 - .../node_modules/ajv/scripts/compile-dots.js | 73 - Languages/APIs/node_modules/ajv/scripts/info | 10 - .../node_modules/ajv/scripts/prepare-tests | 12 - .../ajv/scripts/publish-built-version | 32 - .../node_modules/ajv/scripts/travis-gh-pages | 23 - Languages/APIs/node_modules/asn1/LICENSE | 19 - Languages/APIs/node_modules/asn1/README.md | 50 - .../APIs/node_modules/asn1/lib/ber/errors.js | 13 - .../APIs/node_modules/asn1/lib/ber/index.js | 27 - .../APIs/node_modules/asn1/lib/ber/reader.js | 262 - .../APIs/node_modules/asn1/lib/ber/types.js | 36 - .../APIs/node_modules/asn1/lib/ber/writer.js | 317 - Languages/APIs/node_modules/asn1/lib/index.js | 20 - Languages/APIs/node_modules/asn1/package.json | 75 - .../APIs/node_modules/assert-plus/AUTHORS | 6 - .../APIs/node_modules/assert-plus/CHANGES.md | 14 - .../APIs/node_modules/assert-plus/README.md | 162 - .../APIs/node_modules/assert-plus/assert.js | 211 - .../node_modules/assert-plus/package.json | 87 - Languages/APIs/node_modules/asynckit/LICENSE | 21 - .../APIs/node_modules/asynckit/README.md | 233 - Languages/APIs/node_modules/asynckit/bench.js | 76 - Languages/APIs/node_modules/asynckit/index.js | 6 - .../APIs/node_modules/asynckit/lib/abort.js | 29 - .../APIs/node_modules/asynckit/lib/async.js | 34 - .../APIs/node_modules/asynckit/lib/defer.js | 26 - .../APIs/node_modules/asynckit/lib/iterate.js | 75 - .../asynckit/lib/readable_asynckit.js | 91 - .../asynckit/lib/readable_parallel.js | 25 - .../asynckit/lib/readable_serial.js | 25 - .../asynckit/lib/readable_serial_ordered.js | 29 - .../APIs/node_modules/asynckit/lib/state.js | 37 - .../node_modules/asynckit/lib/streamify.js | 141 - .../node_modules/asynckit/lib/terminator.js | 29 - .../APIs/node_modules/asynckit/package.json | 91 - .../APIs/node_modules/asynckit/parallel.js | 43 - .../APIs/node_modules/asynckit/serial.js | 17 - .../node_modules/asynckit/serialOrdered.js | 75 - .../APIs/node_modules/asynckit/stream.js | 21 - Languages/APIs/node_modules/aws-sign2/LICENSE | 55 - .../APIs/node_modules/aws-sign2/README.md | 4 - .../APIs/node_modules/aws-sign2/index.js | 212 - .../APIs/node_modules/aws-sign2/package.json | 50 - Languages/APIs/node_modules/aws4/.travis.yml | 5 - Languages/APIs/node_modules/aws4/LICENSE | 19 - Languages/APIs/node_modules/aws4/README.md | 523 - Languages/APIs/node_modules/aws4/aws4.js | 332 - Languages/APIs/node_modules/aws4/lru.js | 96 - Languages/APIs/node_modules/aws4/package.json | 104 - .../node_modules/bcrypt-pbkdf/CONTRIBUTING.md | 13 - .../APIs/node_modules/bcrypt-pbkdf/LICENSE | 66 - .../APIs/node_modules/bcrypt-pbkdf/README.md | 45 - .../APIs/node_modules/bcrypt-pbkdf/index.js | 556 - .../node_modules/bcrypt-pbkdf/package.json | 44 - Languages/APIs/node_modules/caseless/LICENSE | 28 - .../APIs/node_modules/caseless/README.md | 45 - Languages/APIs/node_modules/caseless/index.js | 67 - .../APIs/node_modules/caseless/package.json | 56 - Languages/APIs/node_modules/caseless/test.js | 67 - .../APIs/node_modules/combined-stream/License | 19 - .../node_modules/combined-stream/Readme.md | 138 - .../combined-stream/lib/combined_stream.js | 208 - .../node_modules/combined-stream/package.json | 58 - .../node_modules/combined-stream/yarn.lock | 17 - .../APIs/node_modules/core-util-is/LICENSE | 19 - .../APIs/node_modules/core-util-is/README.md | 3 - .../node_modules/core-util-is/float.patch | 604 -- .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 62 - .../APIs/node_modules/core-util-is/test.js | 68 - .../APIs/node_modules/dashdash/CHANGES.md | 364 - .../APIs/node_modules/dashdash/LICENSE.txt | 24 - .../APIs/node_modules/dashdash/README.md | 574 - .../dashdash/etc/dashdash.bash_completion.in | 389 - .../node_modules/dashdash/lib/dashdash.js | 1055 -- .../APIs/node_modules/dashdash/package.json | 67 - .../node_modules/delayed-stream/.npmignore | 1 - .../APIs/node_modules/delayed-stream/License | 19 - .../APIs/node_modules/delayed-stream/Makefile | 7 - .../node_modules/delayed-stream/Readme.md | 141 - .../delayed-stream/lib/delayed_stream.js | 107 - .../node_modules/delayed-stream/package.json | 62 - Languages/APIs/node_modules/ecc-jsbn/LICENSE | 21 - .../APIs/node_modules/ecc-jsbn/README.md | 8 - Languages/APIs/node_modules/ecc-jsbn/index.js | 58 - .../node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 - .../APIs/node_modules/ecc-jsbn/lib/ec.js | 561 - .../APIs/node_modules/ecc-jsbn/lib/sec.js | 170 - .../APIs/node_modules/ecc-jsbn/package.json | 65 - Languages/APIs/node_modules/ecc-jsbn/test.js | 14 - .../APIs/node_modules/extend/.editorconfig | 20 - Languages/APIs/node_modules/extend/.eslintrc | 17 - Languages/APIs/node_modules/extend/.jscs.json | 175 - .../APIs/node_modules/extend/.travis.yml | 230 - .../APIs/node_modules/extend/CHANGELOG.md | 83 - Languages/APIs/node_modules/extend/LICENSE | 23 - Languages/APIs/node_modules/extend/README.md | 81 - .../APIs/node_modules/extend/component.json | 32 - Languages/APIs/node_modules/extend/index.js | 117 - .../APIs/node_modules/extend/package.json | 75 - .../APIs/node_modules/extsprintf/.gitmodules | 0 .../APIs/node_modules/extsprintf/.npmignore | 2 - .../APIs/node_modules/extsprintf/LICENSE | 19 - .../APIs/node_modules/extsprintf/Makefile | 24 - .../node_modules/extsprintf/Makefile.targ | 285 - .../APIs/node_modules/extsprintf/README.md | 46 - .../node_modules/extsprintf/jsl.node.conf | 137 - .../node_modules/extsprintf/lib/extsprintf.js | 183 - .../APIs/node_modules/extsprintf/package.json | 44 - .../APIs/node_modules/fast-deep-equal/LICENSE | 21 - .../node_modules/fast-deep-equal/README.md | 58 - .../node_modules/fast-deep-equal/index.d.ts | 4 - .../node_modules/fast-deep-equal/index.js | 55 - .../node_modules/fast-deep-equal/package.json | 86 - .../fast-json-stable-stringify/.eslintrc.yml | 26 - .../fast-json-stable-stringify/.npmignore | 4 - .../fast-json-stable-stringify/.travis.yml | 8 - .../fast-json-stable-stringify/LICENSE | 18 - .../fast-json-stable-stringify/README.md | 119 - .../benchmark/index.js | 31 - .../benchmark/test.json | 137 - .../example/key_cmp.js | 7 - .../example/nested.js | 3 - .../fast-json-stable-stringify/example/str.js | 3 - .../example/value_cmp.js | 7 - .../fast-json-stable-stringify/index.js | 59 - .../fast-json-stable-stringify/package.json | 78 - .../fast-json-stable-stringify/test/cmp.js | 13 - .../fast-json-stable-stringify/test/nested.js | 44 - .../fast-json-stable-stringify/test/str.js | 46 - .../test/to-json.js | 22 - .../APIs/node_modules/forever-agent/LICENSE | 55 - .../APIs/node_modules/forever-agent/README.md | 4 - .../APIs/node_modules/forever-agent/index.js | 138 - .../node_modules/forever-agent/package.json | 50 - Languages/APIs/node_modules/form-data/License | 19 - .../APIs/node_modules/form-data/README.md | 234 - .../APIs/node_modules/form-data/README.md.bak | 234 - .../node_modules/form-data/lib/browser.js | 2 - .../node_modules/form-data/lib/form_data.js | 457 - .../node_modules/form-data/lib/populate.js | 10 - .../APIs/node_modules/form-data/package.json | 98 - .../APIs/node_modules/form-data/yarn.lock | 2662 ----- .../APIs/node_modules/getpass/.npmignore | 8 - .../APIs/node_modules/getpass/.travis.yml | 9 - Languages/APIs/node_modules/getpass/LICENSE | 18 - Languages/APIs/node_modules/getpass/README.md | 32 - .../APIs/node_modules/getpass/lib/index.js | 123 - .../APIs/node_modules/getpass/package.json | 50 - .../APIs/node_modules/har-schema/LICENSE | 13 - .../APIs/node_modules/har-schema/README.md | 49 - .../har-schema/lib/afterRequest.json | 30 - .../har-schema/lib/beforeRequest.json | 30 - .../node_modules/har-schema/lib/browser.json | 20 - .../node_modules/har-schema/lib/cache.json | 21 - .../node_modules/har-schema/lib/content.json | 29 - .../node_modules/har-schema/lib/cookie.json | 36 - .../node_modules/har-schema/lib/creator.json | 20 - .../node_modules/har-schema/lib/entry.json | 53 - .../APIs/node_modules/har-schema/lib/har.json | 13 - .../node_modules/har-schema/lib/header.json | 20 - .../APIs/node_modules/har-schema/lib/index.js | 22 - .../APIs/node_modules/har-schema/lib/log.json | 36 - .../node_modules/har-schema/lib/page.json | 32 - .../har-schema/lib/pageTimings.json | 18 - .../node_modules/har-schema/lib/postData.json | 43 - .../node_modules/har-schema/lib/query.json | 20 - .../node_modules/har-schema/lib/request.json | 57 - .../node_modules/har-schema/lib/response.json | 54 - .../node_modules/har-schema/lib/timings.json | 42 - .../APIs/node_modules/har-schema/package.json | 86 - .../APIs/node_modules/har-validator/LICENSE | 9 - .../APIs/node_modules/har-validator/README.md | 37 - .../node_modules/har-validator/lib/async.js | 105 - .../node_modules/har-validator/lib/error.js | 17 - .../node_modules/har-validator/lib/promise.js | 102 - .../node_modules/har-validator/package.json | 76 - .../http-signature/.dir-locals.el | 6 - .../node_modules/http-signature/.npmignore | 7 - .../node_modules/http-signature/CHANGES.md | 46 - .../APIs/node_modules/http-signature/LICENSE | 18 - .../node_modules/http-signature/README.md | 79 - .../http-signature/http_signing.md | 363 - .../node_modules/http-signature/lib/index.js | 29 - .../node_modules/http-signature/lib/parser.js | 315 - .../node_modules/http-signature/lib/signer.js | 401 - .../node_modules/http-signature/lib/utils.js | 112 - .../node_modules/http-signature/lib/verify.js | 88 - .../node_modules/http-signature/package.json | 77 - .../node_modules/is-typedarray/LICENSE.md | 18 - .../APIs/node_modules/is-typedarray/README.md | 16 - .../APIs/node_modules/is-typedarray/index.js | 41 - .../node_modules/is-typedarray/package.json | 59 - .../APIs/node_modules/is-typedarray/test.js | 34 - .../APIs/node_modules/isstream/.jshintrc | 59 - .../APIs/node_modules/isstream/.npmignore | 1 - .../APIs/node_modules/isstream/.travis.yml | 12 - .../APIs/node_modules/isstream/LICENSE.md | 11 - .../APIs/node_modules/isstream/README.md | 66 - .../APIs/node_modules/isstream/isstream.js | 27 - .../APIs/node_modules/isstream/package.json | 61 - Languages/APIs/node_modules/isstream/test.js | 168 - Languages/APIs/node_modules/jsbn/.npmignore | 2 - Languages/APIs/node_modules/jsbn/LICENSE | 40 - Languages/APIs/node_modules/jsbn/README.md | 175 - Languages/APIs/node_modules/jsbn/example.html | 12 - Languages/APIs/node_modules/jsbn/example.js | 3 - Languages/APIs/node_modules/jsbn/index.js | 1357 --- Languages/APIs/node_modules/jsbn/package.json | 53 - .../json-schema-traverse/.eslintrc.yml | 27 - .../json-schema-traverse/.travis.yml | 8 - .../node_modules/json-schema-traverse/LICENSE | 21 - .../json-schema-traverse/README.md | 83 - .../json-schema-traverse/index.js | 89 - .../json-schema-traverse/package.json | 70 - .../json-schema-traverse/spec/.eslintrc.yml | 6 - .../spec/fixtures/schema.js | 125 - .../json-schema-traverse/spec/index.spec.js | 171 - .../APIs/node_modules/json-schema/README.md | 5 - .../json-schema/draft-00/hyper-schema | 68 - .../json-schema/draft-00/json-ref | 26 - .../node_modules/json-schema/draft-00/links | 33 - .../node_modules/json-schema/draft-00/schema | 155 - .../json-schema/draft-01/hyper-schema | 68 - .../json-schema/draft-01/json-ref | 26 - .../node_modules/json-schema/draft-01/links | 33 - .../node_modules/json-schema/draft-01/schema | 155 - .../json-schema/draft-02/hyper-schema | 68 - .../json-schema/draft-02/json-ref | 26 - .../node_modules/json-schema/draft-02/links | 35 - .../node_modules/json-schema/draft-02/schema | 166 - .../json-schema/draft-03/examples/address | 20 - .../json-schema/draft-03/examples/calendar | 53 - .../json-schema/draft-03/examples/card | 105 - .../json-schema/draft-03/examples/geo | 8 - .../json-schema/draft-03/examples/interfaces | 23 - .../json-schema/draft-03/hyper-schema | 60 - .../json-schema/draft-03/json-ref | 26 - .../node_modules/json-schema/draft-03/links | 35 - .../node_modules/json-schema/draft-03/schema | 174 - .../json-schema/draft-04/hyper-schema | 60 - .../node_modules/json-schema/draft-04/links | 41 - .../node_modules/json-schema/draft-04/schema | 189 - .../json-schema/draft-zyp-json-schema-03.xml | 1120 -- .../json-schema/draft-zyp-json-schema-04.xml | 1072 -- .../node_modules/json-schema/lib/links.js | 66 - .../node_modules/json-schema/lib/validate.js | 273 - .../node_modules/json-schema/package.json | 71 - .../node_modules/json-schema/test/tests.js | 95 - .../json-stringify-safe/.npmignore | 1 - .../json-stringify-safe/CHANGELOG.md | 14 - .../node_modules/json-stringify-safe/LICENSE | 15 - .../node_modules/json-stringify-safe/Makefile | 35 - .../json-stringify-safe/README.md | 52 - .../json-stringify-safe/package.json | 66 - .../json-stringify-safe/stringify.js | 27 - .../json-stringify-safe/test/mocha.opts | 2 - .../test/stringify_test.js | 246 - Languages/APIs/node_modules/jsprim/CHANGES.md | 49 - .../APIs/node_modules/jsprim/CONTRIBUTING.md | 19 - Languages/APIs/node_modules/jsprim/LICENSE | 19 - Languages/APIs/node_modules/jsprim/README.md | 287 - .../APIs/node_modules/jsprim/lib/jsprim.js | 735 -- .../APIs/node_modules/jsprim/package.json | 49 - .../APIs/node_modules/mime-db/HISTORY.md | 417 - Languages/APIs/node_modules/mime-db/LICENSE | 22 - Languages/APIs/node_modules/mime-db/README.md | 94 - Languages/APIs/node_modules/mime-db/db.json | 7834 -------------- Languages/APIs/node_modules/mime-db/index.js | 11 - .../APIs/node_modules/mime-db/package.json | 101 - .../APIs/node_modules/mime-types/HISTORY.md | 308 - .../APIs/node_modules/mime-types/LICENSE | 23 - .../APIs/node_modules/mime-types/README.md | 113 - .../APIs/node_modules/mime-types/index.js | 188 - .../APIs/node_modules/mime-types/package.json | 87 - .../APIs/node_modules/oauth-sign/LICENSE | 55 - .../APIs/node_modules/oauth-sign/README.md | 11 - .../APIs/node_modules/oauth-sign/index.js | 146 - .../APIs/node_modules/oauth-sign/package.json | 56 - .../node_modules/performance-now/.npmignore | 1 - .../performance-now/.tm_properties | 7 - .../node_modules/performance-now/.travis.yml | 6 - .../node_modules/performance-now/README.md | 30 - .../performance-now/lib/performance-now.js | 36 - .../lib/performance-now.js.map | 10 - .../node_modules/performance-now/license.txt | 7 - .../node_modules/performance-now/package.json | 65 - .../performance-now/src/index.d.ts | 8 - .../src/performance-now.coffee | 17 - .../performance-now/test/mocha.opts | 3 - .../test/performance-now.coffee | 43 - .../performance-now/test/scripts.coffee | 27 - .../test/scripts/delayed-call.coffee | 11 - .../test/scripts/delayed-require.coffee | 12 - .../test/scripts/difference.coffee | 6 - .../test/scripts/initial-value.coffee | 10 - Languages/APIs/node_modules/psl/LICENSE | 9 - Languages/APIs/node_modules/psl/README.md | 215 - .../node_modules/psl/browserstack-logo.svg | 90 - .../APIs/node_modules/psl/data/rules.json | 8795 --------------- Languages/APIs/node_modules/psl/dist/psl.js | 9606 ----------------- .../APIs/node_modules/psl/dist/psl.min.js | 1 - Languages/APIs/node_modules/psl/index.js | 269 - Languages/APIs/node_modules/psl/package.json | 77 - .../node_modules/punycode/LICENSE-MIT.txt | 20 - .../APIs/node_modules/punycode/README.md | 122 - .../APIs/node_modules/punycode/package.json | 85 - .../node_modules/punycode/punycode.es6.js | 441 - .../APIs/node_modules/punycode/punycode.js | 440 - Languages/APIs/node_modules/qs/.editorconfig | 30 - Languages/APIs/node_modules/qs/.eslintignore | 1 - Languages/APIs/node_modules/qs/.eslintrc | 19 - Languages/APIs/node_modules/qs/CHANGELOG.md | 226 - Languages/APIs/node_modules/qs/LICENSE | 28 - Languages/APIs/node_modules/qs/README.md | 475 - Languages/APIs/node_modules/qs/dist/qs.js | 638 -- Languages/APIs/node_modules/qs/lib/formats.js | 18 - Languages/APIs/node_modules/qs/lib/index.js | 11 - Languages/APIs/node_modules/qs/lib/parse.js | 174 - .../APIs/node_modules/qs/lib/stringify.js | 210 - Languages/APIs/node_modules/qs/lib/utils.js | 213 - Languages/APIs/node_modules/qs/package.json | 80 - Languages/APIs/node_modules/qs/test/.eslintrc | 15 - Languages/APIs/node_modules/qs/test/index.js | 7 - Languages/APIs/node_modules/qs/test/parse.js | 574 - .../APIs/node_modules/qs/test/stringify.js | 597 - Languages/APIs/node_modules/qs/test/utils.js | 34 - .../APIs/node_modules/request/CHANGELOG.md | 709 -- Languages/APIs/node_modules/request/LICENSE | 55 - Languages/APIs/node_modules/request/README.md | 1097 -- Languages/APIs/node_modules/request/index.js | 155 - .../APIs/node_modules/request/lib/auth.js | 167 - .../APIs/node_modules/request/lib/cookies.js | 38 - .../request/lib/getProxyFromURI.js | 79 - .../APIs/node_modules/request/lib/har.js | 205 - .../APIs/node_modules/request/lib/hawk.js | 89 - .../APIs/node_modules/request/lib/helpers.js | 66 - .../node_modules/request/lib/multipart.js | 112 - .../APIs/node_modules/request/lib/oauth.js | 148 - .../node_modules/request/lib/querystring.js | 50 - .../APIs/node_modules/request/lib/redirect.js | 154 - .../APIs/node_modules/request/lib/tunnel.js | 175 - .../APIs/node_modules/request/package.json | 116 - .../APIs/node_modules/request/request.js | 1551 --- .../APIs/node_modules/safe-buffer/LICENSE | 21 - .../APIs/node_modules/safe-buffer/README.md | 586 - .../APIs/node_modules/safe-buffer/index.d.ts | 187 - .../APIs/node_modules/safe-buffer/index.js | 64 - .../node_modules/safe-buffer/package.json | 63 - .../APIs/node_modules/safer-buffer/LICENSE | 21 - .../safer-buffer/Porting-Buffer.md | 268 - .../APIs/node_modules/safer-buffer/Readme.md | 156 - .../node_modules/safer-buffer/dangerous.js | 58 - .../node_modules/safer-buffer/package.json | 62 - .../APIs/node_modules/safer-buffer/safer.js | 77 - .../APIs/node_modules/safer-buffer/tests.js | 406 - Languages/APIs/node_modules/sshpk/.npmignore | 9 - Languages/APIs/node_modules/sshpk/.travis.yml | 11 - Languages/APIs/node_modules/sshpk/LICENSE | 18 - Languages/APIs/node_modules/sshpk/README.md | 804 -- .../APIs/node_modules/sshpk/bin/sshpk-conv | 243 - .../APIs/node_modules/sshpk/bin/sshpk-sign | 191 - .../APIs/node_modules/sshpk/bin/sshpk-verify | 167 - Languages/APIs/node_modules/sshpk/lib/algs.js | 168 - .../node_modules/sshpk/lib/certificate.js | 410 - Languages/APIs/node_modules/sshpk/lib/dhe.js | 397 - .../APIs/node_modules/sshpk/lib/ed-compat.js | 92 - .../APIs/node_modules/sshpk/lib/errors.js | 84 - .../node_modules/sshpk/lib/fingerprint.js | 220 - .../node_modules/sshpk/lib/formats/auto.js | 124 - .../node_modules/sshpk/lib/formats/dnssec.js | 287 - .../sshpk/lib/formats/openssh-cert.js | 352 - .../node_modules/sshpk/lib/formats/pem.js | 290 - .../node_modules/sshpk/lib/formats/pkcs1.js | 373 - .../node_modules/sshpk/lib/formats/pkcs8.js | 631 -- .../node_modules/sshpk/lib/formats/putty.js | 99 - .../node_modules/sshpk/lib/formats/rfc4253.js | 166 - .../sshpk/lib/formats/ssh-private.js | 262 - .../node_modules/sshpk/lib/formats/ssh.js | 115 - .../sshpk/lib/formats/x509-pem.js | 88 - .../node_modules/sshpk/lib/formats/x509.js | 752 -- .../APIs/node_modules/sshpk/lib/identity.js | 373 - .../APIs/node_modules/sshpk/lib/index.js | 40 - Languages/APIs/node_modules/sshpk/lib/key.js | 294 - .../node_modules/sshpk/lib/private-key.js | 246 - .../APIs/node_modules/sshpk/lib/signature.js | 314 - .../APIs/node_modules/sshpk/lib/ssh-buffer.js | 149 - .../APIs/node_modules/sshpk/lib/utils.js | 404 - .../node_modules/sshpk/man/man1/sshpk-conv.1 | 135 - .../node_modules/sshpk/man/man1/sshpk-sign.1 | 81 - .../sshpk/man/man1/sshpk-verify.1 | 68 - .../APIs/node_modules/sshpk/package.json | 96 - .../APIs/node_modules/tough-cookie/LICENSE | 12 - .../APIs/node_modules/tough-cookie/README.md | 507 - .../node_modules/tough-cookie/lib/cookie.js | 1431 --- .../node_modules/tough-cookie/lib/memstore.js | 176 - .../tough-cookie/lib/pathMatch.js | 61 - .../tough-cookie/lib/permuteDomain.js | 56 - .../tough-cookie/lib/pubsuffix-psl.js | 38 - .../node_modules/tough-cookie/lib/store.js | 71 - .../node_modules/punycode/LICENSE-MIT.txt | 20 - .../node_modules/punycode/README.md | 176 - .../node_modules/punycode/package.json | 87 - .../node_modules/punycode/punycode.js | 533 - .../node_modules/tough-cookie/package.json | 94 - .../APIs/node_modules/tunnel-agent/LICENSE | 55 - .../APIs/node_modules/tunnel-agent/README.md | 4 - .../APIs/node_modules/tunnel-agent/index.js | 244 - .../node_modules/tunnel-agent/package.json | 55 - .../APIs/node_modules/tweetnacl/.npmignore | 4 - .../APIs/node_modules/tweetnacl/AUTHORS.md | 28 - .../APIs/node_modules/tweetnacl/CHANGELOG.md | 221 - Languages/APIs/node_modules/tweetnacl/LICENSE | 24 - .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 - .../APIs/node_modules/tweetnacl/README.md | 459 - .../APIs/node_modules/tweetnacl/nacl-fast.js | 2388 ---- .../node_modules/tweetnacl/nacl-fast.min.js | 2 - .../APIs/node_modules/tweetnacl/nacl.d.ts | 98 - Languages/APIs/node_modules/tweetnacl/nacl.js | 1175 -- .../APIs/node_modules/tweetnacl/nacl.min.js | 1 - .../APIs/node_modules/tweetnacl/package.json | 86 - Languages/APIs/node_modules/uri-js/README.md | 199 - Languages/APIs/node_modules/uri-js/bower.json | 47 - .../node_modules/uri-js/dist/es5/uri.all.d.ts | 59 - .../node_modules/uri-js/dist/es5/uri.all.js | 1389 --- .../uri-js/dist/es5/uri.all.js.map | 1 - .../uri-js/dist/es5/uri.all.min.d.ts | 59 - .../uri-js/dist/es5/uri.all.min.js | 3 - .../uri-js/dist/es5/uri.all.min.js.map | 1 - .../uri-js/dist/esnext/index.d.ts | 1 - .../node_modules/uri-js/dist/esnext/index.js | 13 - .../uri-js/dist/esnext/index.js.map | 1 - .../uri-js/dist/esnext/regexps-iri.d.ts | 3 - .../uri-js/dist/esnext/regexps-iri.js | 3 - .../uri-js/dist/esnext/regexps-iri.js.map | 1 - .../uri-js/dist/esnext/regexps-uri.d.ts | 4 - .../uri-js/dist/esnext/regexps-uri.js | 42 - .../uri-js/dist/esnext/regexps-uri.js.map | 1 - .../uri-js/dist/esnext/schemes/http.d.ts | 3 - .../uri-js/dist/esnext/schemes/http.js | 27 - .../uri-js/dist/esnext/schemes/http.js.map | 1 - .../uri-js/dist/esnext/schemes/https.d.ts | 3 - .../uri-js/dist/esnext/schemes/https.js | 9 - .../uri-js/dist/esnext/schemes/https.js.map | 1 - .../uri-js/dist/esnext/schemes/mailto.d.ts | 12 - .../uri-js/dist/esnext/schemes/mailto.js | 148 - .../uri-js/dist/esnext/schemes/mailto.js.map | 1 - .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 7 - .../uri-js/dist/esnext/schemes/urn-uuid.js | 23 - .../dist/esnext/schemes/urn-uuid.js.map | 1 - .../uri-js/dist/esnext/schemes/urn.d.ts | 10 - .../uri-js/dist/esnext/schemes/urn.js | 49 - .../uri-js/dist/esnext/schemes/urn.js.map | 1 - .../node_modules/uri-js/dist/esnext/uri.d.ts | 59 - .../node_modules/uri-js/dist/esnext/uri.js | 480 - .../uri-js/dist/esnext/uri.js.map | 1 - .../node_modules/uri-js/dist/esnext/util.d.ts | 6 - .../node_modules/uri-js/dist/esnext/util.js | 36 - .../uri-js/dist/esnext/util.js.map | 1 - .../APIs/node_modules/uri-js/package.json | 93 - .../APIs/node_modules/uri-js/rollup.config.js | 32 - .../APIs/node_modules/uri-js/src/index.ts | 18 - .../node_modules/uri-js/src/punycode.d.ts | 24 - .../node_modules/uri-js/src/regexps-iri.ts | 4 - .../node_modules/uri-js/src/regexps-uri.ts | 89 - .../node_modules/uri-js/src/schemes/http.ts | 36 - .../node_modules/uri-js/src/schemes/https.ts | 11 - .../node_modules/uri-js/src/schemes/mailto.ts | 182 - .../uri-js/src/schemes/urn-uuid.ts | 36 - .../node_modules/uri-js/src/schemes/urn.ts | 69 - Languages/APIs/node_modules/uri-js/src/uri.ts | 556 - .../APIs/node_modules/uri-js/src/util.ts | 40 - .../APIs/node_modules/uri-js/tests/qunit.css | 118 - .../APIs/node_modules/uri-js/tests/qunit.js | 1042 -- .../uri-js/tests/test-es5-min.html | 17 - .../node_modules/uri-js/tests/test-es5.html | 17 - .../APIs/node_modules/uri-js/tests/tests.js | 774 -- .../APIs/node_modules/uri-js/tsconfig.json | 20 - Languages/APIs/node_modules/uri-js/yarn.lock | 1902 ---- Languages/APIs/node_modules/uuid/AUTHORS | 5 - Languages/APIs/node_modules/uuid/CHANGELOG.md | 112 - Languages/APIs/node_modules/uuid/LICENSE.md | 21 - Languages/APIs/node_modules/uuid/README.md | 293 - Languages/APIs/node_modules/uuid/bin/uuid | 65 - Languages/APIs/node_modules/uuid/index.js | 8 - .../APIs/node_modules/uuid/lib/bytesToUuid.js | 24 - .../APIs/node_modules/uuid/lib/md5-browser.js | 216 - Languages/APIs/node_modules/uuid/lib/md5.js | 25 - .../APIs/node_modules/uuid/lib/rng-browser.js | 34 - Languages/APIs/node_modules/uuid/lib/rng.js | 8 - .../node_modules/uuid/lib/sha1-browser.js | 89 - Languages/APIs/node_modules/uuid/lib/sha1.js | 25 - Languages/APIs/node_modules/uuid/lib/v35.js | 57 - Languages/APIs/node_modules/uuid/package.json | 95 - Languages/APIs/node_modules/uuid/v1.js | 109 - Languages/APIs/node_modules/uuid/v3.js | 4 - Languages/APIs/node_modules/uuid/v4.js | 29 - Languages/APIs/node_modules/uuid/v5.js | 3 - Languages/APIs/node_modules/verror/.npmignore | 9 - Languages/APIs/node_modules/verror/CHANGES.md | 28 - .../APIs/node_modules/verror/CONTRIBUTING.md | 19 - Languages/APIs/node_modules/verror/LICENSE | 19 - Languages/APIs/node_modules/verror/README.md | 528 - .../APIs/node_modules/verror/lib/verror.js | 451 - .../APIs/node_modules/verror/package.json | 51 - Languages/APIs/package-lock.json | 346 - Languages/APIs/package.json | 14 - Languages/Bash/HelloWorld | 2 - Languages/Batch/helloworld.bat | 3 - Languages/Brainfuck/helloWorld.b | 43 - .../.vs/HelloWorld/DesignTimeBuild/.dtbcache | Bin 371892 -> 0 bytes Languages/C#/.vs/HelloWorld/v16/.suo | Bin 19968 -> 0 bytes .../.vs/HelloWorld/v16/Server/sqlite3/db.lock | 0 .../HelloWorld/v16/Server/sqlite3/storage.ide | Bin 651264 -> 0 bytes .../v16/Server/sqlite3/storage.ide-shm | Bin 32768 -> 0 bytes .../v16/Server/sqlite3/storage.ide-wal | 0 Languages/C#/BubbleSort.cs | 19 - Languages/C#/HelloWorld.sln | 25 - Languages/C#/HelloWorld/HelloWorld.csproj | 8 - Languages/C#/HelloWorld/Program.cs | 18 - .../Debug/netcoreapp2.2/HelloWorld.deps.json | 23 - .../bin/Debug/netcoreapp2.2/HelloWorld.dll | Bin 4608 -> 0 bytes .../bin/Debug/netcoreapp2.2/HelloWorld.pdb | Bin 520 -> 0 bytes .../HelloWorld.runtimeconfig.dev.json | 9 - .../HelloWorld.runtimeconfig.json | 9 - .../netcoreapp2.2/HelloWorld.AssemblyInfo.cs | 23 - .../HelloWorld.AssemblyInfoInputs.cache | 1 - .../netcoreapp2.2/HelloWorld.assets.cache | Bin 20701 -> 0 bytes .../HelloWorld.csproj.CoreCompileInputs.cache | 1 - .../HelloWorld.csproj.FileListAbsolute.txt | 11 - .../HelloWorld.csprojAssemblyReference.cache | Bin 102817 -> 0 bytes .../obj/Debug/netcoreapp2.2/HelloWorld.dll | Bin 4608 -> 0 bytes .../obj/Debug/netcoreapp2.2/HelloWorld.pdb | Bin 520 -> 0 bytes .../obj/HelloWorld.csproj.nuget.cache | 5 - .../obj/HelloWorld.csproj.nuget.dgspec.json | 60 - .../obj/HelloWorld.csproj.nuget.g.props | 18 - .../obj/HelloWorld.csproj.nuget.g.targets | 10 - .../C#/HelloWorld/obj/project.assets.json | 744 -- Languages/C#/bucketsort.cs | 141 - Languages/C#/mergesort.cs | 85 - Languages/C#/palindrome.cs | 24 - Languages/C#/quicksort.cs | 53 - Languages/C#/tree_traversal.cs | 123 - Languages/C++/01knapsack.cpp | 41 - Languages/C++/ADAMAT.cpp | 48 - Languages/C++/AGGRCOW.cpp | 50 - Languages/C++/Anagram_Bit_Manipulation.cpp | 36 - Languages/C++/BFS.cpp | 51 - Languages/C++/BS.cpp | 29 - Languages/C++/BST.cpp | 219 - Languages/C++/Bit_strings.cpp | 24 - Languages/C++/Burst Balloon DP.cpp | 42 - Languages/C++/CHFNSWAP.cpp | 34 - Languages/C++/COVID19B.cpp | 65 - Languages/C++/CRDGAME2.py | 27 - Languages/C++/Caeser_Cipher.cpp | 22 - Languages/C++/ChefWars.cpp | 30 - Languages/C++/CircularHeaderLL.cpp | 346 - Languages/C++/Conjetura Goldbach (modulo).cpp | 67 - Languages/C++/CubeFormula.cpp | 18 - Languages/C++/DFS.cpp | 34 - Languages/C++/DiamondPattern | 54 - Languages/C++/Dijkstra.cpp | 145 - Languages/C++/EQDIV.cpp | 36 - .../C++/Edit_distance_Leetcode_hard_level.cpp | 32 - Languages/C++/Euler_phi | 48 - Languages/C++/ExtendedEucleidian.cpp | 64 - Languages/C++/FINXOR.cpp | 100 - Languages/C++/Finding_Unique_Number_in_Array | 15 - Languages/C++/HeapSort.cpp | 66 - Languages/C++/Hello World ! | 7 - Languages/C++/Hello.cpp | 6 - Languages/C++/HelloWorld.cpp | 6 - Languages/C++/Hello_India.cpp | 11 - Languages/C++/Huffman Code.cpp | 117 - .../C++/Implement Queue using Stacks.cpp | 60 - .../C++/Implement Stack using Queues.cpp | 58 - Languages/C++/Insertion_in_binary_trees | 44 - Languages/C++/IntersectionOfarrays.cpp | 46 - Languages/C++/Josephus Problem.cpp | 35 - Languages/C++/Kedane'sAlgo.cpp | 36 - Languages/C++/LCS.cpp | 38 - .../C++/Largest_Sum_Contiguous_Subarray.cpp | 44 - Languages/C++/Linear Search.cpp | 27 - Languages/C++/Longest-Common-Subsequence | 65 - Languages/C++/LongestCommonSubseq.cpp | 36 - ...ongest_increasing_subsequence_O(nlogn).cpp | 56 - Languages/C++/Matriz caracol.cpp | 51 - Languages/C++/Max. substring in string.cpp | 20 - .../C++/MinPriorityQueueImplementation.cpp | 84 - Languages/C++/Min_Heap.cpp | 129 - Languages/C++/Multiples_of_3_and_5.cpp | 17 - Languages/C++/Nqueens.cpp | 45 - Languages/C++/Number_of_divisors.cpp | 49 - Languages/C++/OptimalBST.cpp | 77 - Languages/C++/PallindromeRecursive.cpp | 38 - Languages/C++/PrimeNumber.cpp | 24 - Languages/C++/PrimsAlgo.cpp | 62 - Languages/C++/ProcessScheduling.cpp | 72 - Languages/C++/QA.cpp | 16 - Languages/C++/QB.cpp | 20 - Languages/C++/QC.cpp | 27 - Languages/C++/QuickSort.cpp | 63 - Languages/C++/RGB to Greyscale.cpp | 89 - Languages/C++/Radix_sort.cpp | 73 - Languages/C++/RangeMinimum.cpp | 58 - ..._the_final_destination(StairCase Question) | 18 - Languages/C++/ReverseLinkedList.cpp | 72 - Languages/C++/Sieve of Eratosthenes | 35 - Languages/C++/Single_number.cpp | 17 - Languages/C++/Sort Array By Parity.cpp | 19 - Languages/C++/StackReverse(By Recursion).cpp | 49 - Languages/C++/Standard_Deviation_Calc.cpp | 27 - Languages/C++/StringStream_Hackerrank.cpp | 29 - Languages/C++/Subarray_with_givenSum.cpp | 45 - Languages/C++/TREE2.cpp | 27 - Languages/C++/Testing_array | 7 - Languages/C++/To lower case.cpp | 29 - Languages/C++/TopologicalSortUsingDFS.cpp | 53 - Languages/C++/Tower-Of-Hanoi.cpp | 27 - Languages/C++/TowerOfHanoi.cpp | 31 - Languages/C++/Tower_of_hanoi_problem.cpp | 273 - .../C++/Unique Number of Occurrences.cpp | 27 - Languages/C++/Vector-Sort_Hackerrank.cpp | 25 - Languages/C++/VerticalOrderTreePrint.cpp | 110 - Languages/C++/WavePrint.cpp | 64 - Languages/C++/all_subsets.cpp | 43 - Languages/C++/arrayintersection.cpp | 58 - Languages/C++/authenticationSystem.cpp | 199 - Languages/C++/bellman-ford.cpp | 134 - Languages/C++/binarySearch.cpp | 61 - Languages/C++/binarysearchrecursive.cpp | 47 - Languages/C++/bottomview.cpp | 101 - Languages/C++/bracketts.cpp | 73 - Languages/C++/bubble_sort.cpp | 0 Languages/C++/bubblesort.cpp | 44 - Languages/C++/cab booking system.cpp | 1134 -- Languages/C++/calc_score | 55 - Languages/C++/circularll.cpp | 94 - Languages/C++/count_inversions.cpp | 71 - Languages/C++/depthfirstsearch.cpp | 87 - Languages/C++/detect loop.cpp | 56 - Languages/C++/dijkstra.cpp | 145 - Languages/C++/dot_operator.cpp | 18 - Languages/C++/duplicate_remove.cpp | 14 - Languages/C++/factors_of_numbers.cpp | 19 - Languages/C++/fastExponentiation.cpp | 58 - Languages/C++/fib.cpp | 70 - Languages/C++/find_rep.cpp | 30 - Languages/C++/find_unique.cpp | 26 - Languages/C++/fractionalKnapsack.cpp | 77 - Languages/C++/greedy_median.cpp | 64 - Languages/C++/half-star pattern.cpp | 18 - Languages/C++/hanoi.cpp | 15 - Languages/C++/helloworld.cpp | 6 - Languages/C++/imageAddition.c | 84 - Languages/C++/india.cpp | 13 - Languages/C++/insertion_sort.cpp | 35 - Languages/C++/insertonsort.cpp | 29 - Languages/C++/iterative_bfs.cpp | 93 - Languages/C++/iterative_dfs.cpp | 99 - Languages/C++/job_selection.cpp | 64 - Languages/C++/leftviewtree.cpp | 99 - Languages/C++/librarymanagementsystem.cpp | 642 -- Languages/C++/linkedList.cpp | 110 - .../C++/longest_palindromic_subsequence.cpp | 87 - Languages/C++/longest_subsequence.cpp | 41 - Languages/C++/matchstring.cpp | 27 - Languages/C++/matrixChainMultiplication.cpp | 41 - Languages/C++/median.cpp | 54 - Languages/C++/mergeTwoSortedLL.cpp | 85 - Languages/C++/modulo_exp.cpp | 29 - Languages/C++/moneychange.cpp | 78 - Languages/C++/monty_hall_paradox.cpp | 13 - Languages/C++/numgen.cpp | 12 - Languages/C++/palindrome.cpp | 34 - Languages/C++/palindrome_number.cpp | 20 - Languages/C++/pattern_prctice(CB).cpp | 60 - Languages/C++/randomgenerator.cpp | 11 - Languages/C++/rat_in_a_maze_problem.cpp | 56 - Languages/C++/rotate_90.cpp | 62 - Languages/C++/seiveOfEratosthenes | 46 - Languages/C++/selectionSort.cpp | 50 - Languages/C++/selection_sort.cpp | 47 - Languages/C++/selectionsort.cpp | 50 - Languages/C++/sexy_prime.cpp | 39 - Languages/C++/sievetheorem.cpp | 17 - Languages/C++/sort01.cpp | 38 - Languages/C++/sort_an_array.cpp | 16 - Languages/C++/stack.cpp | 74 - Languages/C++/sudoku_solver.cpp | 103 - Languages/C++/swp.cpp | 59 - Languages/C++/task_scheduling.cpp | 60 - Languages/C++/template.cpp | 53 - Languages/C++/tictactoe game in Cpp | 191 - Languages/C++/tribonacci.cpp | 27 - Languages/C++/vertical_flip_video.cpp | 51 - Languages/C++/verticalorderBTprint.cpp | 68 - Languages/C++/videoAddition.c | 81 - Languages/C++/wine_problem.cpp | 75 - Languages/C++/wordbreak.cpp | 83 - Languages/C++/zoom_bilinear.cpp | 112 - Languages/C++/zoomin.cpp | 49 - Languages/C/Array_Rotation.c | 26 - Languages/C/BinarySearchTree.c | 112 - Languages/C/Bubble_Sort.c | 34 - Languages/C/Circular_Linked_List.c | 78 - Languages/C/DeletionArray.c | 18 - Languages/C/Fibonacci Series Recursion.c | 20 - Languages/C/Fibonacci Series.c | 16 - Languages/C/Fibonacci Triangle.c | 24 - Languages/C/InsertionArray.c | 26 - Languages/C/InsertionSort.c | 25 - Languages/C/Laddu.c | 58 - Languages/C/Matrix Mutiplication.c | 49 - Languages/C/Move.c | 89 - Languages/C/Number Triangle.c | 25 - Languages/C/PriorityQueue.c | 87 - Languages/C/Queueprograms.c | 79 - Languages/C/RepeatedDigit.c | 30 - Languages/C/RevLinkedList | 51 - Languages/C/Selection Sort.c | 46 - ...wo numbers without using third variable .c | 16 - Languages/C/avl_tree.c | 314 - Languages/C/binary-search.c | 33 - Languages/C/blockchain.c | 627 -- Languages/C/combsort.c | 91 - Languages/C/cpu.c | 28 - Languages/C/credit.c | 88 - Languages/C/dequeue.c | 154 - Languages/C/doublelinkedlist.c | 264 - Languages/C/fibonacciNumber.c | 20 - Languages/C/heapsort.cpp | 69 - Languages/C/hello_world.c | 9 - Languages/C/int_to_binary_string.c | 68 - Languages/C/lab5-1.c | 24 - Languages/C/largestno.c | 14 - Languages/C/lcm.c | 34 - Languages/C/linkedlist.c | 84 - Languages/C/mario.c | 34 - Languages/C/number in characters.c | 57 - Languages/C/oddeven.c | 12 - Languages/C/powerset.c | 23 - Languages/C/program without main function.c | 5 - Languages/C/pyramid.c | 42 - Languages/C/selection-sort.c | 34 - Languages/C/selection_sort.c | 46 - Languages/C/snakegame.c | 538 - Languages/C/stack.c | 82 - Languages/C/swapping of two numbers.c | 17 - Languages/Dart/HelloWorld.dart | 3 - Languages/Dart/algorithm/bubblesort.dart | 20 - Languages/Dart/algorithm/merge-sort.dart | 23 - Languages/Dart/videodesc.dart | 70 - Languages/Elixir/concurrent.exs | 13 - Languages/Elixir/fibonacci.exs | 17 - Languages/Elixir/hello_world.exs | 1 - Languages/GoLang/algorithms/binarySearch.go | 50 - Languages/GoLang/algorithms/bubble_sort.go | 35 - Languages/GoLang/algorithms/factorial.go | 18 - Languages/GoLang/algorithms/insertion_sort.go | 36 - Languages/GoLang/algorithms/quick_sort.go | 43 - Languages/GoLang/algorithms/selection_sort.go | 32 - Languages/GoLang/bubble_sort.go | 26 - Languages/GoLang/helloWorld.go | 5 - Languages/GoLang/prime_nos.go | 59 - Languages/GoLang/selection_sort.go | 39 - Languages/HTML/CircleRipple.html | 54 - Languages/HTML/CircularRipple.html | 50 - Languages/HTML/Clock.html | 99 - Languages/HTML/DigitalClock.html | 45 - Languages/HTML/Editor-HTML.html | 308 - Languages/HTML/Flex_Panel_Gallery.html | 140 - Languages/HTML/Forif.html | 36 - Languages/HTML/HTML-Editor.html | 308 - Languages/HTML/Hacktober.html | 178 - Languages/HTML/SimpleForm.html | 21 - Languages/HTML/blockRace.html | 178 - Languages/HTML/hello.html | 94 - Languages/HTML/helloWord.html | 9 - Languages/HTML/onChance.html | 29 - Languages/Haskell/HelloWorld.hs | 4 - Languages/Haskell/system environment.hs | 6 - Languages/Haskell/system info.hs | 7 - Languages/Insertion_sort.cpp | 47 - Languages/Java/.DS_Store | Bin 10244 -> 0 bytes Languages/Java/27032424.java | 37 - Languages/Java/AgeException.java | 44 - Languages/Java/ArrayInverse.java | 45 - Languages/Java/BST/.DS_Store | Bin 6148 -> 0 bytes Languages/Java/BST/BinarySearchTree.java | 159 - Languages/Java/BST/Main.java | 34 - Languages/Java/BST/PrintKDistance.java | 155 - Languages/Java/Binary2deci.java | 101 - Languages/Java/BinaryIndexedTree.java | 128 - Languages/Java/BubbleSort.java | 43 - Languages/Java/CHEFSUM | 31 - Languages/Java/CHFM.java | 41 - Languages/Java/Calculator.java | 122 - Languages/Java/Check.java | 26 - Languages/Java/CollectMaxCoins.java | 44 - Languages/Java/Convert.java | 10 - Languages/Java/DecompressZip.java | 48 - Languages/Java/DeleteElements.java | 35 - Languages/Java/DiamondPattern.java | 32 - .../Java/Dynamic Programming/CoinChange.java | 45 - .../Java/Dynamic Programming/Edit Distance | 41 - .../Java/Dynamic Programming/Fibonacci.java | 40 - Languages/Java/Dynamic Programming/LCS.java | 71 - Languages/Java/FindGreatestNumber.java | 35 - Languages/Java/Flipping an Image.java | 13 - Languages/Java/FourSum.java | 47 - Languages/Java/GCD using recursion.java | 26 - Languages/Java/GCD.java | 28 - Languages/Java/GameCraps.java | 83 - Languages/Java/GenerateChessBoard.java | 48 - Languages/Java/GuessingNumberGame.java | 33 - Languages/Java/Hashset.java | 28 - Languages/Java/Huffman-Encoder/.DS_Store | Bin 6148 -> 0 bytes .../Huffman-Encoder/.idea/description.html | 1 - Languages/Java/Huffman-Encoder/.idea/misc.xml | 12 - .../Java/Huffman-Encoder/.idea/modules.xml | 8 - .../.idea/project-template.xml | 3 - Languages/Java/Huffman-Encoder/.idea/vcs.xml | 6 - .../Java/Huffman-Encoder/.idea/workspace.xml | 390 - .../Java/Huffman-Encoder/HuffmanEncoder.java | 119 - .../Huffman-Encoder/HuffmanEncoderFile.java | 119 - Languages/Java/Huffman-Encoder/Main.java | 40 - Languages/Java/Initialization block | 21 - Languages/Java/Insertion_Sort.java | 43 - Languages/Java/Kadaans_Algorithm.java | 29 - Languages/Java/LengthOfLIS.java | 38 - Languages/Java/LexoPermute.java | 42 - .../Java/LinkedList/CircularLinkedList.java | 204 - Languages/Java/LinkedList/DLL.java | 138 - Languages/Java/LinkedList/LL.java | 86 - Languages/Java/LinkedList/LinkedList.java | 364 - Languages/Java/LinkedList/LinkedListMain.java | 46 - Languages/Java/LongestBitonicSubsequence.java | 60 - Languages/Java/MaxHeap.java | 81 - Languages/Java/Mazepath.java | 24 - Languages/Java/MergeSort.java | 73 - Languages/Java/MovingBanner.java | 51 - Languages/Java/NQueens.java | 77 - Languages/Java/NeedleInHaystack.java | 51 - Languages/Java/NextGreaterElement.java | 17 - Languages/Java/NextSmallerWithSameDigits.java | 102 - Languages/Java/OTP_Generator.java | 38 - Languages/Java/Palindrome.java | 7 - Languages/Java/Prime.java | 32 - Languages/Java/QuickSort.java | 56 - Languages/Java/Reverse.java | 31 - Languages/Java/RiverSizes.java | 99 - Languages/Java/SelectionSort.java | 42 - Languages/Java/SieveOfEratosthenes.java | 43 - Languages/Java/Sort_ArrayList.java | 27 - Languages/Java/Sorting.java | 126 - Languages/Java/Stack.java | 85 - Languages/Java/SudokuSolver.java | 82 - Languages/Java/SymmetricTree.java | 68 - Languages/Java/TeachMe(KickStart) | 48 - Languages/Java/Tower Of Hanoi.java | 28 - Languages/Java/Vectors.java | 33 - Languages/Java/Wildcard_matching.java | 49 - Languages/Java/appendanddelete.java | 39 - Languages/Java/arraymanipulation.java | 31 - Languages/Java/arraysum.java | 26 - Languages/Java/binarysearch.java | 44 - Languages/Java/disariumnumber.java | 27 - Languages/Java/dstapls(CodeChef) | 23 - Languages/Java/dynamic_method_dispatch.java | 43 - Languages/Java/encryption.java | 59 - Languages/Java/linear_search.java | 21 - Languages/Java/movieMagic.java | 52 - Languages/Java/multithreadedSorting.java | 158 - Languages/Java/stack_using_array.java | 65 - Languages/Javascript/Clock-js/img/clock.png | Bin 6025 -> 0 bytes Languages/Javascript/Clock-js/index.html | 23 - Languages/Javascript/Clock-js/script.js | 17 - Languages/Javascript/Clock-js/style.css | 113 - Languages/Javascript/IIFE.js | 4 - Languages/Javascript/JSPromises.js | 13 - .../index.html | 11 - .../script.js | 20 - Languages/Javascript/TextFileDownload.js | 25 - Languages/Javascript/arraySum.js | 23 - Languages/Javascript/asyncJS.js | 10 - Languages/Javascript/chuck-norris-jokes.js | 23 - Languages/Javascript/closure.js | 11 - Languages/Javascript/current-time.js | 1 - Languages/Javascript/diceRoll/1.png | Bin 1290 -> 0 bytes Languages/Javascript/diceRoll/2.png | Bin 1715 -> 0 bytes Languages/Javascript/diceRoll/3.png | Bin 2234 -> 0 bytes Languages/Javascript/diceRoll/4.png | Bin 2351 -> 0 bytes Languages/Javascript/diceRoll/5.png | Bin 2970 -> 0 bytes Languages/Javascript/diceRoll/6.png | Bin 3486 -> 0 bytes Languages/Javascript/diceRoll/diceRoll.html | 107 - Languages/Javascript/diceRoll/images.png | Bin 8615 -> 0 bytes Languages/Javascript/greeter.js | 6 - Languages/Javascript/hammingdistance.js | 19 - .../hello-world-in-HTML-DOM-via-Javascript | 16 - Languages/Javascript/helloworld.js | 1 - Languages/Javascript/helloworld2020.js | 1 - Languages/Javascript/iterate.js | 15 - .../0_Multiplication_table.html | 22 - .../1_Sum_Of_n_Natural_Numbers.html | 26 - .../2_star_pattern_1.html | 27 - .../3_star_pattern_2.html | 32 - .../4_star_pattern_3.html | 32 - .../5_Reverse_A_Number.html | 21 - Languages/Javascript/js-hello-world.js | 6 - Languages/Javascript/loopy-soupy-fizzbuzz | 18 - Languages/Javascript/moveZero.js | 14 - .../Javascript/myHacktoberfestContribution.js | 1 - Languages/Javascript/pallindromeDescendant.js | 19 - Languages/Javascript/roulette/ball.png | Bin 9284 -> 0 bytes Languages/Javascript/roulette/index.html | 280 - Languages/Javascript/roulette/pixi.min.js | 9 - Languages/Javascript/roulette/roulette.png | Bin 1361063 -> 0 bytes Languages/Javascript/roulette/roulette.svg | 128 - Languages/Javascript/roulette/segment.js | 39 - Languages/Javascript/secondRepo.js | 17 - Languages/Javascript/sum.js | 1 - Languages/Javascript/tic-tac-toe/app.js | 48 - Languages/Javascript/tic-tac-toe/index.html | 30 - Languages/Javascript/tic-tac-toe/style.css | 11 - Languages/Javascript/validatePIN.js | 10 - Languages/Julia/MNIST.jl | 114 - Languages/Kotlin/FizzBuzz.kt | 13 - Languages/Kotlin/GCD_Recursive.kt | 32 - Languages/Kotlin/IsPrime.kt | 26 - Languages/Kotlin/MergeSort.kt | 74 - Languages/Kotlin/PalindromeCheck.kt | 17 - Languages/Kotlin/QuickSort.kt | 42 - Languages/Kotlin/Searching.kt | 40 - Languages/Kotlin/SelectionSort.kt | 25 - Languages/Kotlin/fibonacci.kt | 16 - Languages/Kotlin/hello_world.kt | 10 - Languages/Kotlin/is_armstrong.kt | 16 - Languages/Kotlin/linear_search.kt | 18 - Languages/LOLCODE/main.lo | 3 - Languages/MATLAB/neuralnetworkmodel.m | 90 - Languages/NodeJs/EJS-ListIT/README.md | 3 - Languages/NodeJs/EJS-ListIT/app.js | 34 - .../NodeJs/EJS-ListIT/node_modules/.bin/mime | 1 - .../node_modules/accepts/HISTORY.md | 236 - .../EJS-ListIT/node_modules/accepts/LICENSE | 23 - .../EJS-ListIT/node_modules/accepts/README.md | 142 - .../EJS-ListIT/node_modules/accepts/index.js | 238 - .../node_modules/accepts/package.json | 86 - .../node_modules/array-flatten/LICENSE | 21 - .../node_modules/array-flatten/README.md | 43 - .../array-flatten/array-flatten.js | 64 - .../node_modules/array-flatten/package.json | 64 - .../node_modules/body-parser/HISTORY.md | 609 -- .../node_modules/body-parser/LICENSE | 23 - .../node_modules/body-parser/README.md | 443 - .../node_modules/body-parser/index.js | 157 - .../node_modules/body-parser/lib/read.js | 181 - .../body-parser/lib/types/json.js | 230 - .../node_modules/body-parser/lib/types/raw.js | 101 - .../body-parser/lib/types/text.js | 121 - .../body-parser/lib/types/urlencoded.js | 284 - .../node_modules/body-parser/package.json | 93 - .../EJS-ListIT/node_modules/bytes/History.md | 87 - .../EJS-ListIT/node_modules/bytes/LICENSE | 23 - .../EJS-ListIT/node_modules/bytes/Readme.md | 126 - .../EJS-ListIT/node_modules/bytes/index.js | 162 - .../node_modules/bytes/package.json | 84 - .../content-disposition/HISTORY.md | 55 - .../node_modules/content-disposition/LICENSE | 22 - .../content-disposition/README.md | 148 - .../node_modules/content-disposition/index.js | 458 - .../content-disposition/package.json | 79 - .../node_modules/content-type/HISTORY.md | 24 - .../node_modules/content-type/LICENSE | 22 - .../node_modules/content-type/README.md | 92 - .../node_modules/content-type/index.js | 222 - .../node_modules/content-type/package.json | 76 - .../node_modules/cookie-signature/.npmignore | 4 - .../node_modules/cookie-signature/History.md | 38 - .../node_modules/cookie-signature/Readme.md | 42 - .../node_modules/cookie-signature/index.js | 51 - .../cookie-signature/package.json | 57 - .../EJS-ListIT/node_modules/cookie/HISTORY.md | 123 - .../EJS-ListIT/node_modules/cookie/LICENSE | 24 - .../EJS-ListIT/node_modules/cookie/README.md | 253 - .../EJS-ListIT/node_modules/cookie/index.js | 198 - .../node_modules/cookie/package.json | 78 - .../node_modules/debug/.coveralls.yml | 1 - .../EJS-ListIT/node_modules/debug/.eslintrc | 11 - .../EJS-ListIT/node_modules/debug/.npmignore | 9 - .../EJS-ListIT/node_modules/debug/.travis.yml | 14 - .../node_modules/debug/CHANGELOG.md | 362 - .../EJS-ListIT/node_modules/debug/LICENSE | 19 - .../EJS-ListIT/node_modules/debug/Makefile | 50 - .../EJS-ListIT/node_modules/debug/README.md | 312 - .../node_modules/debug/component.json | 19 - .../node_modules/debug/karma.conf.js | 70 - .../EJS-ListIT/node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 91 - .../node_modules/debug/src/browser.js | 185 - .../node_modules/debug/src/debug.js | 202 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/inspector-log.js | 15 - .../EJS-ListIT/node_modules/debug/src/node.js | 248 - .../EJS-ListIT/node_modules/depd/History.md | 96 - .../EJS-ListIT/node_modules/depd/LICENSE | 22 - .../EJS-ListIT/node_modules/depd/Readme.md | 280 - .../EJS-ListIT/node_modules/depd/index.js | 522 - .../node_modules/depd/lib/browser/index.js | 77 - .../depd/lib/compat/callsite-tostring.js | 103 - .../depd/lib/compat/event-listener-count.js | 22 - .../node_modules/depd/lib/compat/index.js | 79 - .../EJS-ListIT/node_modules/depd/package.json | 79 - .../EJS-ListIT/node_modules/destroy/LICENSE | 22 - .../EJS-ListIT/node_modules/destroy/README.md | 60 - .../EJS-ListIT/node_modules/destroy/index.js | 75 - .../node_modules/destroy/package.json | 71 - .../EJS-ListIT/node_modules/ee-first/LICENSE | 22 - .../node_modules/ee-first/README.md | 80 - .../EJS-ListIT/node_modules/ee-first/index.js | 95 - .../node_modules/ee-first/package.json | 63 - .../EJS-ListIT/node_modules/ejs/Jakefile | 70 - .../EJS-ListIT/node_modules/ejs/LICENSE | 202 - .../EJS-ListIT/node_modules/ejs/README.md | 271 - .../NodeJs/EJS-ListIT/node_modules/ejs/ejs.js | 1588 --- .../EJS-ListIT/node_modules/ejs/ejs.min.js | 1 - .../EJS-ListIT/node_modules/ejs/lib/ejs.js | 953 -- .../EJS-ListIT/node_modules/ejs/lib/utils.js | 167 - .../EJS-ListIT/node_modules/ejs/package.json | 80 - .../node_modules/encodeurl/HISTORY.md | 14 - .../EJS-ListIT/node_modules/encodeurl/LICENSE | 22 - .../node_modules/encodeurl/README.md | 128 - .../node_modules/encodeurl/index.js | 60 - .../node_modules/encodeurl/package.json | 78 - .../node_modules/escape-html/LICENSE | 24 - .../node_modules/escape-html/Readme.md | 43 - .../node_modules/escape-html/index.js | 78 - .../node_modules/escape-html/package.json | 59 - .../EJS-ListIT/node_modules/etag/HISTORY.md | 83 - .../EJS-ListIT/node_modules/etag/LICENSE | 22 - .../EJS-ListIT/node_modules/etag/README.md | 159 - .../EJS-ListIT/node_modules/etag/index.js | 131 - .../EJS-ListIT/node_modules/etag/package.json | 86 - .../node_modules/express/History.md | 3477 ------ .../EJS-ListIT/node_modules/express/LICENSE | 24 - .../EJS-ListIT/node_modules/express/Readme.md | 155 - .../EJS-ListIT/node_modules/express/index.js | 11 - .../node_modules/express/lib/application.js | 644 -- .../node_modules/express/lib/express.js | 116 - .../express/lib/middleware/init.js | 43 - .../express/lib/middleware/query.js | 47 - .../node_modules/express/lib/request.js | 525 - .../node_modules/express/lib/response.js | 1142 -- .../node_modules/express/lib/router/index.js | 662 -- .../node_modules/express/lib/router/layer.js | 181 - .../node_modules/express/lib/router/route.js | 216 - .../node_modules/express/lib/utils.js | 306 - .../node_modules/express/lib/view.js | 182 - .../node_modules/express/package.json | 154 - .../node_modules/finalhandler/HISTORY.md | 187 - .../node_modules/finalhandler/LICENSE | 22 - .../node_modules/finalhandler/README.md | 148 - .../node_modules/finalhandler/index.js | 331 - .../node_modules/finalhandler/package.json | 80 - .../node_modules/forwarded/HISTORY.md | 16 - .../EJS-ListIT/node_modules/forwarded/LICENSE | 22 - .../node_modules/forwarded/README.md | 57 - .../node_modules/forwarded/index.js | 76 - .../node_modules/forwarded/package.json | 78 - .../EJS-ListIT/node_modules/fresh/HISTORY.md | 70 - .../EJS-ListIT/node_modules/fresh/LICENSE | 23 - .../EJS-ListIT/node_modules/fresh/README.md | 119 - .../EJS-ListIT/node_modules/fresh/index.js | 137 - .../node_modules/fresh/package.json | 90 - .../node_modules/http-errors/HISTORY.md | 149 - .../node_modules/http-errors/LICENSE | 23 - .../node_modules/http-errors/README.md | 163 - .../node_modules/http-errors/index.js | 266 - .../node_modules/http-errors/package.json | 93 - .../node_modules/iconv-lite/Changelog.md | 162 - .../node_modules/iconv-lite/LICENSE | 21 - .../node_modules/iconv-lite/README.md | 156 - .../iconv-lite/encodings/dbcs-codec.js | 555 - .../iconv-lite/encodings/dbcs-data.js | 176 - .../iconv-lite/encodings/index.js | 22 - .../iconv-lite/encodings/internal.js | 188 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 174 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../encodings/tables/gbk-added.json | 55 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - .../iconv-lite/encodings/utf16.js | 177 - .../node_modules/iconv-lite/encodings/utf7.js | 290 - .../iconv-lite/lib/bom-handling.js | 52 - .../iconv-lite/lib/extend-node.js | 217 - .../node_modules/iconv-lite/lib/index.d.ts | 24 - .../node_modules/iconv-lite/lib/index.js | 153 - .../node_modules/iconv-lite/lib/streams.js | 121 - .../node_modules/iconv-lite/package.json | 77 - .../EJS-ListIT/node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 7 - .../node_modules/inherits/inherits_browser.js | 23 - .../node_modules/inherits/package.json | 61 - .../EJS-ListIT/node_modules/ipaddr.js/LICENSE | 19 - .../node_modules/ipaddr.js/README.md | 233 - .../node_modules/ipaddr.js/ipaddr.min.js | 1 - .../node_modules/ipaddr.js/lib/ipaddr.js | 673 -- .../node_modules/ipaddr.js/lib/ipaddr.js.d.ts | 71 - .../node_modules/ipaddr.js/package.json | 69 - .../node_modules/media-typer/HISTORY.md | 22 - .../node_modules/media-typer/LICENSE | 22 - .../node_modules/media-typer/README.md | 81 - .../node_modules/media-typer/index.js | 270 - .../node_modules/media-typer/package.json | 61 - .../node_modules/merge-descriptors/HISTORY.md | 21 - .../node_modules/merge-descriptors/LICENSE | 23 - .../node_modules/merge-descriptors/README.md | 48 - .../node_modules/merge-descriptors/index.js | 60 - .../merge-descriptors/package.json | 69 - .../node_modules/methods/HISTORY.md | 29 - .../EJS-ListIT/node_modules/methods/LICENSE | 24 - .../EJS-ListIT/node_modules/methods/README.md | 51 - .../EJS-ListIT/node_modules/methods/index.js | 69 - .../node_modules/methods/package.json | 79 - .../node_modules/mime-db/HISTORY.md | 417 - .../EJS-ListIT/node_modules/mime-db/LICENSE | 22 - .../EJS-ListIT/node_modules/mime-db/README.md | 94 - .../EJS-ListIT/node_modules/mime-db/db.json | 7834 -------------- .../EJS-ListIT/node_modules/mime-db/index.js | 11 - .../node_modules/mime-db/package.json | 101 - .../node_modules/mime-types/HISTORY.md | 308 - .../node_modules/mime-types/LICENSE | 23 - .../node_modules/mime-types/README.md | 113 - .../node_modules/mime-types/index.js | 188 - .../node_modules/mime-types/package.json | 87 - .../EJS-ListIT/node_modules/mime/.npmignore | 0 .../EJS-ListIT/node_modules/mime/CHANGELOG.md | 164 - .../EJS-ListIT/node_modules/mime/LICENSE | 21 - .../EJS-ListIT/node_modules/mime/README.md | 90 - .../EJS-ListIT/node_modules/mime/cli.js | 8 - .../EJS-ListIT/node_modules/mime/mime.js | 108 - .../EJS-ListIT/node_modules/mime/package.json | 73 - .../EJS-ListIT/node_modules/mime/src/build.js | 53 - .../EJS-ListIT/node_modules/mime/src/test.js | 60 - .../EJS-ListIT/node_modules/mime/types.json | 1 - .../EJS-ListIT/node_modules/ms/index.js | 152 - .../EJS-ListIT/node_modules/ms/license.md | 21 - .../EJS-ListIT/node_modules/ms/package.json | 69 - .../EJS-ListIT/node_modules/ms/readme.md | 51 - .../node_modules/negotiator/HISTORY.md | 103 - .../node_modules/negotiator/LICENSE | 24 - .../node_modules/negotiator/README.md | 203 - .../node_modules/negotiator/index.js | 124 - .../node_modules/negotiator/lib/charset.js | 169 - .../node_modules/negotiator/lib/encoding.js | 184 - .../node_modules/negotiator/lib/language.js | 179 - .../node_modules/negotiator/lib/mediaType.js | 294 - .../node_modules/negotiator/package.json | 84 - .../node_modules/on-finished/HISTORY.md | 88 - .../node_modules/on-finished/LICENSE | 23 - .../node_modules/on-finished/README.md | 154 - .../node_modules/on-finished/index.js | 196 - .../node_modules/on-finished/package.json | 73 - .../node_modules/parseurl/HISTORY.md | 58 - .../EJS-ListIT/node_modules/parseurl/LICENSE | 24 - .../node_modules/parseurl/README.md | 133 - .../EJS-ListIT/node_modules/parseurl/index.js | 158 - .../node_modules/parseurl/package.json | 81 - .../node_modules/path-to-regexp/History.md | 36 - .../node_modules/path-to-regexp/LICENSE | 21 - .../node_modules/path-to-regexp/Readme.md | 35 - .../node_modules/path-to-regexp/index.js | 129 - .../node_modules/path-to-regexp/package.json | 59 - .../node_modules/proxy-addr/HISTORY.md | 150 - .../node_modules/proxy-addr/LICENSE | 22 - .../node_modules/proxy-addr/README.md | 155 - .../node_modules/proxy-addr/index.js | 327 - .../node_modules/proxy-addr/package.json | 82 - .../EJS-ListIT/node_modules/qs/.editorconfig | 30 - .../EJS-ListIT/node_modules/qs/.eslintignore | 1 - .../EJS-ListIT/node_modules/qs/.eslintrc | 21 - .../EJS-ListIT/node_modules/qs/CHANGELOG.md | 256 - .../NodeJs/EJS-ListIT/node_modules/qs/LICENSE | 28 - .../EJS-ListIT/node_modules/qs/README.md | 570 - .../EJS-ListIT/node_modules/qs/dist/qs.js | 782 -- .../EJS-ListIT/node_modules/qs/lib/formats.js | 18 - .../EJS-ListIT/node_modules/qs/lib/index.js | 11 - .../EJS-ListIT/node_modules/qs/lib/parse.js | 242 - .../node_modules/qs/lib/stringify.js | 269 - .../EJS-ListIT/node_modules/qs/lib/utils.js | 230 - .../EJS-ListIT/node_modules/qs/package.json | 87 - .../EJS-ListIT/node_modules/qs/test/.eslintrc | 17 - .../EJS-ListIT/node_modules/qs/test/index.js | 7 - .../EJS-ListIT/node_modules/qs/test/parse.js | 676 -- .../node_modules/qs/test/stringify.js | 679 -- .../EJS-ListIT/node_modules/qs/test/utils.js | 136 - .../node_modules/range-parser/HISTORY.md | 56 - .../node_modules/range-parser/LICENSE | 23 - .../node_modules/range-parser/README.md | 84 - .../node_modules/range-parser/index.js | 162 - .../node_modules/range-parser/package.json | 91 - .../node_modules/raw-body/HISTORY.md | 270 - .../EJS-ListIT/node_modules/raw-body/LICENSE | 22 - .../node_modules/raw-body/README.md | 219 - .../node_modules/raw-body/index.d.ts | 87 - .../EJS-ListIT/node_modules/raw-body/index.js | 286 - .../node_modules/raw-body/package.json | 90 - .../node_modules/safe-buffer/LICENSE | 21 - .../node_modules/safe-buffer/README.md | 584 - .../node_modules/safe-buffer/index.d.ts | 187 - .../node_modules/safe-buffer/index.js | 62 - .../node_modules/safe-buffer/package.json | 63 - .../node_modules/safer-buffer/LICENSE | 21 - .../safer-buffer/Porting-Buffer.md | 268 - .../node_modules/safer-buffer/Readme.md | 156 - .../node_modules/safer-buffer/dangerous.js | 58 - .../node_modules/safer-buffer/package.json | 60 - .../node_modules/safer-buffer/safer.js | 77 - .../node_modules/safer-buffer/tests.js | 406 - .../EJS-ListIT/node_modules/send/HISTORY.md | 496 - .../EJS-ListIT/node_modules/send/LICENSE | 23 - .../EJS-ListIT/node_modules/send/README.md | 329 - .../EJS-ListIT/node_modules/send/index.js | 1129 -- .../send/node_modules/ms/index.js | 162 - .../send/node_modules/ms/license.md | 21 - .../send/node_modules/ms/package.json | 69 - .../send/node_modules/ms/readme.md | 60 - .../EJS-ListIT/node_modules/send/package.json | 106 - .../node_modules/serve-static/HISTORY.md | 451 - .../node_modules/serve-static/LICENSE | 25 - .../node_modules/serve-static/README.md | 259 - .../node_modules/serve-static/index.js | 210 - .../node_modules/serve-static/package.json | 77 - .../node_modules/setprototypeof/LICENSE | 13 - .../node_modules/setprototypeof/README.md | 31 - .../node_modules/setprototypeof/index.d.ts | 2 - .../node_modules/setprototypeof/index.js | 17 - .../node_modules/setprototypeof/package.json | 64 - .../node_modules/setprototypeof/test/index.js | 24 - .../node_modules/statuses/HISTORY.md | 65 - .../EJS-ListIT/node_modules/statuses/LICENSE | 23 - .../node_modules/statuses/README.md | 127 - .../node_modules/statuses/codes.json | 66 - .../EJS-ListIT/node_modules/statuses/index.js | 113 - .../node_modules/statuses/package.json | 90 - .../node_modules/toidentifier/LICENSE | 21 - .../node_modules/toidentifier/README.md | 61 - .../node_modules/toidentifier/index.js | 30 - .../node_modules/toidentifier/package.json | 76 - .../node_modules/type-is/HISTORY.md | 259 - .../EJS-ListIT/node_modules/type-is/LICENSE | 23 - .../EJS-ListIT/node_modules/type-is/README.md | 170 - .../EJS-ListIT/node_modules/type-is/index.js | 266 - .../node_modules/type-is/package.json | 85 - .../EJS-ListIT/node_modules/unpipe/HISTORY.md | 4 - .../EJS-ListIT/node_modules/unpipe/LICENSE | 22 - .../EJS-ListIT/node_modules/unpipe/README.md | 43 - .../EJS-ListIT/node_modules/unpipe/index.js | 69 - .../node_modules/unpipe/package.json | 63 - .../node_modules/utils-merge/.npmignore | 9 - .../node_modules/utils-merge/LICENSE | 20 - .../node_modules/utils-merge/README.md | 34 - .../node_modules/utils-merge/index.js | 23 - .../node_modules/utils-merge/package.json | 66 - .../EJS-ListIT/node_modules/vary/HISTORY.md | 39 - .../EJS-ListIT/node_modules/vary/LICENSE | 22 - .../EJS-ListIT/node_modules/vary/README.md | 101 - .../EJS-ListIT/node_modules/vary/index.js | 149 - .../EJS-ListIT/node_modules/vary/package.json | 78 - Languages/NodeJs/EJS-ListIT/package-lock.json | 379 - Languages/NodeJs/EJS-ListIT/package.json | 16 - Languages/NodeJs/EJS-ListIT/views/home.ejs | 1 - Languages/NodeJs/EJS-ListIT/views/listit.ejs | 20 - Languages/NodeJs/myDiary | 1 - Languages/PHP/hacktoberfest2019.php | 5 - Languages/PHP/helloworld.php | 6 - Languages/PHP/helloworld2.php | 7 - Languages/PHP/logout.php | 6 - Languages/PHP/pdo.php | 7 - Languages/Pascal/hello-world.pas | 6 - Languages/Perl/Hello.pl | 14 - Languages/Perl/capitalize.pl | 13 - Languages/Purescript/README.md | 7 - Languages/Purescript/hello-world/.gitignore | 9 - Languages/Purescript/hello-world/bower.json | 16 - .../Purescript/hello-world/src/Main.purs | 9 - .../Purescript/hello-world/test/Main.purs | 9 - Languages/Python/.DS_Store | Bin 10244 -> 0 bytes Languages/Python/.idea/.gitignore | 3 - Languages/Python/.idea/Python.iml | 11 - .../inspectionProfiles/profiles_settings.xml | 6 - Languages/Python/.idea/misc.xml | 4 - Languages/Python/.idea/modules.xml | 8 - Languages/Python/.idea/vcs.xml | 6 - Languages/Python/AutoEncoders.ipynb | 182 - ...BinarySearch_1st&last_occurrence_AMAZON.py | 91 - Languages/Python/BubbleSort.py | 15 - Languages/Python/Calculator2.py | 32 - Languages/Python/Geometric_Sum.py | 14 - Languages/Python/HelloW.py | 1 - Languages/Python/HelloWorld_.py | 1 - .../Python/L-layer shallow neural network.py | 280 - Languages/Python/MailingThroughPython.py | 34 - Languages/Python/MergeSort.py | 57 - Languages/Python/Printtable.py | 4 - Languages/Python/QuickSort | 29 - Languages/Python/Sort_colors.py | 31 - Languages/Python/URI-2157.py | 12 - Languages/Python/URI-2863.py | 14 - Languages/Python/armstrong_number.py | 17 - Languages/Python/array_equilib.py | 12 - Languages/Python/bellman-ford.py | 69 - .../Python/binaryTreeInorderTraversal.py | 13 - Languages/Python/binary_search.py | 17 - Languages/Python/binarysearch.py | 28 - Languages/Python/blue_screen.py | 55 - Languages/Python/bucketsort.py | 39 - Languages/Python/bye_world.py | 1 - Languages/Python/calculator.py | 41 - Languages/Python/check_prime.py | 11 - Languages/Python/color_baloons.py | 80 - Languages/Python/countStrings.py | 19 - Languages/Python/date to day convert.py | 14 - Languages/Python/deque.py | 10 - Languages/Python/dijkstra.py | 81 - Languages/Python/euclidean_algorithm.py | 5 - Languages/Python/even.py | 12 - Languages/Python/fact.py | 13 - Languages/Python/factorial.py | 9 - Languages/Python/fibonacci.py | 16 - Languages/Python/fibonacci_dp.py | 16 - Languages/Python/fizzbuzz.py | 23 - Languages/Python/flip.py | 21 - .../gnerating_odd_numbers_in_a_interval.py | 13 - Languages/Python/green_screen.py | 42 - Languages/Python/heapsort.py | 47 - Languages/Python/hello.py | 1 - Languages/Python/helloWorld.py | 1 - Languages/Python/hello_world.py | 5 - Languages/Python/image compression/image.jpeg | Bin 5978 -> 0 bytes .../image compression/imagecompression.py | 62 - Languages/Python/insertion sort.py | 23 - .../Python/intersectionOf3SortedArrays.py | 6 - Languages/Python/is_anagram.py | 7 - Languages/Python/knapsack.py | 30 - Languages/Python/lan_search.py | 31 - Languages/Python/loadingSoundFile.py | 69 - Languages/Python/longestcommonsubsequence.py | 31 - Languages/Python/mac_changer.py | 28 - Languages/Python/mcm.py | 41 - Languages/Python/memoryGameGUI/game.py | 143 - Languages/Python/merging_linked_list.py | 77 - Languages/Python/oddeven.py | 5 - Languages/Python/openCvCam.py | 24 - Languages/Python/palindrome.py | 14 - Languages/Python/pass_strength_detect.py | 12 - Languages/Python/power_in_logn.py | 29 - .../Python/printing_matrix_in_spiral_form.py | 32 - Languages/Python/profanity_checker.py | 19 - Languages/Python/reverse.py | 14 - Languages/Python/rgb_channel.py | 29 - Languages/Python/rotate.py | 28 - Languages/Python/selection_sort.py | 21 - Languages/Python/simple_network_scanner.py | 40 - Languages/Python/singleLinkedList.py | 41 - Languages/Python/stack.py | 8 - Languages/Python/steppingNumbers.py | 21 - Languages/Python/swap_it.py | 7 - Languages/Python/todo-cmdLine-App.py | 55 - Languages/Python/twoSumBsts.py | 25 - Languages/Python/validPalindrome.py | 21 - Languages/Rust/hello_world.rs | 3 - Languages/Swift/hello_world.swift | 1 - Languages/TypeScript/HelloWorldInTS.ts | 7 - Languages/TypeScript/integer_reversal.ts | 8 - Languages/VisualBasic/HelloWorld.vb | 5 - Leetcode-Company-Wise-Problemss-master.zip | Bin 10105535 -> 0 bytes Left View of a binary tree | 59 - Linear_Search | 42 - Linear_search.c | 42 - Linked List/Circluar_Linked__List.c | 253 - Linked List/Concat_LL.c | 75 - Linked List/Count_SumLinked_List.c | 73 - Linked List/Create_LL_using_Insert.c | 71 - Linked List/Create_and_Display_LL.c | 53 - Linked List/Deleteing_LL.c | 85 - Linked List/Deleting_from_LL.c | 36 - Linked List/Doubly_Linked_List.c | 132 - Linked List/Insert_in_LL.c | 71 - Linked List/LinearLinkedList.c | 148 - Linked List/LinkedList_CPP.c | 137 - Linked List/Linked_List.c | 399 - Linked List/Max_LL.c | 62 - Linked List/Merge_LL.c | 104 - Linked List/Polynomial_Linked_List.c | 62 - Linked List/Remove_Duplicate_LL.c | 66 - Linked List/Reverse_LL.c | 91 - Linked List/Search_LL.c | 64 - Linked List/SortedInsert_LL.c | 77 - Linked List/isLoop_LL.c | 67 - Linked List/isSorted_LL.c | 60 - LongestCommonSubsequence.cpp | 37 - Magic 8-Ball.py | 37 - Magical Chessboard.cpp | 25 - Matrix_multiplication.c | 47 - MaxPairwiseProduct.cpp | 46 - Maximum_Rectangular_Area_in_a_Histogram.cpp | 83 - Mean_StdDeviation_Variance | 47 - Merge_Two_Sorted_Array.c | 79 - MonteCarloPi.cpp | 37 - Notepad Using Python/README.md | 18 - Notepad Using Python/notepad.ico | Bin 67646 -> 0 bytes Notepad Using Python/notepad.py | 113 - October1_leetcode.cpp | 20 - Palindrom.cpp | 48 - PasswordGenerator_java/Password.java | 52 - PasswordGenerator_java/pruebaPassword.java | 23 - Prefix Sum Algorithm.txt | 31 - Print.py | 1 - Prob_C.cpp | 103 - Program 23/readme.md | 4 - .../sum_of_square_of_binomial_coefficient.cpp | 32 - README.md | 285 - ReverseNumber.java | 22 - Right View of the binary tree | 66 - RockPaperScissorsSpockLizard.py | 77 - SPOJ_LIST/ABSP1.cpp | 37 - SPOJ_LIST/DOL.cpp | 32 - SPOJ_LIST/ESYRCRTN.cpp | 34 - SPOJ_LIST/GIRLSNBS.cpp | 47 - SPOJ_LIST/MOHIB.cpp | 31 - SPOJ_LIST/PHT.cpp | 34 - SPOJ_LIST/QUADAREA.cpp | 34 - SPOJ_LIST/SPCQ.cpp | 42 - SPOJ_LIST/SPOJQUESTIONSLIST.pdf | Bin 102310 -> 0 bytes SPOJ_LIST/acpc11b.cpp | 51 - SPOJ_LIST/army.cpp | 43 - SPOJ_LIST/codchess.cpp | 32 - SPOJ_LIST/crds.cpp | 35 - SPOJ_LIST/ec_conb.cpp | 37 - SPOJ_LIST/fashion.cpp | 44 - SPOJ_LIST/fctrl.cpp | 34 - SPOJ_LIST/fctrl2(c++17).cpp | 40 - SPOJ_LIST/fctrl2(using int array).cpp | 29 - SPOJ_LIST/ieeeeebgam.cpp | 33 - SPOJ_LIST/infix2postfix.cpp | 85 - Scissor - Image Compressor/ReadMe.md | 12 - Scissor - Image Compressor/app.js | 55 - Scissor - Image Compressor/compress.js | 505 - Scissor - Image Compressor/design.css | 227 - Scissor - Image Compressor/download.js | 125 - .../images/Compression Strength.png | Bin 1605 -> 0 bytes Scissor - Image Compressor/images/arrow.png | Bin 1128 -> 0 bytes Scissor - Image Compressor/images/credit.png | Bin 5576 -> 0 bytes .../images/decrease compression.png | Bin 712 -> 0 bytes .../images/download button.png | Bin 4849 -> 0 bytes Scissor - Image Compressor/images/favicon.png | Bin 5684 -> 0 bytes .../images/increase compression.png | Bin 749 -> 0 bytes .../images/instruct.png | Bin 11378 -> 0 bytes Scissor - Image Compressor/images/logo.png | Bin 3196 -> 0 bytes Scissor - Image Compressor/index.html | 60 - Scissor - Image Compressor/range.js | 15 - SelectionSort.cpp | 24 - Simpleform.html | 68 - SparseMatrix.cpp | 192 - StructuredArray.cpp | 169 - Subarray_with_a_sum.cpp | 46 - Sum_complex_number.py | 6 - Swaping.py | 7 - The Coin change prob solution | 57 - ThreeSumZero.java | 41 - Tower_Of_Hanoi.c | 27 - TransposeAMatrix.java | 38 - Utsav_Inverse permutation.cpp | 29 - XOR_operation.JAVA | 26 - addTwoNum.cpp | 22 - addition.jl | 1 - anagramstrings.cpp | 24 - arduino/Car_Bluetooth/Bluetooth.ino | 106 - .../DTMF/DTMF_ robo/DTMF_robo/DTMF_robo.ino | 100 - arduino/DTMF/DTMF_basics/DTMF_basics.ino | 32 - .../DTMF/DTMF_robo_spcl/DTMF_robo_spcl.ino | 155 - arduino/Fuel_Gauge/README.md | 29 - ...duino_to_android_via_bluetooth_or_wifi.ino | 115 - arduino/LED_1st_program/LED_1st_program.ino | 11 - arduino/README.md | 4 - arduino/TSOP_Remote/TSOP_Remote.ino | 40 - .../Ultrasonic_Sensor/Ultrasonic_Sensor.ino | 23 - arduino/Water_Quality_Test/README.md | 37 - .../Water_Quality_Test/water_quality_test.ino | 171 - bubbesort.cpp | 36 - bubbleSortByRecursion.cpp | 38 - calculate_arc_length.py | 39 - calculator_cpp.cpp | 49 - castle.py | 305 - catalanno.cpp | 20 - check_leap_year.c | 27 - colorMatchGame.py | 130 - cplusplus.cpp | 10 - demo.txt | 0 depth first search.cpp | 67 - deque.cpp | 36 - dijkstra.py | 76 - exponentiation_log(n).py | 15 - factorial.cpp | 16 - factorial.py | 21 - fibbonaci_number.cpp | 27 - fibonnaci.py | 14 - findUsingRecursion.cpp | 59 - graph/AbstractGraph.hpp | 133 - graph/AdjacencyList.hpp | 320 - graph/AdjacencyMatrix.hpp | 256 - graph/DirectedGraph.hpp | 193 - graph/GraphAdjacencyBase.hpp | 50 - graph/UndirectedGraph.hpp | 173 - happywomensday.cpp | 66 - hello-world-perl | 6 - hello.ml | 1 - hello.py | 2 - helloWorld.rs | 3 - helloWorld2 | 6 - hello_worl_vb.html | 7 - hello_world.jl | 3 - helloworld.cpp | 8 - helloworld21.cpp | 11 - helloworld_interpolation.jl | 3 - implementation_complexnumber | 136 - infixtopostfix.cpp | 71 - kadane.cpp | 27 - kruskal.cpp | 63 - lab5.c | 21 - linear_search.cpp | 44 - logs.js | 3 - longestIncreasingSubsequence.cpp | 44 - matrixKcoins.cpp | 64 - mergSort.cpp | 84 - merge sort trial.cpp | 86 - merge_sort.cpp | 98 - merge_sorted_arr.c | 79 - mergesort.py | 48 - mergesortsolution.cpp | 41 - miller_rabin_prime.cpp | 45 - multiplication-table.pas | 25 - numguess.py | 48 - online_rock_paper_scissors/app.js | 78 - online_rock_paper_scissors/game.html | 43 - online_rock_paper_scissors/style.css | 84 - out/production/Hacktoberfest1/Bash/HelloWorld | 2 - .../Hacktoberfest1/Batch/helloworld.bat | 3 - .../Hacktoberfest1/Brainfuck/helloWorld.b | 43 - .../.vs/HelloWorld/DesignTimeBuild/.dtbcache | Bin 371892 -> 0 bytes .../Hacktoberfest1/C#/.vs/HelloWorld/v16/.suo | Bin 19968 -> 0 bytes .../.vs/HelloWorld/v16/Server/sqlite3/db.lock | 0 .../HelloWorld/v16/Server/sqlite3/storage.ide | Bin 651264 -> 0 bytes .../v16/Server/sqlite3/storage.ide-shm | Bin 32768 -> 0 bytes .../v16/Server/sqlite3/storage.ide-wal | 0 .../Hacktoberfest1/C#/BubbleSort.cs | 19 - .../Hacktoberfest1/C#/HelloWorld.sln | 25 - .../C#/HelloWorld/HelloWorld.csproj | 8 - .../Hacktoberfest1/C#/HelloWorld/Program.cs | 18 - .../Debug/netcoreapp2.2/HelloWorld.deps.json | 23 - .../bin/Debug/netcoreapp2.2/HelloWorld.dll | Bin 4608 -> 0 bytes .../bin/Debug/netcoreapp2.2/HelloWorld.pdb | Bin 520 -> 0 bytes .../HelloWorld.runtimeconfig.dev.json | 9 - .../HelloWorld.runtimeconfig.json | 9 - .../netcoreapp2.2/HelloWorld.AssemblyInfo.cs | 23 - .../HelloWorld.AssemblyInfoInputs.cache | 1 - .../netcoreapp2.2/HelloWorld.assets.cache | Bin 20701 -> 0 bytes .../HelloWorld.csproj.CoreCompileInputs.cache | 1 - .../HelloWorld.csproj.FileListAbsolute.txt | 11 - .../HelloWorld.csprojAssemblyReference.cache | Bin 102817 -> 0 bytes .../obj/Debug/netcoreapp2.2/HelloWorld.dll | Bin 4608 -> 0 bytes .../obj/Debug/netcoreapp2.2/HelloWorld.pdb | Bin 520 -> 0 bytes .../obj/HelloWorld.csproj.nuget.cache | 5 - .../obj/HelloWorld.csproj.nuget.dgspec.json | 60 - .../obj/HelloWorld.csproj.nuget.g.props | 18 - .../obj/HelloWorld.csproj.nuget.g.targets | 10 - .../C#/HelloWorld/obj/project.assets.json | 744 -- .../C#/Maquina de Casino/Form1.cs | 569 - .../C#/Maquina de Casino/README.md | 16 - .../Hacktoberfest1/C#/NReinas/Form.cs | 176 - .../Hacktoberfest1/C#/NReinas/README.md | 18 - .../Hacktoberfest1/C#/bucketsort.cs | 141 - out/production/Hacktoberfest1/C#/mergesort.cs | 85 - .../Hacktoberfest1/C#/palindrome.cs | 24 - out/production/Hacktoberfest1/C#/quicksort.cs | 53 - .../Hacktoberfest1/C#/tree_traversal.cs | 123 - out/production/Hacktoberfest1/C++/BFS.cpp | 51 - out/production/Hacktoberfest1/C++/BS.cpp | 29 - .../Hacktoberfest1/C++/Burst Balloon DP.cpp | 42 - out/production/Hacktoberfest1/C++/DFS.cpp | 34 - .../Hacktoberfest1/C++/DiamondPattern | 54 - .../C++/Edit_distance_Leetcode_hard_level.cpp | 32 - out/production/Hacktoberfest1/C++/Euler_phi | 48 - .../Hacktoberfest1/C++/ExtendedEucleidian.cpp | 64 - .../C++/Finding_Unique_Number_in_Array | 15 - .../Hacktoberfest1/C++/Hello World ! | 7 - .../Hacktoberfest1/C++/Hello_India.cpp | 28 - .../Hacktoberfest1/C++/Huffman Code.cpp | 117 - .../C++/Insertion_in_binary_trees | 44 - .../C++/IntersectionOfarrays.cpp | 46 - .../Hacktoberfest1/C++/Kedane'sAlgo.cpp | 36 - out/production/Hacktoberfest1/C++/LCS.cpp | 38 - .../C++/Largest_Sum_Contiguous_Subarray.cpp | 44 - ...ongest_increasing_subsequence_O(nlogn).cpp | 56 - .../C++/MinPriorityQueueImplementation.cpp | 84 - out/production/Hacktoberfest1/C++/Nqueens.cpp | 45 - .../Hacktoberfest1/C++/Number_of_divisors.cpp | 49 - ..._the_final_destination(StairCase Question) | 18 - .../Hacktoberfest1/C++/Sieve of Eratosthenes | 35 - .../C++/StackReverse(By Recursion).cpp | 49 - .../C++/Standard_Deviation_Calc.cpp | 27 - .../Hacktoberfest1/C++/Testing_array | 7 - .../Hacktoberfest1/C++/all_subsets.cpp | 43 - .../Hacktoberfest1/C++/arrayintersection.cpp | 58 - .../C++/binarysearchrecursive.cpp | 47 - .../Hacktoberfest1/C++/bubble_sort.cpp | 39 - .../Hacktoberfest1/C++/detect loop.cpp | 56 - .../Hacktoberfest1/C++/factors_of_numbers.cpp | 19 - .../Hacktoberfest1/C++/fastExponentiation.cpp | 58 - .../Hacktoberfest1/C++/find_unique.cpp | 26 - .../Hacktoberfest1/C++/helloworld.cpp | 21 - .../Hacktoberfest1/C++/matchstring.cpp | 27 - .../Hacktoberfest1/C++/mergeTwoSortedLL.cpp | 85 - .../Hacktoberfest1/C++/monty_hall_paradox.cpp | 13 - out/production/Hacktoberfest1/C++/numgen.cpp | 12 - .../Hacktoberfest1/C++/palindrome.cpp | 34 - .../C++/pattern_prctice(CB).cpp | 60 - .../C++/rat_in_a_maze_problem.cpp | 56 - .../Hacktoberfest1/C++/seiveOfEratosthenes | 46 - .../Hacktoberfest1/C++/selectionSort.cpp | 51 - .../Hacktoberfest1/C++/selection_sort.cpp | 47 - .../Hacktoberfest1/C++/sievetheorem.cpp | 17 - out/production/Hacktoberfest1/C++/sort01.cpp | 38 - .../Hacktoberfest1/C++/sudoku_solver.cpp | 103 - .../C++/verticalorderBTprint.cpp | 68 - .../Hacktoberfest1/C++/wordbreak.cpp | 83 - .../Hacktoberfest1/C/Array_Rotation.c | 26 - out/production/Hacktoberfest1/C/Bubble_Sort.c | 34 - .../Hacktoberfest1/C/Circular_Linked_List.c | 78 - .../Hacktoberfest1/C/InsertionSort.c | 25 - .../Hacktoberfest1/C/Selection Sort.c | 46 - out/production/Hacktoberfest1/C/blockchain.c | 627 -- out/production/Hacktoberfest1/C/credit.c | 88 - out/production/Hacktoberfest1/C/hello_world.c | 9 - out/production/Hacktoberfest1/C/largestno.c | 14 - out/production/Hacktoberfest1/C/linkedlist.c | 84 - out/production/Hacktoberfest1/C/mario.c | 34 - out/production/Hacktoberfest1/C/oddeven.c | 12 - out/production/Hacktoberfest1/C/powerset.c | 23 - out/production/Hacktoberfest1/C/pyramid.c | 42 - .../Hacktoberfest1/C/selection_sort.c | 46 - out/production/Hacktoberfest1/C/snakegame.c | 538 - out/production/Hacktoberfest1/C/stack.c | 82 - .../C/swapping of two numbers.c | 17 - .../Hacktoberfest1/Dart/HelloWorld.dart | 3 - .../Hacktoberfest1/Elixir/fibonacci.exs | 17 - .../Hacktoberfest1/Elixir/hello_world.exs | 1 - .../Hacktoberfest1/GoLang/helloWorld.go | 5 - .../Hacktoberfest1/GoLang/prime_nos.go | 59 - .../Hacktoberfest1/GoLang/selection_sort.go | 39 - out/production/Hacktoberfest1/HTML/Clock.html | 99 - .../Hacktoberfest1/HTML/Hacktober.html | 178 - .../Hacktoberfest1/HTML/helloWord.html | 9 - .../Huffman-Encoder/.idea/description.html | 1 - .../Java/Huffman-Encoder/.idea/misc.xml | 12 - .../Java/Huffman-Encoder/.idea/modules.xml | 8 - .../.idea/project-template.xml | 3 - .../Java/Huffman-Encoder/.idea/vcs.xml | 6 - .../Java/Huffman-Encoder/.idea/workspace.xml | 390 - .../Hacktoberfest1/Java/TeachMe(KickStart) | 48 - .../Hacktoberfest1/Java/dstapls(CodeChef) | 23 - .../Hacktoberfest1/Javascript/IIFE.js | 4 - .../Hacktoberfest1/Javascript/asyncJS.js | 10 - .../Hacktoberfest1/Javascript/closure.js | 11 - .../Hacktoberfest1/Javascript/greeter.js | 6 - .../Javascript/hammingdistance.js | 19 - .../Hacktoberfest1/Javascript/helloworld.js | 1 - .../Hacktoberfest1/Javascript/helloworld2.js | 1 - .../Javascript/js-hello-world.js | 6 - .../Javascript/myHacktoberfestContribution.js | 1 - .../Hacktoberfest1/Javascript/sum.js | 1 - out/production/Hacktoberfest1/Julia/MNIST.jl | 114 - .../MATLAB/neuralnetworkmodel.m | 90 - .../Hacktoberfest1/PHP/helloworld.php | 6 - .../Hacktoberfest1/PHP/helloworld2.php | 7 - out/production/Hacktoberfest1/Perl/Hello.pl | 14 - .../Hacktoberfest1/Python/BubbleSort.py | 15 - .../Python/L-layer shallow neural network.py | 272 - .../Hacktoberfest1/Python/LinkedList.py | 52 - .../Python/MailingThroughPython.py | 34 - .../Hacktoberfest1/Python/Printtable.py | 4 - .../Hacktoberfest1/Python/QuickSort | 29 - .../Hacktoberfest1/Python/Sort_colors.py | 31 - .../Python/binaryTreeInorderTraversal.py | 13 - .../Hacktoberfest1/Python/binarysearch.py | 28 - .../Hacktoberfest1/Python/blue_screen.py | 55 - .../Hacktoberfest1/Python/calculator.py | 41 - .../Hacktoberfest1/Python/color_baloons.py | 80 - .../Hacktoberfest1/Python/fibonacci_dp.py | 16 - .../gnerating_odd_numbers_in_a_interval.py | 13 - .../Hacktoberfest1/Python/green_screen.py | 42 - .../Hacktoberfest1/Python/helloWorld.py | 1 - .../Hacktoberfest1/Python/hello_world.py | 2 - .../Hacktoberfest1/Python/is_anagram.py | 7 - .../Hacktoberfest1/Python/loadingSoundFile.py | 69 - .../Python/merging_linked_list.py | 77 - .../Hacktoberfest1/Python/oddeven.py | 5 - .../Hacktoberfest1/Python/palindrome.py | 18 - .../Python/pass_strength_detect.py | 12 - .../Python/printing_matrix_in_spiral_form.py | 32 - .../Hacktoberfest1/Python/reverse.py | 14 - .../Hacktoberfest1/Python/rgb_channel.py | 29 - .../Hacktoberfest1/Python/selection_sort.py | 21 - .../Hacktoberfest1/Python/singleLinkedList.py | 41 - .../Hacktoberfest1/Python/swap_it.py | 7 - .../Hacktoberfest1/Rust/hello_world.rs | 3 - .../TypeScript/HelloWorldInTS.ts | 7 - .../Hacktoberfest1/VisualBasic/HelloWorld.vb | 5 - overloadingNewDelete.cpp | 23 - palindrome_check_for_number.java | 26 - pascal.java | 57 - permutation.java | 18 - permuted_string.cpp | 42 - play_music.py | 17 - push_zeros.java | 104 - queue.cpp | 106 - quicksort.c | 73 - removeInvalidParenthesis.cpp | 87 - reverse-string.java | 20 - saddlepoint.cpp | 54 - secondRepo.js | 17 - semdmail.py | 13 - shamirSharing.py | 58 - shortest distance bw two node.cpp | 74 - snake game.txt | 247 - sumoftwonos.c | 15 - taylor_series_using_horner's_rul.cpp | 14 - ...verage of multiple user-entered numbers.py | 10 - tic tac toe program.cpp | 162 - tictactoe.cpp | 147 - tilingProblem.cpp | 30 - topological_sort.cpp | 88 - tower_of_hanoi.py | 8 - towerofhanoi.cpp | 15 - twinprime.java | 35 - uni_bst.cpp | 30 - vector.cpp | 20 - xor_operation.java | 26 - 2784 files changed, 2905 insertions(+), 376866 deletions(-) delete mode 100644 JAVA /MergeSortInLinkedList/ListNode.class delete mode 100644 JAVA /MergeSortInLinkedList/MergeSortIn2LinkedList.class delete mode 100644 JAVA /MergeSortInLinkedList/MergeSortIn2LinkedList.java delete mode 100644 JavaScript/insertion_sort.js delete mode 100644 Javacode/Avltree.java delete mode 100644 Javacode/sort.java delete mode 100644 Kadane Algorithm.txt delete mode 100644 LCM-GCD.java delete mode 100644 LICENSE delete mode 100644 Languages/.DS_Store delete mode 100644 Languages/APIs/first_request.js delete mode 100644 Languages/APIs/movie-rating/index.js delete mode 120000 Languages/APIs/movie-rating/node_modules/.bin/mime delete mode 120000 Languages/APIs/movie-rating/node_modules/.bin/sshpk-conv delete mode 120000 Languages/APIs/movie-rating/node_modules/.bin/sshpk-sign delete mode 120000 Languages/APIs/movie-rating/node_modules/.bin/sshpk-verify delete mode 120000 Languages/APIs/movie-rating/node_modules/.bin/uuid delete mode 100644 Languages/APIs/movie-rating/node_modules/accepts/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/accepts/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/accepts/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/accepts/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/accepts/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/.tonic_example.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/dist/ajv.bundle.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/dist/ajv.min.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/dist/ajv.min.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/ajv.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/ajv.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/cache.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/async.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/equal.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/error_classes.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/formats.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/resolve.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/rules.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/schema_obj.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/ucs2length.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/compile/util.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/data.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/definition_schema.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limit.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitItems.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitLength.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitProperties.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/allOf.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/anyOf.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/coerce.def delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/comment.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/const.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/contains.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/custom.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/defaults.def delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/definitions.def delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/dependencies.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/enum.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/errors.def delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/format.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/if.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/items.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/missing.def delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/multipleOf.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/not.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/oneOf.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/pattern.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/properties.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/propertyNames.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/ref.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/required.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/uniqueItems.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dot/validate.jst delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limit.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitItems.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitLength.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitProperties.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/allOf.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/anyOf.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/comment.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/const.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/contains.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/custom.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/dependencies.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/enum.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/format.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/if.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/items.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/multipleOf.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/not.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/oneOf.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/pattern.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/properties.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/propertyNames.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/ref.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/required.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/uniqueItems.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/validate.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/keyword.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/refs/data.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/refs/json-schema-draft-04.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/refs/json-schema-draft-06.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/refs/json-schema-draft-07.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/lib/refs/json-schema-secure.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/scripts/.eslintrc.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/scripts/bundle.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ajv/scripts/compile-dots.js delete mode 100755 Languages/APIs/movie-rating/node_modules/ajv/scripts/info delete mode 100755 Languages/APIs/movie-rating/node_modules/ajv/scripts/prepare-tests delete mode 100755 Languages/APIs/movie-rating/node_modules/ajv/scripts/publish-built-version delete mode 100755 Languages/APIs/movie-rating/node_modules/ajv/scripts/travis-gh-pages delete mode 100644 Languages/APIs/movie-rating/node_modules/array-flatten/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/array-flatten/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/array-flatten/array-flatten.js delete mode 100644 Languages/APIs/movie-rating/node_modules/array-flatten/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/lib/ber/errors.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/lib/ber/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/lib/ber/reader.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/lib/ber/types.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/lib/ber/writer.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asn1/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/assert-plus/AUTHORS delete mode 100644 Languages/APIs/movie-rating/node_modules/assert-plus/CHANGES.md delete mode 100644 Languages/APIs/movie-rating/node_modules/assert-plus/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/assert-plus/assert.js delete mode 100644 Languages/APIs/movie-rating/node_modules/assert-plus/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/bench.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/abort.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/async.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/defer.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/iterate.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_asynckit.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_parallel.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial_ordered.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/state.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/streamify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/lib/terminator.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/parallel.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/serial.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/serialOrdered.js delete mode 100644 Languages/APIs/movie-rating/node_modules/asynckit/stream.js delete mode 100644 Languages/APIs/movie-rating/node_modules/aws-sign2/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/aws-sign2/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/aws-sign2/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/aws-sign2/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/aws4/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/aws4/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/aws4/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/aws4/aws4.js delete mode 100644 Languages/APIs/movie-rating/node_modules/aws4/lru.js delete mode 100644 Languages/APIs/movie-rating/node_modules/aws4/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/CONTRIBUTING.md delete mode 100644 Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/lib/read.js delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/lib/types/json.js delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/lib/types/raw.js delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/lib/types/text.js delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/lib/types/urlencoded.js delete mode 100644 Languages/APIs/movie-rating/node_modules/body-parser/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/bytes/History.md delete mode 100644 Languages/APIs/movie-rating/node_modules/bytes/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/bytes/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/bytes/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/bytes/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/caseless/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/caseless/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/caseless/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/caseless/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/caseless/test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/combined-stream/License delete mode 100644 Languages/APIs/movie-rating/node_modules/combined-stream/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/combined-stream/lib/combined_stream.js delete mode 100644 Languages/APIs/movie-rating/node_modules/combined-stream/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/combined-stream/yarn.lock delete mode 100644 Languages/APIs/movie-rating/node_modules/content-disposition/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/content-disposition/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/content-disposition/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/content-disposition/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/content-disposition/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/content-type/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/content-type/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/content-type/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/content-type/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/content-type/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie-signature/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie-signature/History.md delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie-signature/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie-signature/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie-signature/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/cookie/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/core-util-is/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/core-util-is/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/core-util-is/float.patch delete mode 100644 Languages/APIs/movie-rating/node_modules/core-util-is/lib/util.js delete mode 100644 Languages/APIs/movie-rating/node_modules/core-util-is/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/core-util-is/test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/dashdash/CHANGES.md delete mode 100644 Languages/APIs/movie-rating/node_modules/dashdash/LICENSE.txt delete mode 100644 Languages/APIs/movie-rating/node_modules/dashdash/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/dashdash/etc/dashdash.bash_completion.in delete mode 100644 Languages/APIs/movie-rating/node_modules/dashdash/lib/dashdash.js delete mode 100644 Languages/APIs/movie-rating/node_modules/dashdash/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/.coveralls.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/.eslintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/Makefile delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/component.json delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/karma.conf.js delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/node.js delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/src/browser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/src/debug.js delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/src/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/src/inspector-log.js delete mode 100644 Languages/APIs/movie-rating/node_modules/debug/src/node.js delete mode 100644 Languages/APIs/movie-rating/node_modules/delayed-stream/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/delayed-stream/License delete mode 100644 Languages/APIs/movie-rating/node_modules/delayed-stream/Makefile delete mode 100644 Languages/APIs/movie-rating/node_modules/delayed-stream/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/delayed-stream/lib/delayed_stream.js delete mode 100644 Languages/APIs/movie-rating/node_modules/delayed-stream/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/History.md delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/lib/browser/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/lib/compat/callsite-tostring.js delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/lib/compat/event-listener-count.js delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/lib/compat/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/depd/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/destroy/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/destroy/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/destroy/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/destroy/package.json delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/LICENSE delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/README.md delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/index.js delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/lib/LICENSE-jsbn delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/lib/ec.js delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/lib/sec.js delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/package.json delete mode 100755 Languages/APIs/movie-rating/node_modules/ecc-jsbn/test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ee-first/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/ee-first/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/ee-first/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ee-first/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/encodeurl/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/encodeurl/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/encodeurl/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/encodeurl/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/encodeurl/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/escape-html/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/escape-html/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/escape-html/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/escape-html/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/etag/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/etag/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/etag/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/etag/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/etag/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/express/History.md delete mode 100644 Languages/APIs/movie-rating/node_modules/express/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/express/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/express/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/application.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/express.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/middleware/init.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/middleware/query.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/request.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/response.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/router/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/router/layer.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/router/route.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/lib/view.js delete mode 100644 Languages/APIs/movie-rating/node_modules/express/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/.editorconfig delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/.eslintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/.jscs.json delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/component.json delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/extend/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/.gitmodules delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/Makefile delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/Makefile.targ delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/jsl.node.conf delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/lib/extsprintf.js delete mode 100644 Languages/APIs/movie-rating/node_modules/extsprintf/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-deep-equal/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-deep-equal/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-deep-equal/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-deep-equal/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-deep-equal/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/.eslintrc.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/benchmark/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/benchmark/test.json delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/example/key_cmp.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/example/nested.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/example/str.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/example/value_cmp.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/test/cmp.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/test/nested.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/test/str.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fast-json-stable-stringify/test/to-json.js delete mode 100644 Languages/APIs/movie-rating/node_modules/finalhandler/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/finalhandler/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/finalhandler/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/finalhandler/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/finalhandler/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/forever-agent/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/forever-agent/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/forever-agent/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/forever-agent/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/License delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/README.md.bak delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/lib/browser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/lib/form_data.js delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/lib/populate.js delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/form-data/yarn.lock delete mode 100644 Languages/APIs/movie-rating/node_modules/forwarded/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/forwarded/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/forwarded/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/forwarded/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/forwarded/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/fresh/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/fresh/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/fresh/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/fresh/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/fresh/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/getpass/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/getpass/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/getpass/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/getpass/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/getpass/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/getpass/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/afterRequest.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/beforeRequest.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/browser.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/cache.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/content.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/cookie.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/creator.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/entry.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/har.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/header.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/log.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/page.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/pageTimings.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/postData.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/query.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/request.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/response.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/lib/timings.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-schema/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/har-validator/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/har-validator/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/har-validator/lib/async.js delete mode 100644 Languages/APIs/movie-rating/node_modules/har-validator/lib/error.js delete mode 100644 Languages/APIs/movie-rating/node_modules/har-validator/lib/promise.js delete mode 100644 Languages/APIs/movie-rating/node_modules/har-validator/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/http-errors/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/http-errors/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/http-errors/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/http-errors/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/http-errors/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/.dir-locals.el delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/CHANGES.md delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/http_signing.md delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/lib/parser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/lib/signer.js delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/lib/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/lib/verify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/http-signature/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/Changelog.md delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/internal.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/utf16.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/encodings/utf7.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/lib/extend-node.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/lib/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/lib/streams.js delete mode 100644 Languages/APIs/movie-rating/node_modules/iconv-lite/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/inherits/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/inherits/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/inherits/inherits.js delete mode 100644 Languages/APIs/movie-rating/node_modules/inherits/inherits_browser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/inherits/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ipaddr.js/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/ipaddr.js/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/ipaddr.js/ipaddr.min.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ipaddr.js/lib/ipaddr.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ipaddr.js/lib/ipaddr.js.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/ipaddr.js/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/is-typedarray/LICENSE.md delete mode 100644 Languages/APIs/movie-rating/node_modules/is-typedarray/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/is-typedarray/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/is-typedarray/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/is-typedarray/test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/.jshintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/LICENSE.md delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/isstream.js delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/isstream/test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/example.html delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/example.js delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/jsbn/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/.eslintrc.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/spec/.eslintrc.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/spec/fixtures/schema.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema-traverse/spec/index.spec.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-00/hyper-schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-00/json-ref delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-00/links delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-00/schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-01/hyper-schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-01/json-ref delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-01/links delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-01/schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-02/hyper-schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-02/json-ref delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-02/links delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-02/schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/examples/address delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/examples/calendar delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/examples/card delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/examples/geo delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/examples/interfaces delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/hyper-schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/json-ref delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/links delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-03/schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-04/hyper-schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-04/links delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-04/schema delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-zyp-json-schema-03.xml delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/draft-zyp-json-schema-04.xml delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/lib/links.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/lib/validate.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/json-schema/test/tests.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/Makefile delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/stringify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/test/mocha.opts delete mode 100644 Languages/APIs/movie-rating/node_modules/json-stringify-safe/test/stringify_test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/jsprim/CHANGES.md delete mode 100644 Languages/APIs/movie-rating/node_modules/jsprim/CONTRIBUTING.md delete mode 100644 Languages/APIs/movie-rating/node_modules/jsprim/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/jsprim/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/jsprim/lib/jsprim.js delete mode 100644 Languages/APIs/movie-rating/node_modules/jsprim/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/media-typer/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/media-typer/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/media-typer/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/media-typer/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/media-typer/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/merge-descriptors/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/merge-descriptors/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/merge-descriptors/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/merge-descriptors/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/merge-descriptors/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/methods/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/methods/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/methods/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/methods/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/methods/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-db/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-db/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-db/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-db/db.json delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-db/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-db/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-types/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-types/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-types/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-types/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/mime-types/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/README.md delete mode 100755 Languages/APIs/movie-rating/node_modules/mime/cli.js delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/mime.js delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/package.json delete mode 100755 Languages/APIs/movie-rating/node_modules/mime/src/build.js delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/src/test.js delete mode 100644 Languages/APIs/movie-rating/node_modules/mime/types.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ms/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/ms/license.md delete mode 100644 Languages/APIs/movie-rating/node_modules/ms/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/ms/readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/lib/charset.js delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/lib/encoding.js delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/lib/language.js delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/lib/mediaType.js delete mode 100644 Languages/APIs/movie-rating/node_modules/negotiator/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/oauth-sign/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/oauth-sign/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/oauth-sign/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/oauth-sign/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/on-finished/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/on-finished/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/on-finished/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/on-finished/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/on-finished/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/parseurl/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/parseurl/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/parseurl/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/parseurl/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/parseurl/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/path-to-regexp/History.md delete mode 100644 Languages/APIs/movie-rating/node_modules/path-to-regexp/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/path-to-regexp/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/path-to-regexp/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/path-to-regexp/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/.tm_properties delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/lib/performance-now.js delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/lib/performance-now.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/license.txt delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/src/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/src/performance-now.coffee delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/test/mocha.opts delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/test/performance-now.coffee delete mode 100644 Languages/APIs/movie-rating/node_modules/performance-now/test/scripts.coffee delete mode 100755 Languages/APIs/movie-rating/node_modules/performance-now/test/scripts/delayed-call.coffee delete mode 100755 Languages/APIs/movie-rating/node_modules/performance-now/test/scripts/delayed-require.coffee delete mode 100755 Languages/APIs/movie-rating/node_modules/performance-now/test/scripts/difference.coffee delete mode 100755 Languages/APIs/movie-rating/node_modules/performance-now/test/scripts/initial-value.coffee delete mode 100644 Languages/APIs/movie-rating/node_modules/proxy-addr/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/proxy-addr/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/proxy-addr/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/proxy-addr/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/proxy-addr/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/browserstack-logo.svg delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/data/rules.json delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/dist/psl.js delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/dist/psl.min.js delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/psl/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/punycode/LICENSE-MIT.txt delete mode 100644 Languages/APIs/movie-rating/node_modules/punycode/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/punycode/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/punycode/punycode.es6.js delete mode 100644 Languages/APIs/movie-rating/node_modules/punycode/punycode.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/.editorconfig delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/.eslintignore delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/.eslintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/dist/qs.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/lib/formats.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/lib/parse.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/lib/stringify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/lib/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/test/.eslintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/test/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/test/parse.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/test/stringify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/qs/test/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/range-parser/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/range-parser/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/range-parser/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/range-parser/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/range-parser/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/raw-body/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/raw-body/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/raw-body/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/raw-body/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/raw-body/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/raw-body/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/request/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/request/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/request/README.md delete mode 100755 Languages/APIs/movie-rating/node_modules/request/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/auth.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/cookies.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/getProxyFromURI.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/har.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/hawk.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/helpers.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/multipart.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/oauth.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/querystring.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/redirect.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/lib/tunnel.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/.editorconfig delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/.eslintignore delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/.eslintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/dist/qs.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/lib/formats.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/lib/parse.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/lib/stringify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/lib/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/test/.eslintrc delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/test/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/test/parse.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/test/stringify.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/node_modules/qs/test/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/request/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/request/request.js delete mode 100644 Languages/APIs/movie-rating/node_modules/safe-buffer/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/safe-buffer/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/safe-buffer/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/safe-buffer/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/safe-buffer/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/Readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/dangerous.js delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/safer.js delete mode 100644 Languages/APIs/movie-rating/node_modules/safer-buffer/tests.js delete mode 100644 Languages/APIs/movie-rating/node_modules/send/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/send/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/send/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/send/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/send/node_modules/ms/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/send/node_modules/ms/license.md delete mode 100644 Languages/APIs/movie-rating/node_modules/send/node_modules/ms/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/send/node_modules/ms/readme.md delete mode 100644 Languages/APIs/movie-rating/node_modules/send/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/serve-static/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/serve-static/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/serve-static/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/serve-static/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/serve-static/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/setprototypeof/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/setprototypeof/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/setprototypeof/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/setprototypeof/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/setprototypeof/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/setprototypeof/test/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/.travis.yml delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/README.md delete mode 100755 Languages/APIs/movie-rating/node_modules/sshpk/bin/sshpk-conv delete mode 100755 Languages/APIs/movie-rating/node_modules/sshpk/bin/sshpk-sign delete mode 100755 Languages/APIs/movie-rating/node_modules/sshpk/bin/sshpk-verify delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/algs.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/certificate.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/dhe.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/ed-compat.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/errors.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/fingerprint.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/auto.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/dnssec.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/openssh-cert.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/pem.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/pkcs1.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/pkcs8.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/putty.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/rfc4253.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/ssh-private.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/ssh.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/x509-pem.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/formats/x509.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/identity.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/key.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/private-key.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/signature.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/ssh-buffer.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/lib/utils.js delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/man/man1/sshpk-conv.1 delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/man/man1/sshpk-sign.1 delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/man/man1/sshpk-verify.1 delete mode 100644 Languages/APIs/movie-rating/node_modules/sshpk/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/statuses/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/statuses/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/statuses/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/statuses/codes.json delete mode 100644 Languages/APIs/movie-rating/node_modules/statuses/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/statuses/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/toidentifier/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/toidentifier/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/toidentifier/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/toidentifier/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/lib/cookie.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/lib/memstore.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/lib/store.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/node_modules/punycode/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/node_modules/punycode/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/node_modules/punycode/punycode.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tough-cookie/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/tunnel-agent/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/tunnel-agent/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tunnel-agent/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tunnel-agent/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/AUTHORS.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/nacl-fast.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/nacl-fast.min.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/nacl.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/nacl.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/nacl.min.js delete mode 100644 Languages/APIs/movie-rating/node_modules/tweetnacl/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/type-is/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/type-is/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/type-is/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/type-is/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/type-is/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/unpipe/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/unpipe/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/unpipe/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/unpipe/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/unpipe/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/bower.json delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/es5/uri.all.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/es5/uri.all.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/es5/uri.all.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/es5/uri.all.min.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/es5/uri.all.min.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/es5/uri.all.min.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/index.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/index.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/regexps-iri.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/regexps-iri.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/regexps-iri.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/regexps-uri.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/regexps-uri.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/regexps-uri.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/http.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/http.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/http.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/https.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/https.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/https.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/mailto.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/mailto.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/urn.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/urn.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/schemes/urn.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/uri.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/uri.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/uri.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/util.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/util.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/dist/esnext/util.js.map delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/rollup.config.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/index.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/punycode.d.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/regexps-iri.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/regexps-uri.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/schemes/http.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/schemes/https.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/schemes/mailto.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/schemes/urn-uuid.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/schemes/urn.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/uri.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/src/util.ts delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/tests/qunit.css delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/tests/qunit.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/tests/test-es5-min.html delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/tests/test-es5.html delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/tests/tests.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/tsconfig.json delete mode 100644 Languages/APIs/movie-rating/node_modules/uri-js/yarn.lock delete mode 100644 Languages/APIs/movie-rating/node_modules/utils-merge/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/utils-merge/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/utils-merge/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/utils-merge/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/utils-merge/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/AUTHORS delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/CHANGELOG.md delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/LICENSE.md delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/README.md delete mode 100755 Languages/APIs/movie-rating/node_modules/uuid/bin/uuid delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/bytesToUuid.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/md5-browser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/md5.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/rng-browser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/rng.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/sha1-browser.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/sha1.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/lib/v35.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/v1.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/v3.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/v4.js delete mode 100644 Languages/APIs/movie-rating/node_modules/uuid/v5.js delete mode 100644 Languages/APIs/movie-rating/node_modules/vary/HISTORY.md delete mode 100644 Languages/APIs/movie-rating/node_modules/vary/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/vary/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/vary/index.js delete mode 100644 Languages/APIs/movie-rating/node_modules/vary/package.json delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/.npmignore delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/CHANGES.md delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/CONTRIBUTING.md delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/LICENSE delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/README.md delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/lib/verror.js delete mode 100644 Languages/APIs/movie-rating/node_modules/verror/package.json delete mode 100644 Languages/APIs/movie-rating/package-lock.json delete mode 100644 Languages/APIs/movie-rating/package.json delete mode 100644 Languages/APIs/movie-rating/untitled delete mode 120000 Languages/APIs/node_modules/.bin/sshpk-conv delete mode 120000 Languages/APIs/node_modules/.bin/sshpk-sign delete mode 120000 Languages/APIs/node_modules/.bin/sshpk-verify delete mode 120000 Languages/APIs/node_modules/.bin/uuid delete mode 100644 Languages/APIs/node_modules/ajv/.tonic_example.js delete mode 100644 Languages/APIs/node_modules/ajv/LICENSE delete mode 100644 Languages/APIs/node_modules/ajv/README.md delete mode 100644 Languages/APIs/node_modules/ajv/dist/ajv.bundle.js delete mode 100644 Languages/APIs/node_modules/ajv/dist/ajv.min.js delete mode 100644 Languages/APIs/node_modules/ajv/dist/ajv.min.js.map delete mode 100644 Languages/APIs/node_modules/ajv/lib/ajv.d.ts delete mode 100644 Languages/APIs/node_modules/ajv/lib/ajv.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/cache.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/async.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/equal.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/error_classes.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/formats.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/index.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/resolve.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/rules.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/schema_obj.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/ucs2length.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/compile/util.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/data.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/definition_schema.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/_limit.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/_limitItems.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/_limitLength.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/_limitProperties.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/allOf.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/anyOf.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/coerce.def delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/comment.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/const.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/contains.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/custom.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/defaults.def delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/definitions.def delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/dependencies.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/enum.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/errors.def delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/format.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/if.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/items.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/missing.def delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/multipleOf.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/not.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/oneOf.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/pattern.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/properties.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/propertyNames.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/ref.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/required.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/uniqueItems.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dot/validate.jst delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/README.md delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/_limit.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/_limitItems.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/_limitLength.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/_limitProperties.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/allOf.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/anyOf.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/comment.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/const.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/contains.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/custom.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/dependencies.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/enum.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/format.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/if.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/index.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/items.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/multipleOf.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/not.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/oneOf.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/pattern.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/properties.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/propertyNames.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/ref.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/required.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/uniqueItems.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/dotjs/validate.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/keyword.js delete mode 100644 Languages/APIs/node_modules/ajv/lib/refs/data.json delete mode 100644 Languages/APIs/node_modules/ajv/lib/refs/json-schema-draft-04.json delete mode 100644 Languages/APIs/node_modules/ajv/lib/refs/json-schema-draft-06.json delete mode 100644 Languages/APIs/node_modules/ajv/lib/refs/json-schema-draft-07.json delete mode 100644 Languages/APIs/node_modules/ajv/lib/refs/json-schema-secure.json delete mode 100644 Languages/APIs/node_modules/ajv/package.json delete mode 100644 Languages/APIs/node_modules/ajv/scripts/.eslintrc.yml delete mode 100644 Languages/APIs/node_modules/ajv/scripts/bundle.js delete mode 100644 Languages/APIs/node_modules/ajv/scripts/compile-dots.js delete mode 100755 Languages/APIs/node_modules/ajv/scripts/info delete mode 100755 Languages/APIs/node_modules/ajv/scripts/prepare-tests delete mode 100755 Languages/APIs/node_modules/ajv/scripts/publish-built-version delete mode 100755 Languages/APIs/node_modules/ajv/scripts/travis-gh-pages delete mode 100644 Languages/APIs/node_modules/asn1/LICENSE delete mode 100644 Languages/APIs/node_modules/asn1/README.md delete mode 100644 Languages/APIs/node_modules/asn1/lib/ber/errors.js delete mode 100644 Languages/APIs/node_modules/asn1/lib/ber/index.js delete mode 100644 Languages/APIs/node_modules/asn1/lib/ber/reader.js delete mode 100644 Languages/APIs/node_modules/asn1/lib/ber/types.js delete mode 100644 Languages/APIs/node_modules/asn1/lib/ber/writer.js delete mode 100644 Languages/APIs/node_modules/asn1/lib/index.js delete mode 100644 Languages/APIs/node_modules/asn1/package.json delete mode 100644 Languages/APIs/node_modules/assert-plus/AUTHORS delete mode 100644 Languages/APIs/node_modules/assert-plus/CHANGES.md delete mode 100644 Languages/APIs/node_modules/assert-plus/README.md delete mode 100644 Languages/APIs/node_modules/assert-plus/assert.js delete mode 100644 Languages/APIs/node_modules/assert-plus/package.json delete mode 100644 Languages/APIs/node_modules/asynckit/LICENSE delete mode 100644 Languages/APIs/node_modules/asynckit/README.md delete mode 100644 Languages/APIs/node_modules/asynckit/bench.js delete mode 100644 Languages/APIs/node_modules/asynckit/index.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/abort.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/async.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/defer.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/iterate.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/readable_asynckit.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/readable_parallel.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/readable_serial.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/readable_serial_ordered.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/state.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/streamify.js delete mode 100644 Languages/APIs/node_modules/asynckit/lib/terminator.js delete mode 100644 Languages/APIs/node_modules/asynckit/package.json delete mode 100644 Languages/APIs/node_modules/asynckit/parallel.js delete mode 100644 Languages/APIs/node_modules/asynckit/serial.js delete mode 100644 Languages/APIs/node_modules/asynckit/serialOrdered.js delete mode 100644 Languages/APIs/node_modules/asynckit/stream.js delete mode 100644 Languages/APIs/node_modules/aws-sign2/LICENSE delete mode 100644 Languages/APIs/node_modules/aws-sign2/README.md delete mode 100644 Languages/APIs/node_modules/aws-sign2/index.js delete mode 100644 Languages/APIs/node_modules/aws-sign2/package.json delete mode 100644 Languages/APIs/node_modules/aws4/.travis.yml delete mode 100644 Languages/APIs/node_modules/aws4/LICENSE delete mode 100644 Languages/APIs/node_modules/aws4/README.md delete mode 100644 Languages/APIs/node_modules/aws4/aws4.js delete mode 100644 Languages/APIs/node_modules/aws4/lru.js delete mode 100644 Languages/APIs/node_modules/aws4/package.json delete mode 100644 Languages/APIs/node_modules/bcrypt-pbkdf/CONTRIBUTING.md delete mode 100644 Languages/APIs/node_modules/bcrypt-pbkdf/LICENSE delete mode 100644 Languages/APIs/node_modules/bcrypt-pbkdf/README.md delete mode 100644 Languages/APIs/node_modules/bcrypt-pbkdf/index.js delete mode 100644 Languages/APIs/node_modules/bcrypt-pbkdf/package.json delete mode 100644 Languages/APIs/node_modules/caseless/LICENSE delete mode 100644 Languages/APIs/node_modules/caseless/README.md delete mode 100644 Languages/APIs/node_modules/caseless/index.js delete mode 100644 Languages/APIs/node_modules/caseless/package.json delete mode 100644 Languages/APIs/node_modules/caseless/test.js delete mode 100644 Languages/APIs/node_modules/combined-stream/License delete mode 100644 Languages/APIs/node_modules/combined-stream/Readme.md delete mode 100644 Languages/APIs/node_modules/combined-stream/lib/combined_stream.js delete mode 100644 Languages/APIs/node_modules/combined-stream/package.json delete mode 100644 Languages/APIs/node_modules/combined-stream/yarn.lock delete mode 100644 Languages/APIs/node_modules/core-util-is/LICENSE delete mode 100644 Languages/APIs/node_modules/core-util-is/README.md delete mode 100644 Languages/APIs/node_modules/core-util-is/float.patch delete mode 100644 Languages/APIs/node_modules/core-util-is/lib/util.js delete mode 100644 Languages/APIs/node_modules/core-util-is/package.json delete mode 100644 Languages/APIs/node_modules/core-util-is/test.js delete mode 100644 Languages/APIs/node_modules/dashdash/CHANGES.md delete mode 100644 Languages/APIs/node_modules/dashdash/LICENSE.txt delete mode 100644 Languages/APIs/node_modules/dashdash/README.md delete mode 100644 Languages/APIs/node_modules/dashdash/etc/dashdash.bash_completion.in delete mode 100644 Languages/APIs/node_modules/dashdash/lib/dashdash.js delete mode 100644 Languages/APIs/node_modules/dashdash/package.json delete mode 100644 Languages/APIs/node_modules/delayed-stream/.npmignore delete mode 100644 Languages/APIs/node_modules/delayed-stream/License delete mode 100644 Languages/APIs/node_modules/delayed-stream/Makefile delete mode 100644 Languages/APIs/node_modules/delayed-stream/Readme.md delete mode 100644 Languages/APIs/node_modules/delayed-stream/lib/delayed_stream.js delete mode 100644 Languages/APIs/node_modules/delayed-stream/package.json delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/LICENSE delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/README.md delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/index.js delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/lib/LICENSE-jsbn delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/lib/ec.js delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/lib/sec.js delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/package.json delete mode 100755 Languages/APIs/node_modules/ecc-jsbn/test.js delete mode 100644 Languages/APIs/node_modules/extend/.editorconfig delete mode 100644 Languages/APIs/node_modules/extend/.eslintrc delete mode 100644 Languages/APIs/node_modules/extend/.jscs.json delete mode 100644 Languages/APIs/node_modules/extend/.travis.yml delete mode 100644 Languages/APIs/node_modules/extend/CHANGELOG.md delete mode 100644 Languages/APIs/node_modules/extend/LICENSE delete mode 100644 Languages/APIs/node_modules/extend/README.md delete mode 100644 Languages/APIs/node_modules/extend/component.json delete mode 100644 Languages/APIs/node_modules/extend/index.js delete mode 100644 Languages/APIs/node_modules/extend/package.json delete mode 100644 Languages/APIs/node_modules/extsprintf/.gitmodules delete mode 100644 Languages/APIs/node_modules/extsprintf/.npmignore delete mode 100644 Languages/APIs/node_modules/extsprintf/LICENSE delete mode 100644 Languages/APIs/node_modules/extsprintf/Makefile delete mode 100644 Languages/APIs/node_modules/extsprintf/Makefile.targ delete mode 100644 Languages/APIs/node_modules/extsprintf/README.md delete mode 100644 Languages/APIs/node_modules/extsprintf/jsl.node.conf delete mode 100644 Languages/APIs/node_modules/extsprintf/lib/extsprintf.js delete mode 100644 Languages/APIs/node_modules/extsprintf/package.json delete mode 100644 Languages/APIs/node_modules/fast-deep-equal/LICENSE delete mode 100644 Languages/APIs/node_modules/fast-deep-equal/README.md delete mode 100644 Languages/APIs/node_modules/fast-deep-equal/index.d.ts delete mode 100644 Languages/APIs/node_modules/fast-deep-equal/index.js delete mode 100644 Languages/APIs/node_modules/fast-deep-equal/package.json delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/.eslintrc.yml delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/.npmignore delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/.travis.yml delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/LICENSE delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/README.md delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/benchmark/index.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/benchmark/test.json delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/example/key_cmp.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/example/nested.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/example/str.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/example/value_cmp.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/index.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/package.json delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/test/cmp.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/test/nested.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/test/str.js delete mode 100644 Languages/APIs/node_modules/fast-json-stable-stringify/test/to-json.js delete mode 100644 Languages/APIs/node_modules/forever-agent/LICENSE delete mode 100644 Languages/APIs/node_modules/forever-agent/README.md delete mode 100644 Languages/APIs/node_modules/forever-agent/index.js delete mode 100644 Languages/APIs/node_modules/forever-agent/package.json delete mode 100644 Languages/APIs/node_modules/form-data/License delete mode 100644 Languages/APIs/node_modules/form-data/README.md delete mode 100644 Languages/APIs/node_modules/form-data/README.md.bak delete mode 100644 Languages/APIs/node_modules/form-data/lib/browser.js delete mode 100644 Languages/APIs/node_modules/form-data/lib/form_data.js delete mode 100644 Languages/APIs/node_modules/form-data/lib/populate.js delete mode 100644 Languages/APIs/node_modules/form-data/package.json delete mode 100644 Languages/APIs/node_modules/form-data/yarn.lock delete mode 100644 Languages/APIs/node_modules/getpass/.npmignore delete mode 100644 Languages/APIs/node_modules/getpass/.travis.yml delete mode 100644 Languages/APIs/node_modules/getpass/LICENSE delete mode 100644 Languages/APIs/node_modules/getpass/README.md delete mode 100644 Languages/APIs/node_modules/getpass/lib/index.js delete mode 100644 Languages/APIs/node_modules/getpass/package.json delete mode 100644 Languages/APIs/node_modules/har-schema/LICENSE delete mode 100644 Languages/APIs/node_modules/har-schema/README.md delete mode 100644 Languages/APIs/node_modules/har-schema/lib/afterRequest.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/beforeRequest.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/browser.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/cache.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/content.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/cookie.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/creator.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/entry.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/har.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/header.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/index.js delete mode 100644 Languages/APIs/node_modules/har-schema/lib/log.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/page.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/pageTimings.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/postData.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/query.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/request.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/response.json delete mode 100644 Languages/APIs/node_modules/har-schema/lib/timings.json delete mode 100644 Languages/APIs/node_modules/har-schema/package.json delete mode 100644 Languages/APIs/node_modules/har-validator/LICENSE delete mode 100644 Languages/APIs/node_modules/har-validator/README.md delete mode 100644 Languages/APIs/node_modules/har-validator/lib/async.js delete mode 100644 Languages/APIs/node_modules/har-validator/lib/error.js delete mode 100644 Languages/APIs/node_modules/har-validator/lib/promise.js delete mode 100644 Languages/APIs/node_modules/har-validator/package.json delete mode 100644 Languages/APIs/node_modules/http-signature/.dir-locals.el delete mode 100644 Languages/APIs/node_modules/http-signature/.npmignore delete mode 100644 Languages/APIs/node_modules/http-signature/CHANGES.md delete mode 100644 Languages/APIs/node_modules/http-signature/LICENSE delete mode 100644 Languages/APIs/node_modules/http-signature/README.md delete mode 100644 Languages/APIs/node_modules/http-signature/http_signing.md delete mode 100644 Languages/APIs/node_modules/http-signature/lib/index.js delete mode 100644 Languages/APIs/node_modules/http-signature/lib/parser.js delete mode 100644 Languages/APIs/node_modules/http-signature/lib/signer.js delete mode 100644 Languages/APIs/node_modules/http-signature/lib/utils.js delete mode 100644 Languages/APIs/node_modules/http-signature/lib/verify.js delete mode 100644 Languages/APIs/node_modules/http-signature/package.json delete mode 100644 Languages/APIs/node_modules/is-typedarray/LICENSE.md delete mode 100644 Languages/APIs/node_modules/is-typedarray/README.md delete mode 100644 Languages/APIs/node_modules/is-typedarray/index.js delete mode 100644 Languages/APIs/node_modules/is-typedarray/package.json delete mode 100644 Languages/APIs/node_modules/is-typedarray/test.js delete mode 100644 Languages/APIs/node_modules/isstream/.jshintrc delete mode 100644 Languages/APIs/node_modules/isstream/.npmignore delete mode 100644 Languages/APIs/node_modules/isstream/.travis.yml delete mode 100644 Languages/APIs/node_modules/isstream/LICENSE.md delete mode 100644 Languages/APIs/node_modules/isstream/README.md delete mode 100644 Languages/APIs/node_modules/isstream/isstream.js delete mode 100644 Languages/APIs/node_modules/isstream/package.json delete mode 100644 Languages/APIs/node_modules/isstream/test.js delete mode 100644 Languages/APIs/node_modules/jsbn/.npmignore delete mode 100644 Languages/APIs/node_modules/jsbn/LICENSE delete mode 100644 Languages/APIs/node_modules/jsbn/README.md delete mode 100644 Languages/APIs/node_modules/jsbn/example.html delete mode 100644 Languages/APIs/node_modules/jsbn/example.js delete mode 100644 Languages/APIs/node_modules/jsbn/index.js delete mode 100644 Languages/APIs/node_modules/jsbn/package.json delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/.eslintrc.yml delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/.travis.yml delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/LICENSE delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/README.md delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/index.js delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/package.json delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/spec/.eslintrc.yml delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/spec/fixtures/schema.js delete mode 100644 Languages/APIs/node_modules/json-schema-traverse/spec/index.spec.js delete mode 100644 Languages/APIs/node_modules/json-schema/README.md delete mode 100644 Languages/APIs/node_modules/json-schema/draft-00/hyper-schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-00/json-ref delete mode 100644 Languages/APIs/node_modules/json-schema/draft-00/links delete mode 100644 Languages/APIs/node_modules/json-schema/draft-00/schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-01/hyper-schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-01/json-ref delete mode 100644 Languages/APIs/node_modules/json-schema/draft-01/links delete mode 100644 Languages/APIs/node_modules/json-schema/draft-01/schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-02/hyper-schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-02/json-ref delete mode 100644 Languages/APIs/node_modules/json-schema/draft-02/links delete mode 100644 Languages/APIs/node_modules/json-schema/draft-02/schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/examples/address delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/examples/calendar delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/examples/card delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/examples/geo delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/examples/interfaces delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/hyper-schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/json-ref delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/links delete mode 100644 Languages/APIs/node_modules/json-schema/draft-03/schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-04/hyper-schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-04/links delete mode 100644 Languages/APIs/node_modules/json-schema/draft-04/schema delete mode 100644 Languages/APIs/node_modules/json-schema/draft-zyp-json-schema-03.xml delete mode 100644 Languages/APIs/node_modules/json-schema/draft-zyp-json-schema-04.xml delete mode 100644 Languages/APIs/node_modules/json-schema/lib/links.js delete mode 100644 Languages/APIs/node_modules/json-schema/lib/validate.js delete mode 100644 Languages/APIs/node_modules/json-schema/package.json delete mode 100644 Languages/APIs/node_modules/json-schema/test/tests.js delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/.npmignore delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/CHANGELOG.md delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/LICENSE delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/Makefile delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/README.md delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/package.json delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/stringify.js delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/test/mocha.opts delete mode 100644 Languages/APIs/node_modules/json-stringify-safe/test/stringify_test.js delete mode 100644 Languages/APIs/node_modules/jsprim/CHANGES.md delete mode 100644 Languages/APIs/node_modules/jsprim/CONTRIBUTING.md delete mode 100644 Languages/APIs/node_modules/jsprim/LICENSE delete mode 100644 Languages/APIs/node_modules/jsprim/README.md delete mode 100644 Languages/APIs/node_modules/jsprim/lib/jsprim.js delete mode 100644 Languages/APIs/node_modules/jsprim/package.json delete mode 100644 Languages/APIs/node_modules/mime-db/HISTORY.md delete mode 100644 Languages/APIs/node_modules/mime-db/LICENSE delete mode 100644 Languages/APIs/node_modules/mime-db/README.md delete mode 100644 Languages/APIs/node_modules/mime-db/db.json delete mode 100644 Languages/APIs/node_modules/mime-db/index.js delete mode 100644 Languages/APIs/node_modules/mime-db/package.json delete mode 100644 Languages/APIs/node_modules/mime-types/HISTORY.md delete mode 100644 Languages/APIs/node_modules/mime-types/LICENSE delete mode 100644 Languages/APIs/node_modules/mime-types/README.md delete mode 100644 Languages/APIs/node_modules/mime-types/index.js delete mode 100644 Languages/APIs/node_modules/mime-types/package.json delete mode 100644 Languages/APIs/node_modules/oauth-sign/LICENSE delete mode 100644 Languages/APIs/node_modules/oauth-sign/README.md delete mode 100644 Languages/APIs/node_modules/oauth-sign/index.js delete mode 100644 Languages/APIs/node_modules/oauth-sign/package.json delete mode 100644 Languages/APIs/node_modules/performance-now/.npmignore delete mode 100644 Languages/APIs/node_modules/performance-now/.tm_properties delete mode 100644 Languages/APIs/node_modules/performance-now/.travis.yml delete mode 100644 Languages/APIs/node_modules/performance-now/README.md delete mode 100644 Languages/APIs/node_modules/performance-now/lib/performance-now.js delete mode 100644 Languages/APIs/node_modules/performance-now/lib/performance-now.js.map delete mode 100644 Languages/APIs/node_modules/performance-now/license.txt delete mode 100644 Languages/APIs/node_modules/performance-now/package.json delete mode 100644 Languages/APIs/node_modules/performance-now/src/index.d.ts delete mode 100644 Languages/APIs/node_modules/performance-now/src/performance-now.coffee delete mode 100644 Languages/APIs/node_modules/performance-now/test/mocha.opts delete mode 100644 Languages/APIs/node_modules/performance-now/test/performance-now.coffee delete mode 100644 Languages/APIs/node_modules/performance-now/test/scripts.coffee delete mode 100755 Languages/APIs/node_modules/performance-now/test/scripts/delayed-call.coffee delete mode 100755 Languages/APIs/node_modules/performance-now/test/scripts/delayed-require.coffee delete mode 100755 Languages/APIs/node_modules/performance-now/test/scripts/difference.coffee delete mode 100755 Languages/APIs/node_modules/performance-now/test/scripts/initial-value.coffee delete mode 100644 Languages/APIs/node_modules/psl/LICENSE delete mode 100644 Languages/APIs/node_modules/psl/README.md delete mode 100644 Languages/APIs/node_modules/psl/browserstack-logo.svg delete mode 100644 Languages/APIs/node_modules/psl/data/rules.json delete mode 100644 Languages/APIs/node_modules/psl/dist/psl.js delete mode 100644 Languages/APIs/node_modules/psl/dist/psl.min.js delete mode 100644 Languages/APIs/node_modules/psl/index.js delete mode 100644 Languages/APIs/node_modules/psl/package.json delete mode 100644 Languages/APIs/node_modules/punycode/LICENSE-MIT.txt delete mode 100644 Languages/APIs/node_modules/punycode/README.md delete mode 100644 Languages/APIs/node_modules/punycode/package.json delete mode 100644 Languages/APIs/node_modules/punycode/punycode.es6.js delete mode 100644 Languages/APIs/node_modules/punycode/punycode.js delete mode 100644 Languages/APIs/node_modules/qs/.editorconfig delete mode 100644 Languages/APIs/node_modules/qs/.eslintignore delete mode 100644 Languages/APIs/node_modules/qs/.eslintrc delete mode 100644 Languages/APIs/node_modules/qs/CHANGELOG.md delete mode 100644 Languages/APIs/node_modules/qs/LICENSE delete mode 100644 Languages/APIs/node_modules/qs/README.md delete mode 100644 Languages/APIs/node_modules/qs/dist/qs.js delete mode 100644 Languages/APIs/node_modules/qs/lib/formats.js delete mode 100644 Languages/APIs/node_modules/qs/lib/index.js delete mode 100644 Languages/APIs/node_modules/qs/lib/parse.js delete mode 100644 Languages/APIs/node_modules/qs/lib/stringify.js delete mode 100644 Languages/APIs/node_modules/qs/lib/utils.js delete mode 100644 Languages/APIs/node_modules/qs/package.json delete mode 100644 Languages/APIs/node_modules/qs/test/.eslintrc delete mode 100644 Languages/APIs/node_modules/qs/test/index.js delete mode 100644 Languages/APIs/node_modules/qs/test/parse.js delete mode 100644 Languages/APIs/node_modules/qs/test/stringify.js delete mode 100644 Languages/APIs/node_modules/qs/test/utils.js delete mode 100644 Languages/APIs/node_modules/request/CHANGELOG.md delete mode 100644 Languages/APIs/node_modules/request/LICENSE delete mode 100644 Languages/APIs/node_modules/request/README.md delete mode 100755 Languages/APIs/node_modules/request/index.js delete mode 100644 Languages/APIs/node_modules/request/lib/auth.js delete mode 100644 Languages/APIs/node_modules/request/lib/cookies.js delete mode 100644 Languages/APIs/node_modules/request/lib/getProxyFromURI.js delete mode 100644 Languages/APIs/node_modules/request/lib/har.js delete mode 100644 Languages/APIs/node_modules/request/lib/hawk.js delete mode 100644 Languages/APIs/node_modules/request/lib/helpers.js delete mode 100644 Languages/APIs/node_modules/request/lib/multipart.js delete mode 100644 Languages/APIs/node_modules/request/lib/oauth.js delete mode 100644 Languages/APIs/node_modules/request/lib/querystring.js delete mode 100644 Languages/APIs/node_modules/request/lib/redirect.js delete mode 100644 Languages/APIs/node_modules/request/lib/tunnel.js delete mode 100644 Languages/APIs/node_modules/request/package.json delete mode 100644 Languages/APIs/node_modules/request/request.js delete mode 100644 Languages/APIs/node_modules/safe-buffer/LICENSE delete mode 100644 Languages/APIs/node_modules/safe-buffer/README.md delete mode 100644 Languages/APIs/node_modules/safe-buffer/index.d.ts delete mode 100644 Languages/APIs/node_modules/safe-buffer/index.js delete mode 100644 Languages/APIs/node_modules/safe-buffer/package.json delete mode 100644 Languages/APIs/node_modules/safer-buffer/LICENSE delete mode 100644 Languages/APIs/node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 Languages/APIs/node_modules/safer-buffer/Readme.md delete mode 100644 Languages/APIs/node_modules/safer-buffer/dangerous.js delete mode 100644 Languages/APIs/node_modules/safer-buffer/package.json delete mode 100644 Languages/APIs/node_modules/safer-buffer/safer.js delete mode 100644 Languages/APIs/node_modules/safer-buffer/tests.js delete mode 100644 Languages/APIs/node_modules/sshpk/.npmignore delete mode 100644 Languages/APIs/node_modules/sshpk/.travis.yml delete mode 100644 Languages/APIs/node_modules/sshpk/LICENSE delete mode 100644 Languages/APIs/node_modules/sshpk/README.md delete mode 100755 Languages/APIs/node_modules/sshpk/bin/sshpk-conv delete mode 100755 Languages/APIs/node_modules/sshpk/bin/sshpk-sign delete mode 100755 Languages/APIs/node_modules/sshpk/bin/sshpk-verify delete mode 100644 Languages/APIs/node_modules/sshpk/lib/algs.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/certificate.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/dhe.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/ed-compat.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/errors.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/fingerprint.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/auto.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/dnssec.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/openssh-cert.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/pem.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/pkcs1.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/pkcs8.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/putty.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/rfc4253.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/ssh-private.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/ssh.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/x509-pem.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/formats/x509.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/identity.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/index.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/key.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/private-key.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/signature.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/ssh-buffer.js delete mode 100644 Languages/APIs/node_modules/sshpk/lib/utils.js delete mode 100644 Languages/APIs/node_modules/sshpk/man/man1/sshpk-conv.1 delete mode 100644 Languages/APIs/node_modules/sshpk/man/man1/sshpk-sign.1 delete mode 100644 Languages/APIs/node_modules/sshpk/man/man1/sshpk-verify.1 delete mode 100644 Languages/APIs/node_modules/sshpk/package.json delete mode 100644 Languages/APIs/node_modules/tough-cookie/LICENSE delete mode 100644 Languages/APIs/node_modules/tough-cookie/README.md delete mode 100644 Languages/APIs/node_modules/tough-cookie/lib/cookie.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/lib/memstore.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/lib/store.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt delete mode 100644 Languages/APIs/node_modules/tough-cookie/node_modules/punycode/README.md delete mode 100644 Languages/APIs/node_modules/tough-cookie/node_modules/punycode/package.json delete mode 100644 Languages/APIs/node_modules/tough-cookie/node_modules/punycode/punycode.js delete mode 100644 Languages/APIs/node_modules/tough-cookie/package.json delete mode 100644 Languages/APIs/node_modules/tunnel-agent/LICENSE delete mode 100644 Languages/APIs/node_modules/tunnel-agent/README.md delete mode 100644 Languages/APIs/node_modules/tunnel-agent/index.js delete mode 100644 Languages/APIs/node_modules/tunnel-agent/package.json delete mode 100644 Languages/APIs/node_modules/tweetnacl/.npmignore delete mode 100644 Languages/APIs/node_modules/tweetnacl/AUTHORS.md delete mode 100644 Languages/APIs/node_modules/tweetnacl/CHANGELOG.md delete mode 100644 Languages/APIs/node_modules/tweetnacl/LICENSE delete mode 100644 Languages/APIs/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md delete mode 100644 Languages/APIs/node_modules/tweetnacl/README.md delete mode 100644 Languages/APIs/node_modules/tweetnacl/nacl-fast.js delete mode 100644 Languages/APIs/node_modules/tweetnacl/nacl-fast.min.js delete mode 100644 Languages/APIs/node_modules/tweetnacl/nacl.d.ts delete mode 100644 Languages/APIs/node_modules/tweetnacl/nacl.js delete mode 100644 Languages/APIs/node_modules/tweetnacl/nacl.min.js delete mode 100644 Languages/APIs/node_modules/tweetnacl/package.json delete mode 100644 Languages/APIs/node_modules/uri-js/README.md delete mode 100644 Languages/APIs/node_modules/uri-js/bower.json delete mode 100644 Languages/APIs/node_modules/uri-js/dist/es5/uri.all.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/es5/uri.all.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/es5/uri.all.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/es5/uri.all.min.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/es5/uri.all.min.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/es5/uri.all.min.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/index.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/index.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/index.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/regexps-iri.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/regexps-iri.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/regexps-iri.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/regexps-uri.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/regexps-uri.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/regexps-uri.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/http.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/http.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/http.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/https.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/https.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/https.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/mailto.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/mailto.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/urn.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/urn.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/schemes/urn.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/uri.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/uri.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/uri.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/util.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/util.js delete mode 100644 Languages/APIs/node_modules/uri-js/dist/esnext/util.js.map delete mode 100644 Languages/APIs/node_modules/uri-js/package.json delete mode 100644 Languages/APIs/node_modules/uri-js/rollup.config.js delete mode 100644 Languages/APIs/node_modules/uri-js/src/index.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/punycode.d.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/regexps-iri.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/regexps-uri.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/schemes/http.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/schemes/https.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/schemes/mailto.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/schemes/urn-uuid.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/schemes/urn.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/uri.ts delete mode 100644 Languages/APIs/node_modules/uri-js/src/util.ts delete mode 100644 Languages/APIs/node_modules/uri-js/tests/qunit.css delete mode 100644 Languages/APIs/node_modules/uri-js/tests/qunit.js delete mode 100644 Languages/APIs/node_modules/uri-js/tests/test-es5-min.html delete mode 100644 Languages/APIs/node_modules/uri-js/tests/test-es5.html delete mode 100644 Languages/APIs/node_modules/uri-js/tests/tests.js delete mode 100644 Languages/APIs/node_modules/uri-js/tsconfig.json delete mode 100644 Languages/APIs/node_modules/uri-js/yarn.lock delete mode 100644 Languages/APIs/node_modules/uuid/AUTHORS delete mode 100644 Languages/APIs/node_modules/uuid/CHANGELOG.md delete mode 100644 Languages/APIs/node_modules/uuid/LICENSE.md delete mode 100644 Languages/APIs/node_modules/uuid/README.md delete mode 100755 Languages/APIs/node_modules/uuid/bin/uuid delete mode 100644 Languages/APIs/node_modules/uuid/index.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/bytesToUuid.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/md5-browser.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/md5.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/rng-browser.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/rng.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/sha1-browser.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/sha1.js delete mode 100644 Languages/APIs/node_modules/uuid/lib/v35.js delete mode 100644 Languages/APIs/node_modules/uuid/package.json delete mode 100644 Languages/APIs/node_modules/uuid/v1.js delete mode 100644 Languages/APIs/node_modules/uuid/v3.js delete mode 100644 Languages/APIs/node_modules/uuid/v4.js delete mode 100644 Languages/APIs/node_modules/uuid/v5.js delete mode 100644 Languages/APIs/node_modules/verror/.npmignore delete mode 100644 Languages/APIs/node_modules/verror/CHANGES.md delete mode 100644 Languages/APIs/node_modules/verror/CONTRIBUTING.md delete mode 100644 Languages/APIs/node_modules/verror/LICENSE delete mode 100644 Languages/APIs/node_modules/verror/README.md delete mode 100644 Languages/APIs/node_modules/verror/lib/verror.js delete mode 100644 Languages/APIs/node_modules/verror/package.json delete mode 100644 Languages/APIs/package-lock.json delete mode 100644 Languages/APIs/package.json delete mode 100755 Languages/Bash/HelloWorld delete mode 100644 Languages/Batch/helloworld.bat delete mode 100644 Languages/Brainfuck/helloWorld.b delete mode 100644 Languages/C#/.vs/HelloWorld/DesignTimeBuild/.dtbcache delete mode 100644 Languages/C#/.vs/HelloWorld/v16/.suo delete mode 100644 Languages/C#/.vs/HelloWorld/v16/Server/sqlite3/db.lock delete mode 100644 Languages/C#/.vs/HelloWorld/v16/Server/sqlite3/storage.ide delete mode 100644 Languages/C#/.vs/HelloWorld/v16/Server/sqlite3/storage.ide-shm delete mode 100644 Languages/C#/.vs/HelloWorld/v16/Server/sqlite3/storage.ide-wal delete mode 100644 Languages/C#/BubbleSort.cs delete mode 100644 Languages/C#/HelloWorld.sln delete mode 100644 Languages/C#/HelloWorld/HelloWorld.csproj delete mode 100644 Languages/C#/HelloWorld/Program.cs delete mode 100644 Languages/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.deps.json delete mode 100644 Languages/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.dll delete mode 100644 Languages/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.pdb delete mode 100644 Languages/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.runtimeconfig.dev.json delete mode 100644 Languages/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.runtimeconfig.json delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.AssemblyInfo.cs delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.AssemblyInfoInputs.cache delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.assets.cache delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.csproj.CoreCompileInputs.cache delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.csproj.FileListAbsolute.txt delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.csprojAssemblyReference.cache delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.dll delete mode 100644 Languages/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.pdb delete mode 100644 Languages/C#/HelloWorld/obj/HelloWorld.csproj.nuget.cache delete mode 100644 Languages/C#/HelloWorld/obj/HelloWorld.csproj.nuget.dgspec.json delete mode 100644 Languages/C#/HelloWorld/obj/HelloWorld.csproj.nuget.g.props delete mode 100644 Languages/C#/HelloWorld/obj/HelloWorld.csproj.nuget.g.targets delete mode 100644 Languages/C#/HelloWorld/obj/project.assets.json delete mode 100644 Languages/C#/bucketsort.cs delete mode 100644 Languages/C#/mergesort.cs delete mode 100644 Languages/C#/palindrome.cs delete mode 100644 Languages/C#/quicksort.cs delete mode 100644 Languages/C#/tree_traversal.cs delete mode 100644 Languages/C++/01knapsack.cpp delete mode 100644 Languages/C++/ADAMAT.cpp delete mode 100644 Languages/C++/AGGRCOW.cpp delete mode 100644 Languages/C++/Anagram_Bit_Manipulation.cpp delete mode 100644 Languages/C++/BFS.cpp delete mode 100644 Languages/C++/BS.cpp delete mode 100644 Languages/C++/BST.cpp delete mode 100644 Languages/C++/Bit_strings.cpp delete mode 100644 Languages/C++/Burst Balloon DP.cpp delete mode 100644 Languages/C++/CHFNSWAP.cpp delete mode 100644 Languages/C++/COVID19B.cpp delete mode 100644 Languages/C++/CRDGAME2.py delete mode 100644 Languages/C++/Caeser_Cipher.cpp delete mode 100644 Languages/C++/ChefWars.cpp delete mode 100644 Languages/C++/CircularHeaderLL.cpp delete mode 100644 Languages/C++/Conjetura Goldbach (modulo).cpp delete mode 100644 Languages/C++/CubeFormula.cpp delete mode 100644 Languages/C++/DFS.cpp delete mode 100644 Languages/C++/DiamondPattern delete mode 100644 Languages/C++/Dijkstra.cpp delete mode 100644 Languages/C++/EQDIV.cpp delete mode 100644 Languages/C++/Edit_distance_Leetcode_hard_level.cpp delete mode 100644 Languages/C++/Euler_phi delete mode 100644 Languages/C++/ExtendedEucleidian.cpp delete mode 100644 Languages/C++/FINXOR.cpp delete mode 100644 Languages/C++/Finding_Unique_Number_in_Array delete mode 100644 Languages/C++/HeapSort.cpp delete mode 100644 Languages/C++/Hello World ! delete mode 100644 Languages/C++/Hello.cpp delete mode 100644 Languages/C++/HelloWorld.cpp delete mode 100644 Languages/C++/Hello_India.cpp delete mode 100644 Languages/C++/Huffman Code.cpp delete mode 100644 Languages/C++/Implement Queue using Stacks.cpp delete mode 100644 Languages/C++/Implement Stack using Queues.cpp delete mode 100644 Languages/C++/Insertion_in_binary_trees delete mode 100644 Languages/C++/IntersectionOfarrays.cpp delete mode 100644 Languages/C++/Josephus Problem.cpp delete mode 100644 Languages/C++/Kedane'sAlgo.cpp delete mode 100644 Languages/C++/LCS.cpp delete mode 100644 Languages/C++/Largest_Sum_Contiguous_Subarray.cpp delete mode 100644 Languages/C++/Linear Search.cpp delete mode 100644 Languages/C++/Longest-Common-Subsequence delete mode 100644 Languages/C++/LongestCommonSubseq.cpp delete mode 100644 Languages/C++/Longest_increasing_subsequence_O(nlogn).cpp delete mode 100644 Languages/C++/Matriz caracol.cpp delete mode 100644 Languages/C++/Max. substring in string.cpp delete mode 100644 Languages/C++/MinPriorityQueueImplementation.cpp delete mode 100644 Languages/C++/Min_Heap.cpp delete mode 100644 Languages/C++/Multiples_of_3_and_5.cpp delete mode 100644 Languages/C++/Nqueens.cpp delete mode 100644 Languages/C++/Number_of_divisors.cpp delete mode 100644 Languages/C++/OptimalBST.cpp delete mode 100644 Languages/C++/PallindromeRecursive.cpp delete mode 100644 Languages/C++/PrimeNumber.cpp delete mode 100644 Languages/C++/PrimsAlgo.cpp delete mode 100644 Languages/C++/ProcessScheduling.cpp delete mode 100644 Languages/C++/QA.cpp delete mode 100644 Languages/C++/QB.cpp delete mode 100644 Languages/C++/QC.cpp delete mode 100644 Languages/C++/QuickSort.cpp delete mode 100644 Languages/C++/RGB to Greyscale.cpp delete mode 100644 Languages/C++/Radix_sort.cpp delete mode 100644 Languages/C++/RangeMinimum.cpp delete mode 100644 Languages/C++/Reach_the_final_destination(StairCase Question) delete mode 100644 Languages/C++/ReverseLinkedList.cpp delete mode 100644 Languages/C++/Sieve of Eratosthenes delete mode 100644 Languages/C++/Single_number.cpp delete mode 100644 Languages/C++/Sort Array By Parity.cpp delete mode 100644 Languages/C++/StackReverse(By Recursion).cpp delete mode 100644 Languages/C++/Standard_Deviation_Calc.cpp delete mode 100644 Languages/C++/StringStream_Hackerrank.cpp delete mode 100644 Languages/C++/Subarray_with_givenSum.cpp delete mode 100644 Languages/C++/TREE2.cpp delete mode 100644 Languages/C++/Testing_array delete mode 100644 Languages/C++/To lower case.cpp delete mode 100644 Languages/C++/TopologicalSortUsingDFS.cpp delete mode 100644 Languages/C++/Tower-Of-Hanoi.cpp delete mode 100644 Languages/C++/TowerOfHanoi.cpp delete mode 100644 Languages/C++/Tower_of_hanoi_problem.cpp delete mode 100644 Languages/C++/Unique Number of Occurrences.cpp delete mode 100644 Languages/C++/Vector-Sort_Hackerrank.cpp delete mode 100644 Languages/C++/VerticalOrderTreePrint.cpp delete mode 100644 Languages/C++/WavePrint.cpp delete mode 100644 Languages/C++/all_subsets.cpp delete mode 100644 Languages/C++/arrayintersection.cpp delete mode 100644 Languages/C++/authenticationSystem.cpp delete mode 100644 Languages/C++/bellman-ford.cpp delete mode 100644 Languages/C++/binarySearch.cpp delete mode 100644 Languages/C++/binarysearchrecursive.cpp delete mode 100644 Languages/C++/bottomview.cpp delete mode 100644 Languages/C++/bracketts.cpp delete mode 100644 Languages/C++/bubble_sort.cpp delete mode 100644 Languages/C++/bubblesort.cpp delete mode 100644 Languages/C++/cab booking system.cpp delete mode 100644 Languages/C++/calc_score delete mode 100644 Languages/C++/circularll.cpp delete mode 100644 Languages/C++/count_inversions.cpp delete mode 100644 Languages/C++/depthfirstsearch.cpp delete mode 100644 Languages/C++/detect loop.cpp delete mode 100644 Languages/C++/dijkstra.cpp delete mode 100644 Languages/C++/dot_operator.cpp delete mode 100644 Languages/C++/duplicate_remove.cpp delete mode 100644 Languages/C++/factors_of_numbers.cpp delete mode 100644 Languages/C++/fastExponentiation.cpp delete mode 100644 Languages/C++/fib.cpp delete mode 100644 Languages/C++/find_rep.cpp delete mode 100644 Languages/C++/find_unique.cpp delete mode 100644 Languages/C++/fractionalKnapsack.cpp delete mode 100644 Languages/C++/greedy_median.cpp delete mode 100644 Languages/C++/half-star pattern.cpp delete mode 100644 Languages/C++/hanoi.cpp delete mode 100644 Languages/C++/helloworld.cpp delete mode 100644 Languages/C++/imageAddition.c delete mode 100644 Languages/C++/india.cpp delete mode 100644 Languages/C++/insertion_sort.cpp delete mode 100644 Languages/C++/insertonsort.cpp delete mode 100644 Languages/C++/iterative_bfs.cpp delete mode 100644 Languages/C++/iterative_dfs.cpp delete mode 100644 Languages/C++/job_selection.cpp delete mode 100644 Languages/C++/leftviewtree.cpp delete mode 100644 Languages/C++/librarymanagementsystem.cpp delete mode 100644 Languages/C++/linkedList.cpp delete mode 100644 Languages/C++/longest_palindromic_subsequence.cpp delete mode 100644 Languages/C++/longest_subsequence.cpp delete mode 100644 Languages/C++/matchstring.cpp delete mode 100644 Languages/C++/matrixChainMultiplication.cpp delete mode 100644 Languages/C++/median.cpp delete mode 100644 Languages/C++/mergeTwoSortedLL.cpp delete mode 100644 Languages/C++/modulo_exp.cpp delete mode 100644 Languages/C++/moneychange.cpp delete mode 100644 Languages/C++/monty_hall_paradox.cpp delete mode 100644 Languages/C++/numgen.cpp delete mode 100644 Languages/C++/palindrome.cpp delete mode 100644 Languages/C++/palindrome_number.cpp delete mode 100644 Languages/C++/pattern_prctice(CB).cpp delete mode 100644 Languages/C++/randomgenerator.cpp delete mode 100644 Languages/C++/rat_in_a_maze_problem.cpp delete mode 100644 Languages/C++/rotate_90.cpp delete mode 100644 Languages/C++/seiveOfEratosthenes delete mode 100644 Languages/C++/selectionSort.cpp delete mode 100644 Languages/C++/selection_sort.cpp delete mode 100644 Languages/C++/selectionsort.cpp delete mode 100644 Languages/C++/sexy_prime.cpp delete mode 100644 Languages/C++/sievetheorem.cpp delete mode 100644 Languages/C++/sort01.cpp delete mode 100644 Languages/C++/sort_an_array.cpp delete mode 100644 Languages/C++/stack.cpp delete mode 100644 Languages/C++/sudoku_solver.cpp delete mode 100644 Languages/C++/swp.cpp delete mode 100644 Languages/C++/task_scheduling.cpp delete mode 100644 Languages/C++/template.cpp delete mode 100644 Languages/C++/tictactoe game in Cpp delete mode 100644 Languages/C++/tribonacci.cpp delete mode 100644 Languages/C++/vertical_flip_video.cpp delete mode 100644 Languages/C++/verticalorderBTprint.cpp delete mode 100644 Languages/C++/videoAddition.c delete mode 100644 Languages/C++/wine_problem.cpp delete mode 100644 Languages/C++/wordbreak.cpp delete mode 100644 Languages/C++/zoom_bilinear.cpp delete mode 100644 Languages/C++/zoomin.cpp delete mode 100644 Languages/C/Array_Rotation.c delete mode 100644 Languages/C/BinarySearchTree.c delete mode 100644 Languages/C/Bubble_Sort.c delete mode 100644 Languages/C/Circular_Linked_List.c delete mode 100644 Languages/C/DeletionArray.c delete mode 100644 Languages/C/Fibonacci Series Recursion.c delete mode 100644 Languages/C/Fibonacci Series.c delete mode 100644 Languages/C/Fibonacci Triangle.c delete mode 100644 Languages/C/InsertionArray.c delete mode 100644 Languages/C/InsertionSort.c delete mode 100644 Languages/C/Laddu.c delete mode 100644 Languages/C/Matrix Mutiplication.c delete mode 100644 Languages/C/Move.c delete mode 100644 Languages/C/Number Triangle.c delete mode 100644 Languages/C/PriorityQueue.c delete mode 100644 Languages/C/Queueprograms.c delete mode 100644 Languages/C/RepeatedDigit.c delete mode 100644 Languages/C/RevLinkedList delete mode 100644 Languages/C/Selection Sort.c delete mode 100644 Languages/C/Swap two numbers without using third variable .c delete mode 100644 Languages/C/avl_tree.c delete mode 100644 Languages/C/binary-search.c delete mode 100644 Languages/C/blockchain.c delete mode 100644 Languages/C/combsort.c delete mode 100644 Languages/C/cpu.c delete mode 100644 Languages/C/credit.c delete mode 100644 Languages/C/dequeue.c delete mode 100644 Languages/C/doublelinkedlist.c delete mode 100644 Languages/C/fibonacciNumber.c delete mode 100644 Languages/C/heapsort.cpp delete mode 100644 Languages/C/hello_world.c delete mode 100644 Languages/C/int_to_binary_string.c delete mode 100644 Languages/C/lab5-1.c delete mode 100644 Languages/C/largestno.c delete mode 100644 Languages/C/lcm.c delete mode 100644 Languages/C/linkedlist.c delete mode 100644 Languages/C/mario.c delete mode 100644 Languages/C/number in characters.c delete mode 100644 Languages/C/oddeven.c delete mode 100644 Languages/C/powerset.c delete mode 100644 Languages/C/program without main function.c delete mode 100644 Languages/C/pyramid.c delete mode 100644 Languages/C/selection-sort.c delete mode 100644 Languages/C/selection_sort.c delete mode 100644 Languages/C/snakegame.c delete mode 100644 Languages/C/stack.c delete mode 100644 Languages/C/swapping of two numbers.c delete mode 100644 Languages/Dart/HelloWorld.dart delete mode 100644 Languages/Dart/algorithm/bubblesort.dart delete mode 100644 Languages/Dart/algorithm/merge-sort.dart delete mode 100644 Languages/Dart/videodesc.dart delete mode 100644 Languages/Elixir/concurrent.exs delete mode 100644 Languages/Elixir/fibonacci.exs delete mode 100644 Languages/Elixir/hello_world.exs delete mode 100644 Languages/GoLang/algorithms/binarySearch.go delete mode 100644 Languages/GoLang/algorithms/bubble_sort.go delete mode 100644 Languages/GoLang/algorithms/factorial.go delete mode 100644 Languages/GoLang/algorithms/insertion_sort.go delete mode 100644 Languages/GoLang/algorithms/quick_sort.go delete mode 100644 Languages/GoLang/algorithms/selection_sort.go delete mode 100644 Languages/GoLang/bubble_sort.go delete mode 100644 Languages/GoLang/helloWorld.go delete mode 100644 Languages/GoLang/prime_nos.go delete mode 100644 Languages/GoLang/selection_sort.go delete mode 100644 Languages/HTML/CircleRipple.html delete mode 100644 Languages/HTML/CircularRipple.html delete mode 100644 Languages/HTML/Clock.html delete mode 100644 Languages/HTML/DigitalClock.html delete mode 100644 Languages/HTML/Editor-HTML.html delete mode 100644 Languages/HTML/Flex_Panel_Gallery.html delete mode 100644 Languages/HTML/Forif.html delete mode 100644 Languages/HTML/HTML-Editor.html delete mode 100644 Languages/HTML/Hacktober.html delete mode 100644 Languages/HTML/SimpleForm.html delete mode 100644 Languages/HTML/blockRace.html delete mode 100644 Languages/HTML/hello.html delete mode 100644 Languages/HTML/helloWord.html delete mode 100644 Languages/HTML/onChance.html delete mode 100644 Languages/Haskell/HelloWorld.hs delete mode 100644 Languages/Haskell/system environment.hs delete mode 100644 Languages/Haskell/system info.hs delete mode 100644 Languages/Insertion_sort.cpp delete mode 100644 Languages/Java/.DS_Store delete mode 100644 Languages/Java/27032424.java delete mode 100644 Languages/Java/AgeException.java delete mode 100644 Languages/Java/ArrayInverse.java delete mode 100644 Languages/Java/BST/.DS_Store delete mode 100644 Languages/Java/BST/BinarySearchTree.java delete mode 100644 Languages/Java/BST/Main.java delete mode 100644 Languages/Java/BST/PrintKDistance.java delete mode 100644 Languages/Java/Binary2deci.java delete mode 100644 Languages/Java/BinaryIndexedTree.java delete mode 100644 Languages/Java/BubbleSort.java delete mode 100644 Languages/Java/CHEFSUM delete mode 100644 Languages/Java/CHFM.java delete mode 100644 Languages/Java/Calculator.java delete mode 100644 Languages/Java/Check.java delete mode 100644 Languages/Java/CollectMaxCoins.java delete mode 100644 Languages/Java/Convert.java delete mode 100644 Languages/Java/DecompressZip.java delete mode 100644 Languages/Java/DeleteElements.java delete mode 100644 Languages/Java/DiamondPattern.java delete mode 100644 Languages/Java/Dynamic Programming/CoinChange.java delete mode 100644 Languages/Java/Dynamic Programming/Edit Distance delete mode 100644 Languages/Java/Dynamic Programming/Fibonacci.java delete mode 100644 Languages/Java/Dynamic Programming/LCS.java delete mode 100644 Languages/Java/FindGreatestNumber.java delete mode 100644 Languages/Java/Flipping an Image.java delete mode 100644 Languages/Java/FourSum.java delete mode 100644 Languages/Java/GCD using recursion.java delete mode 100644 Languages/Java/GCD.java delete mode 100644 Languages/Java/GameCraps.java delete mode 100644 Languages/Java/GenerateChessBoard.java delete mode 100644 Languages/Java/GuessingNumberGame.java delete mode 100644 Languages/Java/Hashset.java delete mode 100644 Languages/Java/Huffman-Encoder/.DS_Store delete mode 100644 Languages/Java/Huffman-Encoder/.idea/description.html delete mode 100644 Languages/Java/Huffman-Encoder/.idea/misc.xml delete mode 100644 Languages/Java/Huffman-Encoder/.idea/modules.xml delete mode 100644 Languages/Java/Huffman-Encoder/.idea/project-template.xml delete mode 100644 Languages/Java/Huffman-Encoder/.idea/vcs.xml delete mode 100644 Languages/Java/Huffman-Encoder/.idea/workspace.xml delete mode 100644 Languages/Java/Huffman-Encoder/HuffmanEncoder.java delete mode 100644 Languages/Java/Huffman-Encoder/HuffmanEncoderFile.java delete mode 100644 Languages/Java/Huffman-Encoder/Main.java delete mode 100644 Languages/Java/Initialization block delete mode 100644 Languages/Java/Insertion_Sort.java delete mode 100644 Languages/Java/Kadaans_Algorithm.java delete mode 100644 Languages/Java/LengthOfLIS.java delete mode 100644 Languages/Java/LexoPermute.java delete mode 100644 Languages/Java/LinkedList/CircularLinkedList.java delete mode 100644 Languages/Java/LinkedList/DLL.java delete mode 100644 Languages/Java/LinkedList/LL.java delete mode 100644 Languages/Java/LinkedList/LinkedList.java delete mode 100644 Languages/Java/LinkedList/LinkedListMain.java delete mode 100644 Languages/Java/LongestBitonicSubsequence.java delete mode 100644 Languages/Java/MaxHeap.java delete mode 100644 Languages/Java/Mazepath.java delete mode 100644 Languages/Java/MergeSort.java delete mode 100644 Languages/Java/MovingBanner.java delete mode 100644 Languages/Java/NQueens.java delete mode 100644 Languages/Java/NeedleInHaystack.java delete mode 100644 Languages/Java/NextGreaterElement.java delete mode 100644 Languages/Java/NextSmallerWithSameDigits.java delete mode 100644 Languages/Java/OTP_Generator.java delete mode 100644 Languages/Java/Palindrome.java delete mode 100644 Languages/Java/Prime.java delete mode 100644 Languages/Java/QuickSort.java delete mode 100644 Languages/Java/Reverse.java delete mode 100644 Languages/Java/RiverSizes.java delete mode 100644 Languages/Java/SelectionSort.java delete mode 100644 Languages/Java/SieveOfEratosthenes.java delete mode 100644 Languages/Java/Sort_ArrayList.java delete mode 100644 Languages/Java/Sorting.java delete mode 100644 Languages/Java/Stack.java delete mode 100644 Languages/Java/SudokuSolver.java delete mode 100644 Languages/Java/SymmetricTree.java delete mode 100644 Languages/Java/TeachMe(KickStart) delete mode 100644 Languages/Java/Tower Of Hanoi.java delete mode 100644 Languages/Java/Vectors.java delete mode 100644 Languages/Java/Wildcard_matching.java delete mode 100644 Languages/Java/appendanddelete.java delete mode 100644 Languages/Java/arraymanipulation.java delete mode 100644 Languages/Java/arraysum.java delete mode 100644 Languages/Java/binarysearch.java delete mode 100644 Languages/Java/disariumnumber.java delete mode 100644 Languages/Java/dstapls(CodeChef) delete mode 100644 Languages/Java/dynamic_method_dispatch.java delete mode 100644 Languages/Java/encryption.java delete mode 100644 Languages/Java/linear_search.java delete mode 100644 Languages/Java/movieMagic.java delete mode 100644 Languages/Java/multithreadedSorting.java delete mode 100644 Languages/Java/stack_using_array.java delete mode 100644 Languages/Javascript/Clock-js/img/clock.png delete mode 100644 Languages/Javascript/Clock-js/index.html delete mode 100644 Languages/Javascript/Clock-js/script.js delete mode 100644 Languages/Javascript/Clock-js/style.css delete mode 100644 Languages/Javascript/IIFE.js delete mode 100644 Languages/Javascript/JSPromises.js delete mode 100644 Languages/Javascript/Random Background Color Generator/index.html delete mode 100644 Languages/Javascript/Random Background Color Generator/script.js delete mode 100644 Languages/Javascript/TextFileDownload.js delete mode 100644 Languages/Javascript/arraySum.js delete mode 100644 Languages/Javascript/asyncJS.js delete mode 100644 Languages/Javascript/chuck-norris-jokes.js delete mode 100644 Languages/Javascript/closure.js delete mode 100644 Languages/Javascript/current-time.js delete mode 100644 Languages/Javascript/diceRoll/1.png delete mode 100644 Languages/Javascript/diceRoll/2.png delete mode 100644 Languages/Javascript/diceRoll/3.png delete mode 100644 Languages/Javascript/diceRoll/4.png delete mode 100644 Languages/Javascript/diceRoll/5.png delete mode 100644 Languages/Javascript/diceRoll/6.png delete mode 100644 Languages/Javascript/diceRoll/diceRoll.html delete mode 100644 Languages/Javascript/diceRoll/images.png delete mode 100644 Languages/Javascript/greeter.js delete mode 100644 Languages/Javascript/hammingdistance.js delete mode 100644 Languages/Javascript/hello-world-in-HTML-DOM-via-Javascript delete mode 100644 Languages/Javascript/helloworld.js delete mode 100644 Languages/Javascript/helloworld2020.js delete mode 100644 Languages/Javascript/iterate.js delete mode 100644 Languages/Javascript/javascript-practice-programs/0_Multiplication_table.html delete mode 100644 Languages/Javascript/javascript-practice-programs/1_Sum_Of_n_Natural_Numbers.html delete mode 100644 Languages/Javascript/javascript-practice-programs/2_star_pattern_1.html delete mode 100644 Languages/Javascript/javascript-practice-programs/3_star_pattern_2.html delete mode 100644 Languages/Javascript/javascript-practice-programs/4_star_pattern_3.html delete mode 100644 Languages/Javascript/javascript-practice-programs/5_Reverse_A_Number.html delete mode 100644 Languages/Javascript/js-hello-world.js delete mode 100644 Languages/Javascript/loopy-soupy-fizzbuzz delete mode 100644 Languages/Javascript/moveZero.js delete mode 100644 Languages/Javascript/myHacktoberfestContribution.js delete mode 100644 Languages/Javascript/pallindromeDescendant.js delete mode 100644 Languages/Javascript/roulette/ball.png delete mode 100644 Languages/Javascript/roulette/index.html delete mode 100644 Languages/Javascript/roulette/pixi.min.js delete mode 100644 Languages/Javascript/roulette/roulette.png delete mode 100644 Languages/Javascript/roulette/roulette.svg delete mode 100644 Languages/Javascript/roulette/segment.js delete mode 100644 Languages/Javascript/secondRepo.js delete mode 100644 Languages/Javascript/sum.js delete mode 100644 Languages/Javascript/tic-tac-toe/app.js delete mode 100644 Languages/Javascript/tic-tac-toe/index.html delete mode 100644 Languages/Javascript/tic-tac-toe/style.css delete mode 100644 Languages/Javascript/validatePIN.js delete mode 100644 Languages/Julia/MNIST.jl delete mode 100644 Languages/Kotlin/FizzBuzz.kt delete mode 100644 Languages/Kotlin/GCD_Recursive.kt delete mode 100644 Languages/Kotlin/IsPrime.kt delete mode 100644 Languages/Kotlin/MergeSort.kt delete mode 100644 Languages/Kotlin/PalindromeCheck.kt delete mode 100644 Languages/Kotlin/QuickSort.kt delete mode 100644 Languages/Kotlin/Searching.kt delete mode 100644 Languages/Kotlin/SelectionSort.kt delete mode 100644 Languages/Kotlin/fibonacci.kt delete mode 100644 Languages/Kotlin/hello_world.kt delete mode 100644 Languages/Kotlin/is_armstrong.kt delete mode 100644 Languages/Kotlin/linear_search.kt delete mode 100644 Languages/LOLCODE/main.lo delete mode 100644 Languages/MATLAB/neuralnetworkmodel.m delete mode 100644 Languages/NodeJs/EJS-ListIT/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/app.js delete mode 120000 Languages/NodeJs/EJS-ListIT/node_modules/.bin/mime delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/accepts/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/accepts/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/accepts/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/accepts/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/accepts/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/array-flatten/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/array-flatten/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/array-flatten/array-flatten.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/array-flatten/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/lib/read.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/lib/types/json.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/lib/types/raw.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/lib/types/text.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/lib/types/urlencoded.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/body-parser/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/bytes/History.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/bytes/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/bytes/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/bytes/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/bytes/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-disposition/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-disposition/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-disposition/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-disposition/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-disposition/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-type/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-type/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-type/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-type/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/content-type/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie-signature/.npmignore delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie-signature/History.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie-signature/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie-signature/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie-signature/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/cookie/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/.coveralls.yml delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/.eslintrc delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/.npmignore delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/.travis.yml delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/CHANGELOG.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/Makefile delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/component.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/karma.conf.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/node.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/src/browser.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/src/debug.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/src/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/src/inspector-log.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/debug/src/node.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/History.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/lib/browser/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/lib/compat/callsite-tostring.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/lib/compat/event-listener-count.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/lib/compat/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/depd/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/destroy/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/destroy/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/destroy/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/destroy/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ee-first/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ee-first/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ee-first/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ee-first/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/Jakefile delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/ejs.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/ejs.min.js delete mode 100755 Languages/NodeJs/EJS-ListIT/node_modules/ejs/lib/ejs.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/lib/utils.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ejs/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/encodeurl/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/encodeurl/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/encodeurl/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/encodeurl/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/encodeurl/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/escape-html/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/escape-html/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/escape-html/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/escape-html/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/etag/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/etag/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/etag/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/etag/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/etag/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/History.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/application.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/express.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/middleware/init.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/middleware/query.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/request.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/response.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/router/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/router/layer.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/router/route.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/utils.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/lib/view.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/express/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/finalhandler/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/finalhandler/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/finalhandler/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/finalhandler/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/finalhandler/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/forwarded/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/forwarded/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/forwarded/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/forwarded/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/forwarded/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/fresh/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/fresh/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/fresh/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/fresh/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/fresh/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/http-errors/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/http-errors/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/http-errors/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/http-errors/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/http-errors/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/Changelog.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/internal.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/utf16.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/encodings/utf7.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/lib/extend-node.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/lib/index.d.ts delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/lib/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/lib/streams.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/iconv-lite/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/inherits/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/inherits/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/inherits/inherits.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/inherits/inherits_browser.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/inherits/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ipaddr.js/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ipaddr.js/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ipaddr.js/ipaddr.min.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ipaddr.js/lib/ipaddr.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ipaddr.js/lib/ipaddr.js.d.ts delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ipaddr.js/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/media-typer/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/media-typer/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/media-typer/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/media-typer/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/media-typer/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/merge-descriptors/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/merge-descriptors/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/merge-descriptors/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/merge-descriptors/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/merge-descriptors/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/methods/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/methods/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/methods/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/methods/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/methods/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-db/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-db/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-db/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-db/db.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-db/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-db/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-types/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-types/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-types/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-types/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime-types/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/.npmignore delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/CHANGELOG.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/README.md delete mode 100755 Languages/NodeJs/EJS-ListIT/node_modules/mime/cli.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/mime.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/package.json delete mode 100755 Languages/NodeJs/EJS-ListIT/node_modules/mime/src/build.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/src/test.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/mime/types.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ms/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ms/license.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ms/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/ms/readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/lib/charset.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/lib/encoding.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/lib/language.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/lib/mediaType.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/negotiator/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/on-finished/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/on-finished/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/on-finished/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/on-finished/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/on-finished/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/parseurl/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/parseurl/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/parseurl/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/parseurl/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/parseurl/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/path-to-regexp/History.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/path-to-regexp/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/path-to-regexp/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/path-to-regexp/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/path-to-regexp/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/proxy-addr/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/proxy-addr/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/proxy-addr/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/proxy-addr/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/proxy-addr/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/.editorconfig delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/.eslintignore delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/.eslintrc delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/CHANGELOG.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/dist/qs.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/lib/formats.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/lib/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/lib/parse.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/lib/stringify.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/lib/utils.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/test/.eslintrc delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/test/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/test/parse.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/test/stringify.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/qs/test/utils.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/range-parser/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/range-parser/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/range-parser/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/range-parser/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/range-parser/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/raw-body/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/raw-body/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/raw-body/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/raw-body/index.d.ts delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/raw-body/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/raw-body/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safe-buffer/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safe-buffer/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safe-buffer/index.d.ts delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safe-buffer/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safe-buffer/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/Readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/dangerous.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/safer.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/safer-buffer/tests.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/node_modules/ms/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/node_modules/ms/license.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/node_modules/ms/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/node_modules/ms/readme.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/send/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/serve-static/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/serve-static/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/serve-static/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/serve-static/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/serve-static/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/setprototypeof/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/setprototypeof/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/setprototypeof/index.d.ts delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/setprototypeof/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/setprototypeof/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/setprototypeof/test/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/statuses/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/statuses/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/statuses/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/statuses/codes.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/statuses/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/statuses/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/toidentifier/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/toidentifier/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/toidentifier/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/toidentifier/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/type-is/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/type-is/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/type-is/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/type-is/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/type-is/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/unpipe/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/unpipe/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/unpipe/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/unpipe/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/unpipe/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/utils-merge/.npmignore delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/utils-merge/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/utils-merge/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/utils-merge/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/utils-merge/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/vary/HISTORY.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/vary/LICENSE delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/vary/README.md delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/vary/index.js delete mode 100644 Languages/NodeJs/EJS-ListIT/node_modules/vary/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/package-lock.json delete mode 100644 Languages/NodeJs/EJS-ListIT/package.json delete mode 100644 Languages/NodeJs/EJS-ListIT/views/home.ejs delete mode 100644 Languages/NodeJs/EJS-ListIT/views/listit.ejs delete mode 160000 Languages/NodeJs/myDiary delete mode 100644 Languages/PHP/hacktoberfest2019.php delete mode 100644 Languages/PHP/helloworld.php delete mode 100644 Languages/PHP/helloworld2.php delete mode 100644 Languages/PHP/logout.php delete mode 100644 Languages/PHP/pdo.php delete mode 100644 Languages/Pascal/hello-world.pas delete mode 100644 Languages/Perl/Hello.pl delete mode 100644 Languages/Perl/capitalize.pl delete mode 100644 Languages/Purescript/README.md delete mode 100644 Languages/Purescript/hello-world/.gitignore delete mode 100644 Languages/Purescript/hello-world/bower.json delete mode 100644 Languages/Purescript/hello-world/src/Main.purs delete mode 100644 Languages/Purescript/hello-world/test/Main.purs delete mode 100644 Languages/Python/.DS_Store delete mode 100644 Languages/Python/.idea/.gitignore delete mode 100644 Languages/Python/.idea/Python.iml delete mode 100644 Languages/Python/.idea/inspectionProfiles/profiles_settings.xml delete mode 100644 Languages/Python/.idea/misc.xml delete mode 100644 Languages/Python/.idea/modules.xml delete mode 100644 Languages/Python/.idea/vcs.xml delete mode 100644 Languages/Python/AutoEncoders.ipynb delete mode 100644 Languages/Python/BinarySearch_1st&last_occurrence_AMAZON.py delete mode 100644 Languages/Python/BubbleSort.py delete mode 100644 Languages/Python/Calculator2.py delete mode 100644 Languages/Python/Geometric_Sum.py delete mode 100644 Languages/Python/HelloW.py delete mode 100644 Languages/Python/HelloWorld_.py delete mode 100644 Languages/Python/L-layer shallow neural network.py delete mode 100644 Languages/Python/MailingThroughPython.py delete mode 100644 Languages/Python/MergeSort.py delete mode 100644 Languages/Python/Printtable.py delete mode 100644 Languages/Python/QuickSort delete mode 100644 Languages/Python/Sort_colors.py delete mode 100644 Languages/Python/URI-2157.py delete mode 100644 Languages/Python/URI-2863.py delete mode 100644 Languages/Python/armstrong_number.py delete mode 100644 Languages/Python/array_equilib.py delete mode 100644 Languages/Python/bellman-ford.py delete mode 100644 Languages/Python/binaryTreeInorderTraversal.py delete mode 100644 Languages/Python/binary_search.py delete mode 100644 Languages/Python/binarysearch.py delete mode 100644 Languages/Python/blue_screen.py delete mode 100644 Languages/Python/bucketsort.py delete mode 100644 Languages/Python/bye_world.py delete mode 100644 Languages/Python/calculator.py delete mode 100644 Languages/Python/check_prime.py delete mode 100644 Languages/Python/color_baloons.py delete mode 100644 Languages/Python/countStrings.py delete mode 100644 Languages/Python/date to day convert.py delete mode 100644 Languages/Python/deque.py delete mode 100644 Languages/Python/dijkstra.py delete mode 100644 Languages/Python/euclidean_algorithm.py delete mode 100644 Languages/Python/even.py delete mode 100644 Languages/Python/fact.py delete mode 100644 Languages/Python/factorial.py delete mode 100644 Languages/Python/fibonacci.py delete mode 100644 Languages/Python/fibonacci_dp.py delete mode 100644 Languages/Python/fizzbuzz.py delete mode 100644 Languages/Python/flip.py delete mode 100644 Languages/Python/gnerating_odd_numbers_in_a_interval.py delete mode 100644 Languages/Python/green_screen.py delete mode 100644 Languages/Python/heapsort.py delete mode 100644 Languages/Python/hello.py delete mode 100644 Languages/Python/helloWorld.py delete mode 100644 Languages/Python/hello_world.py delete mode 100644 Languages/Python/image compression/image.jpeg delete mode 100644 Languages/Python/image compression/imagecompression.py delete mode 100644 Languages/Python/insertion sort.py delete mode 100644 Languages/Python/intersectionOf3SortedArrays.py delete mode 100644 Languages/Python/is_anagram.py delete mode 100644 Languages/Python/knapsack.py delete mode 100644 Languages/Python/lan_search.py delete mode 100644 Languages/Python/loadingSoundFile.py delete mode 100644 Languages/Python/longestcommonsubsequence.py delete mode 100644 Languages/Python/mac_changer.py delete mode 100644 Languages/Python/mcm.py delete mode 100644 Languages/Python/memoryGameGUI/game.py delete mode 100644 Languages/Python/merging_linked_list.py delete mode 100644 Languages/Python/oddeven.py delete mode 100644 Languages/Python/openCvCam.py delete mode 100644 Languages/Python/palindrome.py delete mode 100644 Languages/Python/pass_strength_detect.py delete mode 100644 Languages/Python/power_in_logn.py delete mode 100644 Languages/Python/printing_matrix_in_spiral_form.py delete mode 100644 Languages/Python/profanity_checker.py delete mode 100644 Languages/Python/reverse.py delete mode 100644 Languages/Python/rgb_channel.py delete mode 100644 Languages/Python/rotate.py delete mode 100644 Languages/Python/selection_sort.py delete mode 100644 Languages/Python/simple_network_scanner.py delete mode 100644 Languages/Python/singleLinkedList.py delete mode 100644 Languages/Python/stack.py delete mode 100644 Languages/Python/steppingNumbers.py delete mode 100644 Languages/Python/swap_it.py delete mode 100644 Languages/Python/todo-cmdLine-App.py delete mode 100644 Languages/Python/twoSumBsts.py delete mode 100644 Languages/Python/validPalindrome.py delete mode 100644 Languages/Rust/hello_world.rs delete mode 100644 Languages/Swift/hello_world.swift delete mode 100644 Languages/TypeScript/HelloWorldInTS.ts delete mode 100644 Languages/TypeScript/integer_reversal.ts delete mode 100644 Languages/VisualBasic/HelloWorld.vb delete mode 100644 Leetcode-Company-Wise-Problemss-master.zip delete mode 100644 Left View of a binary tree delete mode 100644 Linear_Search delete mode 100644 Linear_search.c delete mode 100644 Linked List/Circluar_Linked__List.c delete mode 100644 Linked List/Concat_LL.c delete mode 100644 Linked List/Count_SumLinked_List.c delete mode 100644 Linked List/Create_LL_using_Insert.c delete mode 100644 Linked List/Create_and_Display_LL.c delete mode 100644 Linked List/Deleteing_LL.c delete mode 100644 Linked List/Deleting_from_LL.c delete mode 100644 Linked List/Doubly_Linked_List.c delete mode 100644 Linked List/Insert_in_LL.c delete mode 100644 Linked List/LinearLinkedList.c delete mode 100644 Linked List/LinkedList_CPP.c delete mode 100644 Linked List/Linked_List.c delete mode 100644 Linked List/Max_LL.c delete mode 100644 Linked List/Merge_LL.c delete mode 100644 Linked List/Polynomial_Linked_List.c delete mode 100644 Linked List/Remove_Duplicate_LL.c delete mode 100644 Linked List/Reverse_LL.c delete mode 100644 Linked List/Search_LL.c delete mode 100644 Linked List/SortedInsert_LL.c delete mode 100644 Linked List/isLoop_LL.c delete mode 100644 Linked List/isSorted_LL.c delete mode 100644 LongestCommonSubsequence.cpp delete mode 100644 Magic 8-Ball.py delete mode 100644 Magical Chessboard.cpp delete mode 100644 Matrix_multiplication.c delete mode 100644 MaxPairwiseProduct.cpp delete mode 100644 Maximum_Rectangular_Area_in_a_Histogram.cpp delete mode 100644 Mean_StdDeviation_Variance delete mode 100644 Merge_Two_Sorted_Array.c delete mode 100644 MonteCarloPi.cpp delete mode 100644 Notepad Using Python/README.md delete mode 100644 Notepad Using Python/notepad.ico delete mode 100644 Notepad Using Python/notepad.py delete mode 100644 October1_leetcode.cpp delete mode 100644 Palindrom.cpp delete mode 100644 PasswordGenerator_java/Password.java delete mode 100644 PasswordGenerator_java/pruebaPassword.java delete mode 100644 Prefix Sum Algorithm.txt delete mode 100644 Print.py delete mode 100644 Prob_C.cpp delete mode 100644 Program 23/readme.md delete mode 100644 Program 23/sum_of_square_of_binomial_coefficient.cpp delete mode 100644 README.md delete mode 100644 ReverseNumber.java delete mode 100644 Right View of the binary tree delete mode 100644 RockPaperScissorsSpockLizard.py delete mode 100644 SPOJ_LIST/ABSP1.cpp delete mode 100644 SPOJ_LIST/DOL.cpp delete mode 100644 SPOJ_LIST/ESYRCRTN.cpp delete mode 100644 SPOJ_LIST/GIRLSNBS.cpp delete mode 100644 SPOJ_LIST/MOHIB.cpp delete mode 100644 SPOJ_LIST/PHT.cpp delete mode 100644 SPOJ_LIST/QUADAREA.cpp delete mode 100644 SPOJ_LIST/SPCQ.cpp delete mode 100644 SPOJ_LIST/SPOJQUESTIONSLIST.pdf delete mode 100644 SPOJ_LIST/acpc11b.cpp delete mode 100644 SPOJ_LIST/army.cpp delete mode 100644 SPOJ_LIST/codchess.cpp delete mode 100644 SPOJ_LIST/crds.cpp delete mode 100644 SPOJ_LIST/ec_conb.cpp delete mode 100644 SPOJ_LIST/fashion.cpp delete mode 100644 SPOJ_LIST/fctrl.cpp delete mode 100644 SPOJ_LIST/fctrl2(c++17).cpp delete mode 100644 SPOJ_LIST/fctrl2(using int array).cpp delete mode 100644 SPOJ_LIST/ieeeeebgam.cpp delete mode 100644 SPOJ_LIST/infix2postfix.cpp delete mode 100644 Scissor - Image Compressor/ReadMe.md delete mode 100644 Scissor - Image Compressor/app.js delete mode 100644 Scissor - Image Compressor/compress.js delete mode 100644 Scissor - Image Compressor/design.css delete mode 100644 Scissor - Image Compressor/download.js delete mode 100644 Scissor - Image Compressor/images/Compression Strength.png delete mode 100644 Scissor - Image Compressor/images/arrow.png delete mode 100644 Scissor - Image Compressor/images/credit.png delete mode 100644 Scissor - Image Compressor/images/decrease compression.png delete mode 100644 Scissor - Image Compressor/images/download button.png delete mode 100644 Scissor - Image Compressor/images/favicon.png delete mode 100644 Scissor - Image Compressor/images/increase compression.png delete mode 100644 Scissor - Image Compressor/images/instruct.png delete mode 100644 Scissor - Image Compressor/images/logo.png delete mode 100644 Scissor - Image Compressor/index.html delete mode 100644 Scissor - Image Compressor/range.js delete mode 100644 SelectionSort.cpp delete mode 100644 Simpleform.html delete mode 100644 SparseMatrix.cpp delete mode 100644 StructuredArray.cpp delete mode 100644 Subarray_with_a_sum.cpp delete mode 100644 Sum_complex_number.py delete mode 100644 Swaping.py delete mode 100644 The Coin change prob solution delete mode 100644 ThreeSumZero.java delete mode 100644 Tower_Of_Hanoi.c delete mode 100644 TransposeAMatrix.java delete mode 100644 Utsav_Inverse permutation.cpp delete mode 100644 XOR_operation.JAVA delete mode 100644 addTwoNum.cpp delete mode 100644 addition.jl delete mode 100644 anagramstrings.cpp delete mode 100644 arduino/Car_Bluetooth/Bluetooth.ino delete mode 100644 arduino/DTMF/DTMF_ robo/DTMF_robo/DTMF_robo.ino delete mode 100644 arduino/DTMF/DTMF_basics/DTMF_basics.ino delete mode 100644 arduino/DTMF/DTMF_robo_spcl/DTMF_robo_spcl.ino delete mode 100644 arduino/Fuel_Gauge/README.md delete mode 100644 arduino/Fuel_Gauge/iot_arduino_to_android_via_bluetooth_or_wifi.ino delete mode 100644 arduino/LED_1st_program/LED_1st_program.ino delete mode 100644 arduino/README.md delete mode 100644 arduino/TSOP_Remote/TSOP_Remote.ino delete mode 100644 arduino/Ultrasonic_Sensor/Ultrasonic_Sensor.ino delete mode 100644 arduino/Water_Quality_Test/README.md delete mode 100644 arduino/Water_Quality_Test/water_quality_test.ino delete mode 100644 bubbesort.cpp delete mode 100644 bubbleSortByRecursion.cpp delete mode 100644 calculate_arc_length.py delete mode 100644 calculator_cpp.cpp delete mode 100644 castle.py delete mode 100644 catalanno.cpp delete mode 100644 check_leap_year.c delete mode 100644 colorMatchGame.py delete mode 100644 cplusplus.cpp delete mode 100644 demo.txt delete mode 100644 depth first search.cpp delete mode 100644 deque.cpp delete mode 100644 dijkstra.py delete mode 100644 exponentiation_log(n).py delete mode 100644 factorial.cpp delete mode 100644 factorial.py delete mode 100644 fibbonaci_number.cpp delete mode 100644 fibonnaci.py delete mode 100644 findUsingRecursion.cpp delete mode 100644 graph/AbstractGraph.hpp delete mode 100644 graph/AdjacencyList.hpp delete mode 100644 graph/AdjacencyMatrix.hpp delete mode 100644 graph/DirectedGraph.hpp delete mode 100644 graph/GraphAdjacencyBase.hpp delete mode 100644 graph/UndirectedGraph.hpp delete mode 100644 happywomensday.cpp delete mode 100644 hello-world-perl delete mode 100644 hello.ml delete mode 100644 hello.py delete mode 100644 helloWorld.rs delete mode 100644 helloWorld2 delete mode 100644 hello_worl_vb.html delete mode 100644 hello_world.jl delete mode 100644 helloworld.cpp delete mode 100644 helloworld21.cpp delete mode 100644 helloworld_interpolation.jl delete mode 100644 implementation_complexnumber delete mode 100644 infixtopostfix.cpp delete mode 100644 kadane.cpp delete mode 100644 kruskal.cpp delete mode 100644 lab5.c delete mode 100644 linear_search.cpp delete mode 100644 logs.js delete mode 100644 longestIncreasingSubsequence.cpp delete mode 100644 matrixKcoins.cpp delete mode 100644 mergSort.cpp delete mode 100644 merge sort trial.cpp delete mode 100644 merge_sort.cpp delete mode 100644 merge_sorted_arr.c delete mode 100644 mergesort.py delete mode 100644 mergesortsolution.cpp delete mode 100644 miller_rabin_prime.cpp delete mode 100644 multiplication-table.pas delete mode 100644 numguess.py delete mode 100644 online_rock_paper_scissors/app.js delete mode 100644 online_rock_paper_scissors/game.html delete mode 100644 online_rock_paper_scissors/style.css delete mode 100755 out/production/Hacktoberfest1/Bash/HelloWorld delete mode 100644 out/production/Hacktoberfest1/Batch/helloworld.bat delete mode 100644 out/production/Hacktoberfest1/Brainfuck/helloWorld.b delete mode 100644 out/production/Hacktoberfest1/C#/.vs/HelloWorld/DesignTimeBuild/.dtbcache delete mode 100644 out/production/Hacktoberfest1/C#/.vs/HelloWorld/v16/.suo delete mode 100644 out/production/Hacktoberfest1/C#/.vs/HelloWorld/v16/Server/sqlite3/db.lock delete mode 100644 out/production/Hacktoberfest1/C#/.vs/HelloWorld/v16/Server/sqlite3/storage.ide delete mode 100644 out/production/Hacktoberfest1/C#/.vs/HelloWorld/v16/Server/sqlite3/storage.ide-shm delete mode 100644 out/production/Hacktoberfest1/C#/.vs/HelloWorld/v16/Server/sqlite3/storage.ide-wal delete mode 100644 out/production/Hacktoberfest1/C#/BubbleSort.cs delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld.sln delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/HelloWorld.csproj delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/Program.cs delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.deps.json delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.dll delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.pdb delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.runtimeconfig.dev.json delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/bin/Debug/netcoreapp2.2/HelloWorld.runtimeconfig.json delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.AssemblyInfo.cs delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.AssemblyInfoInputs.cache delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.assets.cache delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.csproj.CoreCompileInputs.cache delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.csproj.FileListAbsolute.txt delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.csprojAssemblyReference.cache delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.dll delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/Debug/netcoreapp2.2/HelloWorld.pdb delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/HelloWorld.csproj.nuget.cache delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/HelloWorld.csproj.nuget.dgspec.json delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/HelloWorld.csproj.nuget.g.props delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/HelloWorld.csproj.nuget.g.targets delete mode 100644 out/production/Hacktoberfest1/C#/HelloWorld/obj/project.assets.json delete mode 100644 out/production/Hacktoberfest1/C#/Maquina de Casino/Form1.cs delete mode 100644 out/production/Hacktoberfest1/C#/Maquina de Casino/README.md delete mode 100644 out/production/Hacktoberfest1/C#/NReinas/Form.cs delete mode 100644 out/production/Hacktoberfest1/C#/NReinas/README.md delete mode 100644 out/production/Hacktoberfest1/C#/bucketsort.cs delete mode 100644 out/production/Hacktoberfest1/C#/mergesort.cs delete mode 100644 out/production/Hacktoberfest1/C#/palindrome.cs delete mode 100644 out/production/Hacktoberfest1/C#/quicksort.cs delete mode 100644 out/production/Hacktoberfest1/C#/tree_traversal.cs delete mode 100644 out/production/Hacktoberfest1/C++/BFS.cpp delete mode 100644 out/production/Hacktoberfest1/C++/BS.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Burst Balloon DP.cpp delete mode 100644 out/production/Hacktoberfest1/C++/DFS.cpp delete mode 100644 out/production/Hacktoberfest1/C++/DiamondPattern delete mode 100644 out/production/Hacktoberfest1/C++/Edit_distance_Leetcode_hard_level.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Euler_phi delete mode 100644 out/production/Hacktoberfest1/C++/ExtendedEucleidian.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Finding_Unique_Number_in_Array delete mode 100644 out/production/Hacktoberfest1/C++/Hello World ! delete mode 100644 out/production/Hacktoberfest1/C++/Hello_India.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Huffman Code.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Insertion_in_binary_trees delete mode 100644 out/production/Hacktoberfest1/C++/IntersectionOfarrays.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Kedane'sAlgo.cpp delete mode 100644 out/production/Hacktoberfest1/C++/LCS.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Largest_Sum_Contiguous_Subarray.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Longest_increasing_subsequence_O(nlogn).cpp delete mode 100644 out/production/Hacktoberfest1/C++/MinPriorityQueueImplementation.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Nqueens.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Number_of_divisors.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Reach_the_final_destination(StairCase Question) delete mode 100644 out/production/Hacktoberfest1/C++/Sieve of Eratosthenes delete mode 100644 out/production/Hacktoberfest1/C++/StackReverse(By Recursion).cpp delete mode 100644 out/production/Hacktoberfest1/C++/Standard_Deviation_Calc.cpp delete mode 100644 out/production/Hacktoberfest1/C++/Testing_array delete mode 100644 out/production/Hacktoberfest1/C++/all_subsets.cpp delete mode 100644 out/production/Hacktoberfest1/C++/arrayintersection.cpp delete mode 100644 out/production/Hacktoberfest1/C++/binarysearchrecursive.cpp delete mode 100644 out/production/Hacktoberfest1/C++/bubble_sort.cpp delete mode 100644 out/production/Hacktoberfest1/C++/detect loop.cpp delete mode 100644 out/production/Hacktoberfest1/C++/factors_of_numbers.cpp delete mode 100644 out/production/Hacktoberfest1/C++/fastExponentiation.cpp delete mode 100644 out/production/Hacktoberfest1/C++/find_unique.cpp delete mode 100644 out/production/Hacktoberfest1/C++/helloworld.cpp delete mode 100644 out/production/Hacktoberfest1/C++/matchstring.cpp delete mode 100644 out/production/Hacktoberfest1/C++/mergeTwoSortedLL.cpp delete mode 100644 out/production/Hacktoberfest1/C++/monty_hall_paradox.cpp delete mode 100644 out/production/Hacktoberfest1/C++/numgen.cpp delete mode 100644 out/production/Hacktoberfest1/C++/palindrome.cpp delete mode 100644 out/production/Hacktoberfest1/C++/pattern_prctice(CB).cpp delete mode 100644 out/production/Hacktoberfest1/C++/rat_in_a_maze_problem.cpp delete mode 100644 out/production/Hacktoberfest1/C++/seiveOfEratosthenes delete mode 100644 out/production/Hacktoberfest1/C++/selectionSort.cpp delete mode 100644 out/production/Hacktoberfest1/C++/selection_sort.cpp delete mode 100644 out/production/Hacktoberfest1/C++/sievetheorem.cpp delete mode 100644 out/production/Hacktoberfest1/C++/sort01.cpp delete mode 100644 out/production/Hacktoberfest1/C++/sudoku_solver.cpp delete mode 100644 out/production/Hacktoberfest1/C++/verticalorderBTprint.cpp delete mode 100644 out/production/Hacktoberfest1/C++/wordbreak.cpp delete mode 100644 out/production/Hacktoberfest1/C/Array_Rotation.c delete mode 100644 out/production/Hacktoberfest1/C/Bubble_Sort.c delete mode 100644 out/production/Hacktoberfest1/C/Circular_Linked_List.c delete mode 100644 out/production/Hacktoberfest1/C/InsertionSort.c delete mode 100644 out/production/Hacktoberfest1/C/Selection Sort.c delete mode 100644 out/production/Hacktoberfest1/C/blockchain.c delete mode 100644 out/production/Hacktoberfest1/C/credit.c delete mode 100644 out/production/Hacktoberfest1/C/hello_world.c delete mode 100644 out/production/Hacktoberfest1/C/largestno.c delete mode 100644 out/production/Hacktoberfest1/C/linkedlist.c delete mode 100644 out/production/Hacktoberfest1/C/mario.c delete mode 100644 out/production/Hacktoberfest1/C/oddeven.c delete mode 100644 out/production/Hacktoberfest1/C/powerset.c delete mode 100644 out/production/Hacktoberfest1/C/pyramid.c delete mode 100644 out/production/Hacktoberfest1/C/selection_sort.c delete mode 100644 out/production/Hacktoberfest1/C/snakegame.c delete mode 100644 out/production/Hacktoberfest1/C/stack.c delete mode 100644 out/production/Hacktoberfest1/C/swapping of two numbers.c delete mode 100644 out/production/Hacktoberfest1/Dart/HelloWorld.dart delete mode 100644 out/production/Hacktoberfest1/Elixir/fibonacci.exs delete mode 100644 out/production/Hacktoberfest1/Elixir/hello_world.exs delete mode 100644 out/production/Hacktoberfest1/GoLang/helloWorld.go delete mode 100644 out/production/Hacktoberfest1/GoLang/prime_nos.go delete mode 100644 out/production/Hacktoberfest1/GoLang/selection_sort.go delete mode 100644 out/production/Hacktoberfest1/HTML/Clock.html delete mode 100644 out/production/Hacktoberfest1/HTML/Hacktober.html delete mode 100644 out/production/Hacktoberfest1/HTML/helloWord.html delete mode 100644 out/production/Hacktoberfest1/Java/Huffman-Encoder/.idea/description.html delete mode 100644 out/production/Hacktoberfest1/Java/Huffman-Encoder/.idea/misc.xml delete mode 100644 out/production/Hacktoberfest1/Java/Huffman-Encoder/.idea/modules.xml delete mode 100644 out/production/Hacktoberfest1/Java/Huffman-Encoder/.idea/project-template.xml delete mode 100644 out/production/Hacktoberfest1/Java/Huffman-Encoder/.idea/vcs.xml delete mode 100644 out/production/Hacktoberfest1/Java/Huffman-Encoder/.idea/workspace.xml delete mode 100644 out/production/Hacktoberfest1/Java/TeachMe(KickStart) delete mode 100644 out/production/Hacktoberfest1/Java/dstapls(CodeChef) delete mode 100644 out/production/Hacktoberfest1/Javascript/IIFE.js delete mode 100644 out/production/Hacktoberfest1/Javascript/asyncJS.js delete mode 100644 out/production/Hacktoberfest1/Javascript/closure.js delete mode 100644 out/production/Hacktoberfest1/Javascript/greeter.js delete mode 100644 out/production/Hacktoberfest1/Javascript/hammingdistance.js delete mode 100644 out/production/Hacktoberfest1/Javascript/helloworld.js delete mode 100644 out/production/Hacktoberfest1/Javascript/helloworld2.js delete mode 100644 out/production/Hacktoberfest1/Javascript/js-hello-world.js delete mode 100644 out/production/Hacktoberfest1/Javascript/myHacktoberfestContribution.js delete mode 100644 out/production/Hacktoberfest1/Javascript/sum.js delete mode 100644 out/production/Hacktoberfest1/Julia/MNIST.jl delete mode 100644 out/production/Hacktoberfest1/MATLAB/neuralnetworkmodel.m delete mode 100644 out/production/Hacktoberfest1/PHP/helloworld.php delete mode 100644 out/production/Hacktoberfest1/PHP/helloworld2.php delete mode 100644 out/production/Hacktoberfest1/Perl/Hello.pl delete mode 100644 out/production/Hacktoberfest1/Python/BubbleSort.py delete mode 100644 out/production/Hacktoberfest1/Python/L-layer shallow neural network.py delete mode 100644 out/production/Hacktoberfest1/Python/LinkedList.py delete mode 100644 out/production/Hacktoberfest1/Python/MailingThroughPython.py delete mode 100644 out/production/Hacktoberfest1/Python/Printtable.py delete mode 100644 out/production/Hacktoberfest1/Python/QuickSort delete mode 100644 out/production/Hacktoberfest1/Python/Sort_colors.py delete mode 100644 out/production/Hacktoberfest1/Python/binaryTreeInorderTraversal.py delete mode 100644 out/production/Hacktoberfest1/Python/binarysearch.py delete mode 100644 out/production/Hacktoberfest1/Python/blue_screen.py delete mode 100644 out/production/Hacktoberfest1/Python/calculator.py delete mode 100644 out/production/Hacktoberfest1/Python/color_baloons.py delete mode 100644 out/production/Hacktoberfest1/Python/fibonacci_dp.py delete mode 100644 out/production/Hacktoberfest1/Python/gnerating_odd_numbers_in_a_interval.py delete mode 100644 out/production/Hacktoberfest1/Python/green_screen.py delete mode 100644 out/production/Hacktoberfest1/Python/helloWorld.py delete mode 100644 out/production/Hacktoberfest1/Python/hello_world.py delete mode 100644 out/production/Hacktoberfest1/Python/is_anagram.py delete mode 100644 out/production/Hacktoberfest1/Python/loadingSoundFile.py delete mode 100644 out/production/Hacktoberfest1/Python/merging_linked_list.py delete mode 100644 out/production/Hacktoberfest1/Python/oddeven.py delete mode 100644 out/production/Hacktoberfest1/Python/palindrome.py delete mode 100644 out/production/Hacktoberfest1/Python/pass_strength_detect.py delete mode 100644 out/production/Hacktoberfest1/Python/printing_matrix_in_spiral_form.py delete mode 100644 out/production/Hacktoberfest1/Python/reverse.py delete mode 100644 out/production/Hacktoberfest1/Python/rgb_channel.py delete mode 100644 out/production/Hacktoberfest1/Python/selection_sort.py delete mode 100644 out/production/Hacktoberfest1/Python/singleLinkedList.py delete mode 100644 out/production/Hacktoberfest1/Python/swap_it.py delete mode 100644 out/production/Hacktoberfest1/Rust/hello_world.rs delete mode 100644 out/production/Hacktoberfest1/TypeScript/HelloWorldInTS.ts delete mode 100644 out/production/Hacktoberfest1/VisualBasic/HelloWorld.vb delete mode 100644 overloadingNewDelete.cpp delete mode 100644 palindrome_check_for_number.java delete mode 100644 pascal.java delete mode 100644 permutation.java delete mode 100644 permuted_string.cpp delete mode 100644 play_music.py delete mode 100644 push_zeros.java delete mode 100644 queue.cpp delete mode 100644 quicksort.c delete mode 100644 removeInvalidParenthesis.cpp delete mode 100644 reverse-string.java delete mode 100644 saddlepoint.cpp delete mode 100644 secondRepo.js delete mode 100644 semdmail.py delete mode 100644 shamirSharing.py delete mode 100644 shortest distance bw two node.cpp delete mode 100644 snake game.txt delete mode 100644 sumoftwonos.c delete mode 100644 taylor_series_using_horner's_rul.cpp delete mode 100644 the sum and average of multiple user-entered numbers.py delete mode 100644 tic tac toe program.cpp delete mode 100644 tictactoe.cpp delete mode 100644 tilingProblem.cpp delete mode 100644 topological_sort.cpp delete mode 100644 tower_of_hanoi.py delete mode 100644 towerofhanoi.cpp delete mode 100644 twinprime.java delete mode 100644 uni_bst.cpp delete mode 100644 vector.cpp delete mode 100644 xor_operation.java diff --git a/25780367.java b/25780367.java index 9ee76f3df..e7035e384 100644 --- a/25780367.java +++ b/25780367.java @@ -3,8 +3,6 @@ import java.util.*; import java.lang.*; import java.io.*; - -/* Name of the class has to be "Main" only if the class is public. */ class Codechef { public static void main (String[] args) throws java.lang.Exception diff --git a/4) BEATBOX using JS/index.html b/4) BEATBOX using JS/index.html index b68c9a1a7..5792021b1 100644 --- a/4) BEATBOX using JS/index.html +++ b/4) BEATBOX using JS/index.html @@ -1,62 +1,62 @@ - - - - - - Beatbox - - - -
-
-
-
- A -
-
-
-
- S -
-
-
-
- D -
-
-
-
- F -
-
-
-
- G -
-
-
-
- H -
-
-
-
- J -
-
-
-
- K -
-
-
-
- L -
-
-
-
- - - - + + + + + + Beatbox + + + +
+
+
+
+ A +
+
+
+
+ S +
+
+
+
+ D +
+
+
+
+ F +
+
+
+
+ G +
+
+
+
+ H +
+
+
+
+ J +
+
+
+
+ K +
+
+
+
+ L +
+
+
+
+ + + + diff --git a/4) BEATBOX using JS/script.js b/4) BEATBOX using JS/script.js index 41572193e..a8a709b3e 100644 --- a/4) BEATBOX using JS/script.js +++ b/4) BEATBOX using JS/script.js @@ -1,103 +1,103 @@ -document.addEventListener("keydown", (event) => { - console.log(event.keyCode); - var key = event.keyCode; - if (key == 65) { - var audio = new Audio("Piano Chord 208.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("65").style.backgroundColor = "aqua"; - document.getElementById("65").style.boxShadow = "0px 0px 20px 0px aqua"; - setTimeout(function () { - document.getElementById("65").style.backgroundColor = "transparent"; - document.getElementById("65").style.boxShadow = "none"; - }, 500); - } - if (key == 83) { - var audio = new Audio("Piano Chord 209.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("83").style.backgroundColor = "aqua"; - document.getElementById("83").style.boxShadow = "0px 0px 20px 0px aqua"; - setTimeout(function () { - document.getElementById("83").style.backgroundColor = "transparent"; - document.getElementById("83").style.boxShadow = "none"; - }, 500); - } - if (key == 68) { - var audio = new Audio("Piano Chord 331.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("68").style.backgroundColor = "aqua"; - document.getElementById("68").style.boxShadow = "0px 0px 20px 0px aqua"; - setTimeout(function () { - document.getElementById("68").style.backgroundColor = "transparent"; - document.getElementById("68").style.boxShadow = "none"; - }, 500); - } - if (key == 70) { - var audio = new Audio("Drum Sticks Hit 3.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("70").style.backgroundColor = "#ff00ff"; - document.getElementById("70").style.boxShadow = "0px 0px 20px 0px #ff00ff"; - setTimeout(function () { - document.getElementById("70").style.backgroundColor = "transparent"; - document.getElementById("70").style.boxShadow = "none"; - }, 500); - } - if (key == 71) { - var audio = new Audio("Drum Snare Roll.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("71").style.backgroundColor = "#ff00ff"; - document.getElementById("71").style.boxShadow = "0px 0px 20px 0px #ff00ff"; - setTimeout(function () { - document.getElementById("71").style.backgroundColor = "transparent"; - document.getElementById("71").style.boxShadow = "none"; - }, 500); - } - if (key == 72) { - var audio = new Audio("PREL Musical 57.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("72").style.backgroundColor = "#ff00ff"; - document.getElementById("72").style.boxShadow = "0px 0px 20px 0px #ff00ff"; - setTimeout(function () { - document.getElementById("72").style.backgroundColor = "transparent"; - document.getElementById("72").style.boxShadow = "none"; - }, 500); - } - if (key == 74) { - var audio = new Audio("Cymbal Suspended 2.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("74").style.backgroundColor = "#ff00ff"; - document.getElementById("74").style.boxShadow = "0px 0px 20px 0px #ff00ff"; - setTimeout(function () { - document.getElementById("74").style.backgroundColor = "transparent"; - document.getElementById("74").style.boxShadow = "none"; - }, 500); - } - if (key == 75) { - var audio = new Audio("Musical Compos 33.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("75").style.backgroundColor = "white"; - document.getElementById("75").style.boxShadow = "0px 0px 20px 0px white"; - setTimeout(function () { - document.getElementById("75").style.backgroundColor = "transparent"; - document.getElementById("75").style.boxShadow = "none"; - }, 500); - } - if (key == 76) { - var audio = new Audio("Musical Orches 4.mp3"); - audio.currentTime = 0; - audio.play(); - document.getElementById("76").style.backgroundColor = "white"; - document.getElementById("76").style.boxShadow = "0px 0px 20px 0px white"; - setTimeout(function () { - document.getElementById("76").style.backgroundColor = "transparent"; - document.getElementById("76").style.boxShadow = "none"; - }, 500); - } -}); +document.addEventListener("keydown", (event) => { + console.log(event.keyCode); + var key = event.keyCode; + if (key == 65) { + var audio = new Audio("Piano Chord 208.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("65").style.backgroundColor = "aqua"; + document.getElementById("65").style.boxShadow = "0px 0px 20px 0px aqua"; + setTimeout(function () { + document.getElementById("65").style.backgroundColor = "transparent"; + document.getElementById("65").style.boxShadow = "none"; + }, 500); + } + if (key == 83) { + var audio = new Audio("Piano Chord 209.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("83").style.backgroundColor = "aqua"; + document.getElementById("83").style.boxShadow = "0px 0px 20px 0px aqua"; + setTimeout(function () { + document.getElementById("83").style.backgroundColor = "transparent"; + document.getElementById("83").style.boxShadow = "none"; + }, 500); + } + if (key == 68) { + var audio = new Audio("Piano Chord 331.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("68").style.backgroundColor = "aqua"; + document.getElementById("68").style.boxShadow = "0px 0px 20px 0px aqua"; + setTimeout(function () { + document.getElementById("68").style.backgroundColor = "transparent"; + document.getElementById("68").style.boxShadow = "none"; + }, 500); + } + if (key == 70) { + var audio = new Audio("Drum Sticks Hit 3.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("70").style.backgroundColor = "#ff00ff"; + document.getElementById("70").style.boxShadow = "0px 0px 20px 0px #ff00ff"; + setTimeout(function () { + document.getElementById("70").style.backgroundColor = "transparent"; + document.getElementById("70").style.boxShadow = "none"; + }, 500); + } + if (key == 71) { + var audio = new Audio("Drum Snare Roll.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("71").style.backgroundColor = "#ff00ff"; + document.getElementById("71").style.boxShadow = "0px 0px 20px 0px #ff00ff"; + setTimeout(function () { + document.getElementById("71").style.backgroundColor = "transparent"; + document.getElementById("71").style.boxShadow = "none"; + }, 500); + } + if (key == 72) { + var audio = new Audio("PREL Musical 57.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("72").style.backgroundColor = "#ff00ff"; + document.getElementById("72").style.boxShadow = "0px 0px 20px 0px #ff00ff"; + setTimeout(function () { + document.getElementById("72").style.backgroundColor = "transparent"; + document.getElementById("72").style.boxShadow = "none"; + }, 500); + } + if (key == 74) { + var audio = new Audio("Cymbal Suspended 2.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("74").style.backgroundColor = "#ff00ff"; + document.getElementById("74").style.boxShadow = "0px 0px 20px 0px #ff00ff"; + setTimeout(function () { + document.getElementById("74").style.backgroundColor = "transparent"; + document.getElementById("74").style.boxShadow = "none"; + }, 500); + } + if (key == 75) { + var audio = new Audio("Musical Compos 33.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("75").style.backgroundColor = "white"; + document.getElementById("75").style.boxShadow = "0px 0px 20px 0px white"; + setTimeout(function () { + document.getElementById("75").style.backgroundColor = "transparent"; + document.getElementById("75").style.boxShadow = "none"; + }, 500); + } + if (key == 76) { + var audio = new Audio("Musical Orches 4.mp3"); + audio.currentTime = 0; + audio.play(); + document.getElementById("76").style.backgroundColor = "white"; + document.getElementById("76").style.boxShadow = "0px 0px 20px 0px white"; + setTimeout(function () { + document.getElementById("76").style.backgroundColor = "transparent"; + document.getElementById("76").style.boxShadow = "none"; + }, 500); + } +}); diff --git a/4) BEATBOX using JS/style.css b/4) BEATBOX using JS/style.css index 72f88c78a..58dee1e80 100644 --- a/4) BEATBOX using JS/style.css +++ b/4) BEATBOX using JS/style.css @@ -1,56 +1,56 @@ -body { - height: 100vh; - padding: 0px; - margin: 0px; -} -.container { - width: 100vw; - height: 100vh; - background-image: url("background.jpeg"); - background-size: cover; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; -} -.beatbox { - width: 600px; - height: 600px; - background-color: #333333; - border-radius: 20px; - display: flex; - flex-direction: row; - justify-content: space-evenly; - align-items: center; - flex-wrap: wrap; -} -.beat { - color: white; - border: 1px solid #333333; - width: 150px; - height: 150px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; -} -.button { - width: 120px; - height: 120px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - font-size: 2em; - border-radius: 5px; - transition: 0.3s all; -} -.aqua { - border: 5px solid aqua; -} -.purple { - border: 5px solid #ff00ff; -} -.white { - border: 5px solid white; -} +body { + height: 100vh; + padding: 0px; + margin: 0px; +} +.container { + width: 100vw; + height: 100vh; + background-image: url("background.jpeg"); + background-size: cover; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} +.beatbox { + width: 600px; + height: 600px; + background-color: #333333; + border-radius: 20px; + display: flex; + flex-direction: row; + justify-content: space-evenly; + align-items: center; + flex-wrap: wrap; +} +.beat { + color: white; + border: 1px solid #333333; + width: 150px; + height: 150px; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} +.button { + width: 120px; + height: 120px; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + font-size: 2em; + border-radius: 5px; + transition: 0.3s all; +} +.aqua { + border: 5px solid aqua; +} +.purple { + border: 5px solid #ff00ff; +} +.white { + border: 5px solid white; +} diff --git a/5) JARVIS/app.js b/5) JARVIS/app.js index bc6ebbffd..384536409 100644 --- a/5) JARVIS/app.js +++ b/5) JARVIS/app.js @@ -1,89 +1,89 @@ -const btn = document.querySelector('.talk'); -const content = document.querySelector('.content'); - -// -const Hi = [ - 'Hi Sir', - 'Hi, good to see you sir.' -]; -const name = [ - 'Hi, my name is Jarvis', - 'Im Jarvis.' -]; -const more = [ - 'Im Jarvis the creation of Devraj. Devraj is a web developer and a programmer if you want to know more about him visit his personal website, devrajchatribin.netlify.app' -]; -const author = [ - 'Im Jarvis the creation of Devraj.', - 'Sir Devraj made me' -]; -const greetings = [ - 'Hi! Im good', - 'Im good, Hope you are good too', - 'leave me alone', - 'why do you even care?' -]; - -const weather = [ - 'weather is fine', - 'weather is fine but you need to stay home' -]; - -const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; -const recognition = new SpeechRecognition(); - -recognition.onstart = function () { - console.log('Jarvis is activated, you can speak to microphone.'); -} - -recognition.onresult = function (event) { - const current = event.resultIndex; - - const transcript = event.results[current][0].transcript; - content.textContent = transcript; - readOutLoud(transcript); -}; - -//add the listener to the btn - -btn.addEventListener('click', () => { - recognition.start(); -}); - -function readOutLoud(message) { - const speech = new SpeechSynthesisUtterance(); - - speech.text = 'i dont know what you said'; - - if (message.includes('hi')) { - const finalText = Hi[Math.floor(Math.random() * Hi.length)]; - speech.text = finalText; - } - if (message.includes('name')) { - const finalText = name[Math.floor(Math.random() * name.length)]; - speech.text = finalText; - } - if (message.includes('who made you')) { - const finalText = author[Math.floor(Math.random() * author.length)]; - speech.text = finalText; - } - if (message.includes('how are you')) { - const finalText = greetings[Math.floor(Math.random() * greetings.length)]; - speech.text = finalText; - } - if (message.includes('weather')) { - const finalText = weather[Math.floor(Math.random() * weather.length)]; - speech.text = finalText; - } - if (message.includes('about you')) { - const finalText = more[Math.floor(Math.random() * more.length)]; - speech.text = finalText; - } - - - speech.volume = 10; - speech.rate = 1; - speech.pitch = 1; - - window.speechSynthesis.speak(speech); +const btn = document.querySelector('.talk'); +const content = document.querySelector('.content'); + +// +const Hi = [ + 'Hi Sir', + 'Hi, good to see you sir.' +]; +const name = [ + 'Hi, my name is Jarvis', + 'Im Jarvis.' +]; +const more = [ + 'Im Jarvis the creation of Devraj. Devraj is a web developer and a programmer if you want to know more about him visit his personal website, devrajchatribin.netlify.app' +]; +const author = [ + 'Im Jarvis the creation of Devraj.', + 'Sir Devraj made me' +]; +const greetings = [ + 'Hi! Im good', + 'Im good, Hope you are good too', + 'leave me alone', + 'why do you even care?' +]; + +const weather = [ + 'weather is fine', + 'weather is fine but you need to stay home' +]; + +const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; +const recognition = new SpeechRecognition(); + +recognition.onstart = function () { + console.log('Jarvis is activated, you can speak to microphone.'); +} + +recognition.onresult = function (event) { + const current = event.resultIndex; + + const transcript = event.results[current][0].transcript; + content.textContent = transcript; + readOutLoud(transcript); +}; + +//add the listener to the btn + +btn.addEventListener('click', () => { + recognition.start(); +}); + +function readOutLoud(message) { + const speech = new SpeechSynthesisUtterance(); + + speech.text = 'i dont know what you said'; + + if (message.includes('hi')) { + const finalText = Hi[Math.floor(Math.random() * Hi.length)]; + speech.text = finalText; + } + if (message.includes('name')) { + const finalText = name[Math.floor(Math.random() * name.length)]; + speech.text = finalText; + } + if (message.includes('who made you')) { + const finalText = author[Math.floor(Math.random() * author.length)]; + speech.text = finalText; + } + if (message.includes('how are you')) { + const finalText = greetings[Math.floor(Math.random() * greetings.length)]; + speech.text = finalText; + } + if (message.includes('weather')) { + const finalText = weather[Math.floor(Math.random() * weather.length)]; + speech.text = finalText; + } + if (message.includes('about you')) { + const finalText = more[Math.floor(Math.random() * more.length)]; + speech.text = finalText; + } + + + speech.volume = 10; + speech.rate = 1; + speech.pitch = 1; + + window.speechSynthesis.speak(speech); } \ No newline at end of file diff --git a/5) JARVIS/index.html b/5) JARVIS/index.html index a52da52fa..2c8569175 100644 --- a/5) JARVIS/index.html +++ b/5) JARVIS/index.html @@ -1,190 +1,190 @@ - - - - - - - Jarvis - - - - -
-

Im Jarvis.
Lets have a conversation!

- -

- -
- - - - + + + + + + + Jarvis + + + + +
+

Im Jarvis.
Lets have a conversation!

+ +

+ +
+ + + + diff --git a/5) JARVIS/styles.css b/5) JARVIS/styles.css index 6bef39473..9f62dfdca 100644 --- a/5) JARVIS/styles.css +++ b/5) JARVIS/styles.css @@ -1,73 +1,73 @@ -*{ - margin: 0; - padding: 0; -} -body{ - background: black; - color: white; - text-align: center; -} -button{ - color: white; - margin: 5rem auto; - padding: 20px 40px; - text-decoration: none; - font-size: 2rem; - font-family: sans-serif; - - background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #6789ca), color-stop(1, #2b60a0) ); - background:-moz-linear-gradient( center top, #6184c5 5%, #235ba0 100% ); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7892c2', endColorstr='#476e9e'); - background-color:#6687c5; - -webkit-border-top-left-radius:40px; - -moz-border-radius-topleft:40px; - border-top-left-radius:40px; - -webkit-border-top-right-radius:40px; - -moz-border-radius-topright:40px; - border-top-right-radius:40px; - -webkit-border-bottom-right-radius:40px; - -moz-border-radius-bottomright:40px; - border-bottom-right-radius:40px; - -webkit-border-bottom-left-radius:40px; - -moz-border-radius-bottomleft:40px; - border-bottom-left-radius:40px; - - border:1px solid #1e3b92; - - text-align:center; - text-shadow:0px 1px 5px #0f1831; -} -button:hover{ - background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #2663ad), color-stop(1, #547bc4) ); - background:-moz-linear-gradient( center top, #1c59a3 5%, #537ac2 100% ); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#476e9e', endColorstr='#7892c2'); - background-color:#285fa3; -} -button:active{ - position:relative; - top:1px; -} -button::selection{ - background-color: none; - color: black; -} -h1{ - color: rgb(0, 174, 255); - font-family: sans-serif; -} -h1::selection{ - background: yellow; - color: black; -} -h3{ - font-size: 2rem; - font-family: sans-serif; - color: rgb(156, 156, 156); -} -h3::selection{ - background: yellow; - color: black; -} -.container{ - margin: 10rem auto; -} +*{ + margin: 0; + padding: 0; +} +body{ + background: black; + color: white; + text-align: center; +} +button{ + color: white; + margin: 5rem auto; + padding: 20px 40px; + text-decoration: none; + font-size: 2rem; + font-family: sans-serif; + + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #6789ca), color-stop(1, #2b60a0) ); + background:-moz-linear-gradient( center top, #6184c5 5%, #235ba0 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7892c2', endColorstr='#476e9e'); + background-color:#6687c5; + -webkit-border-top-left-radius:40px; + -moz-border-radius-topleft:40px; + border-top-left-radius:40px; + -webkit-border-top-right-radius:40px; + -moz-border-radius-topright:40px; + border-top-right-radius:40px; + -webkit-border-bottom-right-radius:40px; + -moz-border-radius-bottomright:40px; + border-bottom-right-radius:40px; + -webkit-border-bottom-left-radius:40px; + -moz-border-radius-bottomleft:40px; + border-bottom-left-radius:40px; + + border:1px solid #1e3b92; + + text-align:center; + text-shadow:0px 1px 5px #0f1831; +} +button:hover{ + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #2663ad), color-stop(1, #547bc4) ); + background:-moz-linear-gradient( center top, #1c59a3 5%, #537ac2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#476e9e', endColorstr='#7892c2'); + background-color:#285fa3; +} +button:active{ + position:relative; + top:1px; +} +button::selection{ + background-color: none; + color: black; +} +h1{ + color: rgb(0, 174, 255); + font-family: sans-serif; +} +h1::selection{ + background: yellow; + color: black; +} +h3{ + font-size: 2rem; + font-family: sans-serif; + color: rgb(156, 156, 156); +} +h3::selection{ + background: yellow; + color: black; +} +.container{ + margin: 10rem auto; +} diff --git a/ATM.c b/ATM.c index 98e152e81..3db69f822 100644 --- a/ATM.c +++ b/ATM.c @@ -1,14 +1,14 @@ -#include -int main() -{ - int withdraw; - float balance; - scanf(" %d",&withdraw ); - scanf(" %f",&balance ); - if(withdraw%5==0 && balance-withdraw-0.5>=0) - printf("%.2f\n",balance-withdraw-0.5 ); - else - printf("%.2f\n",balance ); - return 0; -} - +#include +int main() +{ + int withdraw; + float balance; + scanf(" %d",&withdraw ); + scanf(" %f",&balance ); + if(withdraw%5==0 && balance-withdraw-0.5>=0) + printf("%.2f\n",balance-withdraw-0.5 ); + else + printf("%.2f\n",balance ); + return 0; +} + diff --git a/AVL tree.c b/AVL tree.c index 428506422..e4fd1b4f1 100644 --- a/AVL tree.c +++ b/AVL tree.c @@ -1,491 +1,491 @@ - //geeksforgeeks -#include -#include - -typedef struct node{ - int i; - int h; - struct node *left; - struct node *right; -}node; - -node *search(node *root,int a) -{ - node *temp=root; - while(1) - { - if(temp=='\0') - return '\0'; - if(temp->i==a) - return temp; - if(ai) - temp=temp->left; - else - { - temp=temp->right; - } - } -} - -node *parent(node *root,int a) -{ - node *t=root; - node *p=root; - if(t->i==a) - return '\0'; - while(t->i!=a) - { - if(ai) - { - p=t; - t=t->left; - } - else - { - p=t; - t=t->right; - } - } - return p; -} - -int max(int lh,int rh) -{ - int ht=(lh>rh?lh:rh); - return ht; -} - -int height(node *root) -{ - if(root=='\0') - return 0; - return root->h; -} - -int balance(node *root) -{ - if(root=='\0') - return 0; - return (height(root->left)-height(root->right)); -} - -node *right_rotation(node *root) -{ - node *x,*y,*z; - x=root; - y=root->left; - z=y->right; - - y->right=x; - x->left=z; - x->h=1+max(height(x->left),height(x->right)); - y->h=1+max(height(y->left),height(y->right)); - return y; -} - -node *left_rotation(node *root) -{ - node *x,*y,*z; - x=root; - y=root->right; - z=y->left; - - y->left=x; - x->right=z; - x->h=1+max(height(x->left),height(x->right)); - y->h=1+max(height(y->left),height(y->right)); - return y; -} - -node *insert(node *root, int a) -{ - if(root=='\0') - { - node *new=(node *)malloc(sizeof(node)); - new->i=a; - new->h=1; - new->left='\0'; - new->right='\0'; - return new; - } - if(ai) - root->left=insert(root->left,a); - else - { - if(a>root->i) - root->right=insert(root->right,a); - else - return root; - } - root->h=1+max(height(root->left),height(root->right)); - int bf; - bf= balance(root); - - if(bf>1 && aleft->i) - { - return right_rotation(root); - } - if(bf>1 && a>root->left->i) - { - root->left=left_rotation(root->left); - return right_rotation(root); - } - if(bf<-1 && a>root->right->i) - { - return left_rotation(root); - } - if(bf<-1 && aright->i) - { - root->right=right_rotation(root->right); - return left_rotation(root); - } - return root; -} - -node *min(node *root) -{ - node *temp=root; - while(temp->left!='\0') - { - temp=temp->left; - } - return temp; -} - -node* delete(node* root, int a) -{ - if (root == NULL) - return root; - if ( a < root->i) - root->left = delete(root->left, a); - else if( a > root->i ) - root->right = delete(root->right, a); - else - { - if( (root->left == NULL) || (root->right == NULL) ) - { - node *temp = root->left?root->left:root->right; - if (temp == NULL) - { - temp = root; - root = NULL; - } - else - { - root->i=temp->i; - root->left='\0'; - root->right='\0'; - } - free(temp); - } - else - { - node* temp = min(root->right); - root->i= temp->i; - root->right = delete(root->right, temp->i); - } - } - if (root == NULL) - return root; - root->h = 1 + max(height(root->left),height(root->right)); - int bf = balance(root); - - if (bf > 1 && balance(root->left) >= 0) - return right_rotation(root); - - if (bf > 1 && balance(root->left) < 0) - { - root->left = left_rotation(root->left); - return right_rotation(root); - } - - if (bf < -1 && balance(root->right) <= 0) - return left_rotation(root); - - if (bf < -1 && balance(root->right) > 0) - { - root->right = right_rotation(root->right); - return left_rotation(root); - } - - return root; -} - -int depth(node *root,int a, node *t) -{ - int c=1; - while(t!=root) - { - t=parent(root,t->i); - c++; - } - return c; -} - -void inorder(node *root) -{ - if(root=='\0') - return; - inorder(root->left); - printf("%d ",root->i); - inorder(root->right); -} - -void preorder(node *root) -{ - if(root=='\0') - return; - printf("%d ",root->i); - preorder(root->left); - preorder(root->right); -} - -void postorder(node *root) -{ - if(root=='\0') - return; - postorder(root->left); - postorder(root->right); - printf("%d ",root->i); -} - -void levelprint(node *root,int a) -{ - if(root=='\0') - return; - if(a==1) - printf("%d ",root->i); - else - { - levelprint(root->left,a-1); - levelprint(root->right,a-1); - } -} - -void levelorder(node *root) -{ - int i,h; - h=height(root); - for(i=1;i<=h;i++) - { - levelprint(root,i); - } -} - -node *successor(node *root,int a,node *s) -{ - node *temp=s->right; - if(temp!='\0') - { - while(temp->left!='\0') - temp=temp->left; - return temp; - } - else - { - while(1) - { - s=parent(root,s->i); - if(s->i>a) - { - return s; - } - if(root==s) - return '\0'; - } - } -} - -node *predecessor(node *root,int a,node *s) -{ - node *temp=s->left; - if(temp!='\0') - { - while(temp->right!='\0') - temp=temp->right; - return temp; - } - else - { - while(1) - { - s=parent(root,s->i); - if(s->ii > t->i && root->i > s->i) - root=root->left; - else - if(root->i < t->i && root->i < s->i) - root=root->right; - else - break; - } - return root; -} - - -int main() -{ - node *root='\0',*t,*p,*q; - int a,j,n,m,b,h; - printf("1.insert an element in AVL tree\n"); - printf("2.Delete an element from the AVL tree\n"); - printf("3.Search an element from the given AVL tree\n"); - printf("4.inorder\n"); - printf("5.preorder\n"); - printf("6.postorder\n"); - printf("7.levelorder\n"); - printf("8.height of the AVL tree\n"); - printf("9.height of a given node of the AVL tree\n"); - printf("10.depth of a given node of the AVL tree\n"); - printf("11.predecessor of a given node of the AVL tree\n"); - printf("12.the successor of a given node of the AVL tree\n"); - printf("13.the least common ancestor of two given nodes of the AVL tree\n"); - printf("14.exit\n"); - while(1) - { - printf("enter the key for above operation = "); - scanf("%d",&n); - if(n==14) - break; - switch(n) - { - case 1: - printf("enter the element = "); - scanf("%d",&a); - root=insert(root,a); - printf("element is inserted\n"); - break; - case 2: - if(root=='\0') - { - printf("AVL tree is null"); - break; - } - printf("enter the element which you want to delete = "); - scanf("%d",&a); - t= search(root,a); - if(t=='\0'){ - printf("%d is not found in BST\n",a); - break;} - printf("%d is deleted",t->i); - root=delete(root,a); - break; - case 3: - printf("enter the element which you want to search = "); - scanf("%d",&a); - t=search(root,a); - if(t=='\0') - printf("%d is not found\n",a); - else - printf("%d is found",t->i); - break; - case 4: - if(root=='\0') - printf("tree is null"); - else - inorder(root); - break; - case 5: - if(root=='\0') - printf("tree is null"); - else - preorder(root); - break; - case 6: - if(root=='\0') - printf("tree is null"); - else - postorder(root); - break; - case 7: - if(root=='\0') - printf("tree is null"); - else - levelorder(root); - break; - case 8: - h=height(root); - if(h==0) - printf("tree is null"); - else - printf("the height of tree is %d",h); - break; - case 9: - printf("enter the element = "); - scanf("%d",&a); - t=search(root,a); - if(t=='\0') - printf("%d is not found",a); - else - printf("the height of element is %d",height(t)); - break; - case 10: - printf("enter the element = "); - scanf("%d",&a); - t=search(root,a); - if(t=='\0') - printf("%d is not found",a); - else - { - printf("the depth of element is %d",depth(root,a,t)); - } - break; - case 11: - printf("enter the element which you want to find predecessor = "); - scanf("%d",&a); - t=search(root,a); - if(t=='\0') - printf("%d is not found",a); - else{ - p=predecessor(root,a,t); - if(p=='\0') - printf("predecessor of %d does not exist",a); - else - printf("predecessor of %d is %d",a,p->i); - } - break; - case 12: - printf("enter the element which you want to find successor = "); - scanf("%d",&a); - t=search(root,a); - if(t=='\0') - printf("%d is not found",a); - else{ - p=successor(root,a,t); - if(p=='\0') - printf("successor of %d does not exist",a); - else - printf("successor of %d is %d",a,p->i); - } - break; - case 13: - printf("enter the elements\n"); - scanf("%d %d",&a,&b); - t=search(root,a); - p=search(root,b); - if(t=='\0'||p=='\0') - printf("lca can't be find"); - else - { - q=lca(root,t,p); - printf("%d is lca",q->i); - } - break; - } - printf("\n\n"); - } - return 0; -} + //geeksforgeeks +#include +#include + +typedef struct node{ + int i; + int h; + struct node *left; + struct node *right; +}node; + +node *search(node *root,int a) +{ + node *temp=root; + while(1) + { + if(temp=='\0') + return '\0'; + if(temp->i==a) + return temp; + if(ai) + temp=temp->left; + else + { + temp=temp->right; + } + } +} + +node *parent(node *root,int a) +{ + node *t=root; + node *p=root; + if(t->i==a) + return '\0'; + while(t->i!=a) + { + if(ai) + { + p=t; + t=t->left; + } + else + { + p=t; + t=t->right; + } + } + return p; +} + +int max(int lh,int rh) +{ + int ht=(lh>rh?lh:rh); + return ht; +} + +int height(node *root) +{ + if(root=='\0') + return 0; + return root->h; +} + +int balance(node *root) +{ + if(root=='\0') + return 0; + return (height(root->left)-height(root->right)); +} + +node *right_rotation(node *root) +{ + node *x,*y,*z; + x=root; + y=root->left; + z=y->right; + + y->right=x; + x->left=z; + x->h=1+max(height(x->left),height(x->right)); + y->h=1+max(height(y->left),height(y->right)); + return y; +} + +node *left_rotation(node *root) +{ + node *x,*y,*z; + x=root; + y=root->right; + z=y->left; + + y->left=x; + x->right=z; + x->h=1+max(height(x->left),height(x->right)); + y->h=1+max(height(y->left),height(y->right)); + return y; +} + +node *insert(node *root, int a) +{ + if(root=='\0') + { + node *new=(node *)malloc(sizeof(node)); + new->i=a; + new->h=1; + new->left='\0'; + new->right='\0'; + return new; + } + if(ai) + root->left=insert(root->left,a); + else + { + if(a>root->i) + root->right=insert(root->right,a); + else + return root; + } + root->h=1+max(height(root->left),height(root->right)); + int bf; + bf= balance(root); + + if(bf>1 && aleft->i) + { + return right_rotation(root); + } + if(bf>1 && a>root->left->i) + { + root->left=left_rotation(root->left); + return right_rotation(root); + } + if(bf<-1 && a>root->right->i) + { + return left_rotation(root); + } + if(bf<-1 && aright->i) + { + root->right=right_rotation(root->right); + return left_rotation(root); + } + return root; +} + +node *min(node *root) +{ + node *temp=root; + while(temp->left!='\0') + { + temp=temp->left; + } + return temp; +} + +node* delete(node* root, int a) +{ + if (root == NULL) + return root; + if ( a < root->i) + root->left = delete(root->left, a); + else if( a > root->i ) + root->right = delete(root->right, a); + else + { + if( (root->left == NULL) || (root->right == NULL) ) + { + node *temp = root->left?root->left:root->right; + if (temp == NULL) + { + temp = root; + root = NULL; + } + else + { + root->i=temp->i; + root->left='\0'; + root->right='\0'; + } + free(temp); + } + else + { + node* temp = min(root->right); + root->i= temp->i; + root->right = delete(root->right, temp->i); + } + } + if (root == NULL) + return root; + root->h = 1 + max(height(root->left),height(root->right)); + int bf = balance(root); + + if (bf > 1 && balance(root->left) >= 0) + return right_rotation(root); + + if (bf > 1 && balance(root->left) < 0) + { + root->left = left_rotation(root->left); + return right_rotation(root); + } + + if (bf < -1 && balance(root->right) <= 0) + return left_rotation(root); + + if (bf < -1 && balance(root->right) > 0) + { + root->right = right_rotation(root->right); + return left_rotation(root); + } + + return root; +} + +int depth(node *root,int a, node *t) +{ + int c=1; + while(t!=root) + { + t=parent(root,t->i); + c++; + } + return c; +} + +void inorder(node *root) +{ + if(root=='\0') + return; + inorder(root->left); + printf("%d ",root->i); + inorder(root->right); +} + +void preorder(node *root) +{ + if(root=='\0') + return; + printf("%d ",root->i); + preorder(root->left); + preorder(root->right); +} + +void postorder(node *root) +{ + if(root=='\0') + return; + postorder(root->left); + postorder(root->right); + printf("%d ",root->i); +} + +void levelprint(node *root,int a) +{ + if(root=='\0') + return; + if(a==1) + printf("%d ",root->i); + else + { + levelprint(root->left,a-1); + levelprint(root->right,a-1); + } +} + +void levelorder(node *root) +{ + int i,h; + h=height(root); + for(i=1;i<=h;i++) + { + levelprint(root,i); + } +} + +node *successor(node *root,int a,node *s) +{ + node *temp=s->right; + if(temp!='\0') + { + while(temp->left!='\0') + temp=temp->left; + return temp; + } + else + { + while(1) + { + s=parent(root,s->i); + if(s->i>a) + { + return s; + } + if(root==s) + return '\0'; + } + } +} + +node *predecessor(node *root,int a,node *s) +{ + node *temp=s->left; + if(temp!='\0') + { + while(temp->right!='\0') + temp=temp->right; + return temp; + } + else + { + while(1) + { + s=parent(root,s->i); + if(s->ii > t->i && root->i > s->i) + root=root->left; + else + if(root->i < t->i && root->i < s->i) + root=root->right; + else + break; + } + return root; +} + + +int main() +{ + node *root='\0',*t,*p,*q; + int a,j,n,m,b,h; + printf("1.insert an element in AVL tree\n"); + printf("2.Delete an element from the AVL tree\n"); + printf("3.Search an element from the given AVL tree\n"); + printf("4.inorder\n"); + printf("5.preorder\n"); + printf("6.postorder\n"); + printf("7.levelorder\n"); + printf("8.height of the AVL tree\n"); + printf("9.height of a given node of the AVL tree\n"); + printf("10.depth of a given node of the AVL tree\n"); + printf("11.predecessor of a given node of the AVL tree\n"); + printf("12.the successor of a given node of the AVL tree\n"); + printf("13.the least common ancestor of two given nodes of the AVL tree\n"); + printf("14.exit\n"); + while(1) + { + printf("enter the key for above operation = "); + scanf("%d",&n); + if(n==14) + break; + switch(n) + { + case 1: + printf("enter the element = "); + scanf("%d",&a); + root=insert(root,a); + printf("element is inserted\n"); + break; + case 2: + if(root=='\0') + { + printf("AVL tree is null"); + break; + } + printf("enter the element which you want to delete = "); + scanf("%d",&a); + t= search(root,a); + if(t=='\0'){ + printf("%d is not found in BST\n",a); + break;} + printf("%d is deleted",t->i); + root=delete(root,a); + break; + case 3: + printf("enter the element which you want to search = "); + scanf("%d",&a); + t=search(root,a); + if(t=='\0') + printf("%d is not found\n",a); + else + printf("%d is found",t->i); + break; + case 4: + if(root=='\0') + printf("tree is null"); + else + inorder(root); + break; + case 5: + if(root=='\0') + printf("tree is null"); + else + preorder(root); + break; + case 6: + if(root=='\0') + printf("tree is null"); + else + postorder(root); + break; + case 7: + if(root=='\0') + printf("tree is null"); + else + levelorder(root); + break; + case 8: + h=height(root); + if(h==0) + printf("tree is null"); + else + printf("the height of tree is %d",h); + break; + case 9: + printf("enter the element = "); + scanf("%d",&a); + t=search(root,a); + if(t=='\0') + printf("%d is not found",a); + else + printf("the height of element is %d",height(t)); + break; + case 10: + printf("enter the element = "); + scanf("%d",&a); + t=search(root,a); + if(t=='\0') + printf("%d is not found",a); + else + { + printf("the depth of element is %d",depth(root,a,t)); + } + break; + case 11: + printf("enter the element which you want to find predecessor = "); + scanf("%d",&a); + t=search(root,a); + if(t=='\0') + printf("%d is not found",a); + else{ + p=predecessor(root,a,t); + if(p=='\0') + printf("predecessor of %d does not exist",a); + else + printf("predecessor of %d is %d",a,p->i); + } + break; + case 12: + printf("enter the element which you want to find successor = "); + scanf("%d",&a); + t=search(root,a); + if(t=='\0') + printf("%d is not found",a); + else{ + p=successor(root,a,t); + if(p=='\0') + printf("successor of %d does not exist",a); + else + printf("successor of %d is %d",a,p->i); + } + break; + case 13: + printf("enter the elements\n"); + scanf("%d %d",&a,&b); + t=search(root,a); + p=search(root,b); + if(t=='\0'||p=='\0') + printf("lca can't be find"); + else + { + q=lca(root,t,p); + printf("%d is lca",q->i); + } + break; + } + printf("\n\n"); + } + return 0; +} diff --git a/ArrayElementFrequency.java b/ArrayElementFrequency.java index 00d87fdfd..467ecd752 100644 --- a/ArrayElementFrequency.java +++ b/ArrayElementFrequency.java @@ -1,50 +1,50 @@ -import java.io.*; -import java.math.*; -import java.security.*; -import java.text.*; -import java.util.*; -import java.util.concurrent.*; -import java.util.regex.*; - -public class ArrayElementFrequency { - - // Complete the sockMerchant function below. - static int sockMerchant(int n, int[] ar) { - Arrays.sort(ar); - int sum=0, cnt=0, as=0; - for(int i=0;i -#include -#include -using namespace std; - -#define ll long long int - -#define OJ \ - freopen("input.txt", "r", stdin); \ - freopen("output.txt", "w", stdout); -#define FIO \ - ios_base::sync_with_stdio(false); \ - cin.tie(NULL); \ - cout.tie(NULL); - -bool visited[100001] = {false}; -list adj[100001]; - -void dfs(int index, list *adj){ - visited[index] = true; - for(auto a: adj[index]){ - if(visited[a] == false){ - dfs(a, adj); - } - } -} - - -int main() -{ - OJ; - FIO; - int n, r; - cin >> n >> r; - int a, b; - for(int i=0; i> a >> b; - adj[a].push_back(b); - adj[b].push_back(a); - } - - vector ans; - for(int i=1; i<=n; i++){ - if(visited[i] == false){ - ans.push_back(i); - dfs(i, adj); - } - } - - cout << ans.size()-1 << endl; - for(int i=1; i +#include +#include +using namespace std; + +#define ll long long int + +#define OJ \ + freopen("input.txt", "r", stdin); \ + freopen("output.txt", "w", stdout); +#define FIO \ + ios_base::sync_with_stdio(false); \ + cin.tie(NULL); \ + cout.tie(NULL); + +bool visited[100001] = {false}; +list adj[100001]; + +void dfs(int index, list *adj){ + visited[index] = true; + for(auto a: adj[index]){ + if(visited[a] == false){ + dfs(a, adj); + } + } +} + + +int main() +{ + OJ; + FIO; + int n, r; + cin >> n >> r; + int a, b; + for(int i=0; i> a >> b; + adj[a].push_back(b); + adj[b].push_back(a); + } + + vector ans; + for(int i=1; i<=n; i++){ + if(visited[i] == false){ + ans.push_back(i); + dfs(i, adj); + } + } + + cout << ans.size()-1 << endl; + for(int i=1; i -#include -#include -#include -#include -using namespace std; - -#define ll long long int - -#define OJ \ - freopen("input.txt", "r", stdin); \ - freopen("output.txt", "w", stdout); -#define FIO \ - ios_base::sync_with_stdio(false); \ - cin.tie(NULL); \ - cout.tie(NULL); - -bool visited[100001] = {false}; -list adj[100001]; -int color[100001]; -int n, m; - -bool dfs(int u, int c, int par) -{ - visited[u] = true; - color[u] = c; - for (auto a : adj[u]) - { - if (visited[a] == false) - { - if (color[a] == 0) - { - if (!dfs(a, color[u] ^ 3, u)) - { - return false; - } - } - if (color[a] == color[u]) - { - return false; - } - } - } - - return true; -} - -bool color_all() -{ - for (int i = 1; i <= n; i++) - { - if (visited[i] == false) - { - if (!dfs(i, 1, -1)) - { - return false; - } - } - } - - return true; -} - -int main() -{ - OJ; - FIO; - cin >> n >> m; - for (int i = 0; i < m; i++) - { - int a, b; - cin >> a >> b; - adj[a].push_back(b); - adj[b].push_back(a); - } - - if (color_all()) - { - for (int i = 1; i <= n; i++) - { - cout << color[i] << " "; - } - } - else - { - cout << "IMPOSSIBLE" << endl; - } -} +#include +#include +#include +#include +#include +using namespace std; + +#define ll long long int + +#define OJ \ + freopen("input.txt", "r", stdin); \ + freopen("output.txt", "w", stdout); +#define FIO \ + ios_base::sync_with_stdio(false); \ + cin.tie(NULL); \ + cout.tie(NULL); + +bool visited[100001] = {false}; +list adj[100001]; +int color[100001]; +int n, m; + +bool dfs(int u, int c, int par) +{ + visited[u] = true; + color[u] = c; + for (auto a : adj[u]) + { + if (visited[a] == false) + { + if (color[a] == 0) + { + if (!dfs(a, color[u] ^ 3, u)) + { + return false; + } + } + if (color[a] == color[u]) + { + return false; + } + } + } + + return true; +} + +bool color_all() +{ + for (int i = 1; i <= n; i++) + { + if (visited[i] == false) + { + if (!dfs(i, 1, -1)) + { + return false; + } + } + } + + return true; +} + +int main() +{ + OJ; + FIO; + cin >> n >> m; + for (int i = 0; i < m; i++) + { + int a, b; + cin >> a >> b; + adj[a].push_back(b); + adj[b].push_back(a); + } + + if (color_all()) + { + for (int i = 1; i <= n; i++) + { + cout << color[i] << " "; + } + } + else + { + cout << "IMPOSSIBLE" << endl; + } +} diff --git a/C++/Memory Game - 1.cpp b/C++/Memory Game - 1.cpp index 8250f0ea7..75a3eaeba 100644 --- a/C++/Memory Game - 1.cpp +++ b/C++/Memory Game - 1.cpp @@ -1,448 +1,448 @@ - -// September 30, 2020 - -/*We will be creating a program that simulates a simple memory game.In this memory game, a grid of face -down cards is created.Every element of the grid has a matching pair.The user's goal is to find the -location of all pairs.For example, -1 4 3 -2 3 1 -4 2 5 -6 6 5 -For every iteration of a loop, the grid is displayed, and the user is prompted to enter two coordinates; x -and y.where x is for rowand y is for column. -For example, the coordinates could be(row, column) and start at 0. -(0, 0) (0, 1) (0, 2) -(1, 0) (1, 1) (1, 2) -(2, 0) (2, 1) (2, 2) -(3, 0) (3, 1) (3, 2) -Once the coordinates are entered, the two cards at the corresponding coordinates will be compared to each -other -1) If the cards match each other, the user has found a pair, so we keep them flipped over -2) If the cards do not match, we temporarily show the user the values of the cards at the coordinates, -and then we flip the cards over again -This loop should continue until the user finds all the pairs, or until they choose to quit. -*/ - -#include -#include -#include -#include - -const int LENGTH = 4; -using namespace std; - -// Function prototypes - -void InitializeCards(int cards[][LENGTH]); -void ShowCards(int cards[][LENGTH], bool faceup[][LENGTH]); -void winCondition(bool faceup[][LENGTH], bool win); -void MatchCheck(int cards[][LENGTH], bool faceup[][LENGTH], int row1, int row2, int col1, int col2); -// you may have more function prototypes -// ====================== -// InitializeCards -// Places pairs of numbers in the 2D array and then -// randomly shuffles them. -// ====================== -//Notice that when you pass a 2D-array to a function, you MUST specify the number of columns -void InitializeCards(int cards[][LENGTH]) -{ - //seed rand() - remember to always do this before using rand() - // also make sure to include the library. - srand(time(NULL)); - int x1, y1, x2, y2; - int i; - int temp; - - // Place pairs in known locations - this is how our array looks like after - cards[0][0] = 1; cards[0][1] = 1;// 1 1 2 2 - cards[0][2] = 2; cards[0][3] = 2; - cards[1][0] = 3; cards[1][1] = 3;// 3 3 4 4 - cards[1][2] = 4; cards[1][3] = 4; - cards[2][0] = 5; cards[2][1] = 5;// 5 5 6 6 - cards[2][2] = 6; cards[2][3] = 6; - cards[3][0] = 7; cards[3][1] = 7;// 7 7 8 8 - cards[3][2] = 8; cards[3][3] = 8; - - // Now that 2D has been initialized with 8 pairs, we want to shuffle the board so - // that the pairs aren't right next to each other - for (int i = 0; i < 30; i++) { - //Get set of random coordinates and swap - //First random coordinate on our 2d "grid" - y1 = rand() % LENGTH; - x1 = rand() % LENGTH; - //Second random coordinate of our 2d "grid" - y2 = rand() % LENGTH; - x2 = rand() % LENGTH; - - //Now we swap value at (x1, y1) with value at(x2, y2) - temp = cards[x1][y1]; - cards[x1][y1] = cards[x2][y2]; - cards[x2][y2] = temp; - //Note: just like with 1D arrays, modifying an n-dimensional array inside - // a function will change the array itself - } -} - - - -// ====================== -// main function -// ====================== -int main() -{ - // 1) Welcome the user and ask him to enter his full name. - - cout << "Hello User! Please enter your name: "; // add your code here - - string username; - getline(cin, username); //Read user input: full name - - - - // 2) Create a two 2D array that will hold the number for each card. Pass it to - // InitializeCards function. - - int cardNumber[LENGTH][LENGTH]; - InitializeCards(cardNumber); // add your code here - - // 3) Create the 2D array of Booleans that represents whether or not the card is matched. - // This should be initialized to all FALSE at first. - - bool match[LENGTH][LENGTH]; - for (int i = 0; i < LENGTH; ++i) { - for (int j = 0; j < LENGTH; ++j) { - match[i][j] = false; - } - }// add your code here - - // 4) while the game is not over : - - int row1 = 0; - int row2 = 0; //holds user input for coordinates - int col1 = 0; - int col2 = 0; - // Display the current state of the game board. Remember that non-matched pairs should be "facedown" - // and that matched pairs should be "faceup" - - cout << "Greetings, " << username << endl; - cout << "Welcome to the Matching Pair game!" << endl; - cout << "Note: You will be given an option to continue the game or not after you enter the coordinates" << endl << endl; - - // add your code here - - char quitVal = 'Y'; - int turns = 0; //holds the value for how many turns the user takes - bool win = false; //holds the boolean value if the user has won the game. If the value changes to true that means the user has won - - ShowCards(cardNumber, match); - cout << endl << endl; - - while (quitVal != 'N' && quitVal != 'n') { - { - - cout << "Please enter the row of the first coordinate: ";// Prompt the user to enter the coordinates of two cards - cin >> row1; - while(row1 >= 4 || row1 < 0){ - cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; - cout << "Please enter the row of the first coordinate: "; - cin >> row1; - } - cout << "Please enter the column of the first coordinate: "; - cin >> col1; - while (col1 >= 4 || col1 < 0) { - cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; - cout << "Please enter the column of the first coordinate: "; - cin >> col1; - } - - cout << "Please enter the row of the second coordinate: "; - cin >> row2; - while (row2 >= 4 || row2 < 0) { - cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; - cout << "Please enter the row of the second coordinate: "; - cin >> row2; - } - cout << "Please enter the column of the second coordinate: "; - cin >> col2; - while (col2 >= 4 || col2 < 0) { - cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; - cout << "Please enter the column of the second coordinate: "; - cin >> col2; - } - - turns++; - MatchCheck(cardNumber, match, row1, row2, col1, col2);//Checks if values in the coordinates match. if they do match will be set to true. - winCondition(match, win); //Prints out the table. a " * " will be printed out if (match = false) and the values in the coordinates if (match = true) - - } - cout << "\n\nEnter 'n' or 'N' to quit or enter 'Y' to continue..." << endl; - cin >> quitVal; //Lets the user choose to continue or quit the game - if (quitVal != 'n' && quitVal != 'N') - { - cout << "Flipping cards over...\n" << endl; - ShowCards(cardNumber, match); - cout << endl << endl; - } - - }// Note: user can choose to quit - - // 5) Save the user’s name and how many turns it took to win the game into an output text file. If he quits - // before winning save “Don’t give up” message in the file. - - ofstream userFile; //creates an object called userFile for data to be inputted in - userFile.open("userFile.txt"); //creates a file in the directory called "userFile.txt" - - userFile << username << endl << "Turns taken: " << turns << endl; //prints into the file the name of the user and how many turns they took - if (win == false) //prints into the file "Don't give up" if the user exits before winning - userFile << "Don't give up" << endl; - else if (win == true) //prints into the file a congratulations message if the user wins the game - userFile << "Congratulations! You won the Matching pair game!" << endl; - userFile.close(); - // add your code here -} - -// ====================== -// ShowCards -// Generates a display on the screen. If faceup=false, -// an * is output, otherwise the card in that slot is output. -// ====================== -void ShowCards(int cards[][LENGTH], bool faceup[][LENGTH]) { - - cout << " 0 1 2 3 " << endl; //Creates header - cout << "==================" << endl; - for (int i = 0; i < LENGTH; ++i) { - cout << i << " | "; //Creates border on the left side for each row - for (int j = 0; j < LENGTH; ++j) { - if (faceup[i][j] == false) //Shows unmatched "facedown" cards - cout << " * "; - else if (faceup[i][j] == true) //Shows matched "faceup" cards. - cout << " " << cards[i][j] << " "; - } - cout << " | " << endl; //Creates border on the right side for each row - }// add your code here -} - -// ====================== -// MatchCheck -// This function will check if the coordinates inputted by the user have matching values. -// This function will also check the validity of the user's input. -// If the values dont match the cards will only be temporarily "flipped over" -// ====================== - -void MatchCheck(int cards[][LENGTH], bool faceup[][LENGTH], int row1, int row2, int col1, int col2) { - if (row1 == row2 && col1 == col2) // Prevents the card being flipped over when the user enters the same coordinates twice - { - cout << "INVALID INPUT! You entered the same coordinate twice! Please try again!" << endl; - faceup[row1][col1] = false; - } - else if (cards[row1][col1] == cards[row2][col2]) - { - cout << "Match found!" << endl; // If the values of the two coordinates match : - // say that a match has been found and flip the cards over forever - faceup[row1][col1] = true; // add your code here - faceup[row2][col2] = true; - } - else if (faceup[row1][col1] == true && faceup[row2][col2] == false) //Prevents matched cards from being facedown again due to user input - { - cout << "INVALID INPUT! You entered a coordinate that is already matched! Please try again!" << endl; - faceup[row1][col1] = true; - } - else if (faceup[row1][col1] == false && faceup[row2][col2] == true) //Prevents matched cards from being facedown again due to user input - { - cout << "INVALID INPUT! You entered a coordinate that is already matched! Please try again!" << endl; - faceup[row2][col2] = true; - } - else if (cards[row1][col1] != cards[row2][col2]) - { - cout << "\n\nMismatch! Please try again!" << endl; - faceup[row1][col1] = true; //Flips cards "open" or "faceup" - faceup[row2][col2] = true; // - cout << " 0 1 2 3 " << endl; - cout << "==================" << endl; - for (int i = 0; i < LENGTH; ++i) { - cout << i << " | "; //Creates border on the left side for each row - for (int j = 0; j < LENGTH; ++j) { - if (faceup[i][j] == false) //Prints out "*" for cards not selected by user - cout << " * "; - else if (faceup[i][j] == true) //Flips over (faceup) cards selected by user - cout << " " << cards[i][j] << " "; - } - cout << " | " << endl; //Creates border on the right side for each row - } - faceup[row1][col1] = false; //Flips cards "close" or "facedown" after revealing values to user - faceup[row2][col2] = false; // - } - -} - -// ====================== -// winCondition -// This function will keep track of the users progress within the game and will let them know if he/she has won. -// -// ====================== - -void winCondition(bool faceup[][LENGTH], bool win) { - int i = 0; - int j = 0; - int trueCounter = 0; - - while (i < LENGTH && j < LENGTH) - { - for (i = 0; i < LENGTH; ++i) - { - for (j = 0; j < LENGTH; ++j) - { - if (faceup[i][j] == true) - trueCounter++; - } - } - } - - int pairCounter = trueCounter / 2; - - if (trueCounter == 8) { - cout << "Congratulations! You have won the game!" << endl; - win = true; - } - else if (trueCounter < 8) - cout << "\n\nIt's alright! Keep going you'll get there soon! You have " << pairCounter << " out of 8 matched pairs so far!" << endl; - - -} -/* START OF SAMPLE RUN -Hello User! Please enter your name: Ferdz Duterte -Greetings, Ferdz Duterte -Welcome to the Matching Pair game! -Note: You will be given an option to continue the game or not after you enter the coordinates - - 0 1 2 3 -================== -0 | * * * * | -1 | * * * * | -2 | * * * * | -3 | * * * * | - - -Please enter the row of the first coordinate: 0 -Please enter the column of the first coordinate: 0 -Please enter the row of the second coordinate: 1 -Please enter the column of the second coordinate: 1 - - -Mismatch! Please try again! - 0 1 2 3 -================== -0 | 3 * * * | -1 | * 1 * * | -2 | * * * * | -3 | * * * * | - - -It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! - - -Enter 'n' or 'N' to quit or enter 'Y' to continue... -Y -Flipping cards over... - - 0 1 2 3 -================== -0 | * * * * | -1 | * * * * | -2 | * * * * | -3 | * * * * | - - -Please enter the row of the first coordinate: -2 -INVALID INPUT! Please enter coordinates between 0 to 3 -Please enter the row of the first coordinate: 1 -Please enter the column of the first coordinate: -2 -INVALID INPUT! Please enter coordinates between 0 to 3 -Please enter the column of the first coordinate: 3 -Please enter the row of the second coordinate: 1 -Please enter the column of the second coordinate: 4 -INVALID INPUT! Please enter coordinates between 0 to 3 -Please enter the column of the second coordinate: 1 - - -Mismatch! Please try again! - 0 1 2 3 -================== -0 | * * * * | -1 | * 1 * 4 | -2 | * * * * | -3 | * * * * | - - -It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! - - -Enter 'n' or 'N' to quit or enter 'Y' to continue... -Y -Flipping cards over... - - 0 1 2 3 -================== -0 | * * * * | -1 | * * * * | -2 | * * * * | -3 | * * * * | - - -Please enter the row of the first coordinate: 3 -Please enter the column of the first coordinate: 1 -Please enter the row of the second coordinate: 2 -Please enter the column of the second coordinate: 2 - - -Mismatch! Please try again! - 0 1 2 3 -================== -0 | * * * * | -1 | * * * * | -2 | * * 5 * | -3 | * 6 * * | - - -It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! - - -Enter 'n' or 'N' to quit or enter 'Y' to continue... -Y -Flipping cards over... - - 0 1 2 3 -================== -0 | * * * * | -1 | * * * * | -2 | * * * * | -3 | * * * * | - - -Please enter the row of the first coordinate: 2 -Please enter the column of the first coordinate: 1 -Please enter the row of the second coordinate: 0 -Please enter the column of the second coordinate: 2 - - -Mismatch! Please try again! - 0 1 2 3 -================== -0 | * * 1 * | -1 | * * * * | -2 | * 4 * * | -3 | * * * * | - - -It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! - - -Enter 'n' or 'N' to quit or enter 'Y' to continue... -n - -C:\Users\ferdz\source\repos\Assign1\Debug\Assign1.exe (process 15808) exited with code 0. -To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. -Press any key to close this window . . . - -END OF SAMPLE RUN + +// September 30, 2020 + +/*We will be creating a program that simulates a simple memory game.In this memory game, a grid of face +down cards is created.Every element of the grid has a matching pair.The user's goal is to find the +location of all pairs.For example, +1 4 3 +2 3 1 +4 2 5 +6 6 5 +For every iteration of a loop, the grid is displayed, and the user is prompted to enter two coordinates; x +and y.where x is for rowand y is for column. +For example, the coordinates could be(row, column) and start at 0. +(0, 0) (0, 1) (0, 2) +(1, 0) (1, 1) (1, 2) +(2, 0) (2, 1) (2, 2) +(3, 0) (3, 1) (3, 2) +Once the coordinates are entered, the two cards at the corresponding coordinates will be compared to each +other +1) If the cards match each other, the user has found a pair, so we keep them flipped over +2) If the cards do not match, we temporarily show the user the values of the cards at the coordinates, +and then we flip the cards over again +This loop should continue until the user finds all the pairs, or until they choose to quit. +*/ + +#include +#include +#include +#include + +const int LENGTH = 4; +using namespace std; + +// Function prototypes + +void InitializeCards(int cards[][LENGTH]); +void ShowCards(int cards[][LENGTH], bool faceup[][LENGTH]); +void winCondition(bool faceup[][LENGTH], bool win); +void MatchCheck(int cards[][LENGTH], bool faceup[][LENGTH], int row1, int row2, int col1, int col2); +// you may have more function prototypes +// ====================== +// InitializeCards +// Places pairs of numbers in the 2D array and then +// randomly shuffles them. +// ====================== +//Notice that when you pass a 2D-array to a function, you MUST specify the number of columns +void InitializeCards(int cards[][LENGTH]) +{ + //seed rand() - remember to always do this before using rand() + // also make sure to include the library. + srand(time(NULL)); + int x1, y1, x2, y2; + int i; + int temp; + + // Place pairs in known locations - this is how our array looks like after + cards[0][0] = 1; cards[0][1] = 1;// 1 1 2 2 + cards[0][2] = 2; cards[0][3] = 2; + cards[1][0] = 3; cards[1][1] = 3;// 3 3 4 4 + cards[1][2] = 4; cards[1][3] = 4; + cards[2][0] = 5; cards[2][1] = 5;// 5 5 6 6 + cards[2][2] = 6; cards[2][3] = 6; + cards[3][0] = 7; cards[3][1] = 7;// 7 7 8 8 + cards[3][2] = 8; cards[3][3] = 8; + + // Now that 2D has been initialized with 8 pairs, we want to shuffle the board so + // that the pairs aren't right next to each other + for (int i = 0; i < 30; i++) { + //Get set of random coordinates and swap + //First random coordinate on our 2d "grid" + y1 = rand() % LENGTH; + x1 = rand() % LENGTH; + //Second random coordinate of our 2d "grid" + y2 = rand() % LENGTH; + x2 = rand() % LENGTH; + + //Now we swap value at (x1, y1) with value at(x2, y2) + temp = cards[x1][y1]; + cards[x1][y1] = cards[x2][y2]; + cards[x2][y2] = temp; + //Note: just like with 1D arrays, modifying an n-dimensional array inside + // a function will change the array itself + } +} + + + +// ====================== +// main function +// ====================== +int main() +{ + // 1) Welcome the user and ask him to enter his full name. + + cout << "Hello User! Please enter your name: "; // add your code here + + string username; + getline(cin, username); //Read user input: full name + + + + // 2) Create a two 2D array that will hold the number for each card. Pass it to + // InitializeCards function. + + int cardNumber[LENGTH][LENGTH]; + InitializeCards(cardNumber); // add your code here + + // 3) Create the 2D array of Booleans that represents whether or not the card is matched. + // This should be initialized to all FALSE at first. + + bool match[LENGTH][LENGTH]; + for (int i = 0; i < LENGTH; ++i) { + for (int j = 0; j < LENGTH; ++j) { + match[i][j] = false; + } + }// add your code here + + // 4) while the game is not over : + + int row1 = 0; + int row2 = 0; //holds user input for coordinates + int col1 = 0; + int col2 = 0; + // Display the current state of the game board. Remember that non-matched pairs should be "facedown" + // and that matched pairs should be "faceup" + + cout << "Greetings, " << username << endl; + cout << "Welcome to the Matching Pair game!" << endl; + cout << "Note: You will be given an option to continue the game or not after you enter the coordinates" << endl << endl; + + // add your code here + + char quitVal = 'Y'; + int turns = 0; //holds the value for how many turns the user takes + bool win = false; //holds the boolean value if the user has won the game. If the value changes to true that means the user has won + + ShowCards(cardNumber, match); + cout << endl << endl; + + while (quitVal != 'N' && quitVal != 'n') { + { + + cout << "Please enter the row of the first coordinate: ";// Prompt the user to enter the coordinates of two cards + cin >> row1; + while(row1 >= 4 || row1 < 0){ + cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; + cout << "Please enter the row of the first coordinate: "; + cin >> row1; + } + cout << "Please enter the column of the first coordinate: "; + cin >> col1; + while (col1 >= 4 || col1 < 0) { + cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; + cout << "Please enter the column of the first coordinate: "; + cin >> col1; + } + + cout << "Please enter the row of the second coordinate: "; + cin >> row2; + while (row2 >= 4 || row2 < 0) { + cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; + cout << "Please enter the row of the second coordinate: "; + cin >> row2; + } + cout << "Please enter the column of the second coordinate: "; + cin >> col2; + while (col2 >= 4 || col2 < 0) { + cout << "INVALID INPUT! Please enter coordinates between 0 to 3" << endl; + cout << "Please enter the column of the second coordinate: "; + cin >> col2; + } + + turns++; + MatchCheck(cardNumber, match, row1, row2, col1, col2);//Checks if values in the coordinates match. if they do match will be set to true. + winCondition(match, win); //Prints out the table. a " * " will be printed out if (match = false) and the values in the coordinates if (match = true) + + } + cout << "\n\nEnter 'n' or 'N' to quit or enter 'Y' to continue..." << endl; + cin >> quitVal; //Lets the user choose to continue or quit the game + if (quitVal != 'n' && quitVal != 'N') + { + cout << "Flipping cards over...\n" << endl; + ShowCards(cardNumber, match); + cout << endl << endl; + } + + }// Note: user can choose to quit + + // 5) Save the user’s name and how many turns it took to win the game into an output text file. If he quits + // before winning save “Don’t give up” message in the file. + + ofstream userFile; //creates an object called userFile for data to be inputted in + userFile.open("userFile.txt"); //creates a file in the directory called "userFile.txt" + + userFile << username << endl << "Turns taken: " << turns << endl; //prints into the file the name of the user and how many turns they took + if (win == false) //prints into the file "Don't give up" if the user exits before winning + userFile << "Don't give up" << endl; + else if (win == true) //prints into the file a congratulations message if the user wins the game + userFile << "Congratulations! You won the Matching pair game!" << endl; + userFile.close(); + // add your code here +} + +// ====================== +// ShowCards +// Generates a display on the screen. If faceup=false, +// an * is output, otherwise the card in that slot is output. +// ====================== +void ShowCards(int cards[][LENGTH], bool faceup[][LENGTH]) { + + cout << " 0 1 2 3 " << endl; //Creates header + cout << "==================" << endl; + for (int i = 0; i < LENGTH; ++i) { + cout << i << " | "; //Creates border on the left side for each row + for (int j = 0; j < LENGTH; ++j) { + if (faceup[i][j] == false) //Shows unmatched "facedown" cards + cout << " * "; + else if (faceup[i][j] == true) //Shows matched "faceup" cards. + cout << " " << cards[i][j] << " "; + } + cout << " | " << endl; //Creates border on the right side for each row + }// add your code here +} + +// ====================== +// MatchCheck +// This function will check if the coordinates inputted by the user have matching values. +// This function will also check the validity of the user's input. +// If the values dont match the cards will only be temporarily "flipped over" +// ====================== + +void MatchCheck(int cards[][LENGTH], bool faceup[][LENGTH], int row1, int row2, int col1, int col2) { + if (row1 == row2 && col1 == col2) // Prevents the card being flipped over when the user enters the same coordinates twice + { + cout << "INVALID INPUT! You entered the same coordinate twice! Please try again!" << endl; + faceup[row1][col1] = false; + } + else if (cards[row1][col1] == cards[row2][col2]) + { + cout << "Match found!" << endl; // If the values of the two coordinates match : + // say that a match has been found and flip the cards over forever + faceup[row1][col1] = true; // add your code here + faceup[row2][col2] = true; + } + else if (faceup[row1][col1] == true && faceup[row2][col2] == false) //Prevents matched cards from being facedown again due to user input + { + cout << "INVALID INPUT! You entered a coordinate that is already matched! Please try again!" << endl; + faceup[row1][col1] = true; + } + else if (faceup[row1][col1] == false && faceup[row2][col2] == true) //Prevents matched cards from being facedown again due to user input + { + cout << "INVALID INPUT! You entered a coordinate that is already matched! Please try again!" << endl; + faceup[row2][col2] = true; + } + else if (cards[row1][col1] != cards[row2][col2]) + { + cout << "\n\nMismatch! Please try again!" << endl; + faceup[row1][col1] = true; //Flips cards "open" or "faceup" + faceup[row2][col2] = true; // + cout << " 0 1 2 3 " << endl; + cout << "==================" << endl; + for (int i = 0; i < LENGTH; ++i) { + cout << i << " | "; //Creates border on the left side for each row + for (int j = 0; j < LENGTH; ++j) { + if (faceup[i][j] == false) //Prints out "*" for cards not selected by user + cout << " * "; + else if (faceup[i][j] == true) //Flips over (faceup) cards selected by user + cout << " " << cards[i][j] << " "; + } + cout << " | " << endl; //Creates border on the right side for each row + } + faceup[row1][col1] = false; //Flips cards "close" or "facedown" after revealing values to user + faceup[row2][col2] = false; // + } + +} + +// ====================== +// winCondition +// This function will keep track of the users progress within the game and will let them know if he/she has won. +// +// ====================== + +void winCondition(bool faceup[][LENGTH], bool win) { + int i = 0; + int j = 0; + int trueCounter = 0; + + while (i < LENGTH && j < LENGTH) + { + for (i = 0; i < LENGTH; ++i) + { + for (j = 0; j < LENGTH; ++j) + { + if (faceup[i][j] == true) + trueCounter++; + } + } + } + + int pairCounter = trueCounter / 2; + + if (trueCounter == 8) { + cout << "Congratulations! You have won the game!" << endl; + win = true; + } + else if (trueCounter < 8) + cout << "\n\nIt's alright! Keep going you'll get there soon! You have " << pairCounter << " out of 8 matched pairs so far!" << endl; + + +} +/* START OF SAMPLE RUN +Hello User! Please enter your name: Ferdz Duterte +Greetings, Ferdz Duterte +Welcome to the Matching Pair game! +Note: You will be given an option to continue the game or not after you enter the coordinates + + 0 1 2 3 +================== +0 | * * * * | +1 | * * * * | +2 | * * * * | +3 | * * * * | + + +Please enter the row of the first coordinate: 0 +Please enter the column of the first coordinate: 0 +Please enter the row of the second coordinate: 1 +Please enter the column of the second coordinate: 1 + + +Mismatch! Please try again! + 0 1 2 3 +================== +0 | 3 * * * | +1 | * 1 * * | +2 | * * * * | +3 | * * * * | + + +It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! + + +Enter 'n' or 'N' to quit or enter 'Y' to continue... +Y +Flipping cards over... + + 0 1 2 3 +================== +0 | * * * * | +1 | * * * * | +2 | * * * * | +3 | * * * * | + + +Please enter the row of the first coordinate: -2 +INVALID INPUT! Please enter coordinates between 0 to 3 +Please enter the row of the first coordinate: 1 +Please enter the column of the first coordinate: -2 +INVALID INPUT! Please enter coordinates between 0 to 3 +Please enter the column of the first coordinate: 3 +Please enter the row of the second coordinate: 1 +Please enter the column of the second coordinate: 4 +INVALID INPUT! Please enter coordinates between 0 to 3 +Please enter the column of the second coordinate: 1 + + +Mismatch! Please try again! + 0 1 2 3 +================== +0 | * * * * | +1 | * 1 * 4 | +2 | * * * * | +3 | * * * * | + + +It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! + + +Enter 'n' or 'N' to quit or enter 'Y' to continue... +Y +Flipping cards over... + + 0 1 2 3 +================== +0 | * * * * | +1 | * * * * | +2 | * * * * | +3 | * * * * | + + +Please enter the row of the first coordinate: 3 +Please enter the column of the first coordinate: 1 +Please enter the row of the second coordinate: 2 +Please enter the column of the second coordinate: 2 + + +Mismatch! Please try again! + 0 1 2 3 +================== +0 | * * * * | +1 | * * * * | +2 | * * 5 * | +3 | * 6 * * | + + +It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! + + +Enter 'n' or 'N' to quit or enter 'Y' to continue... +Y +Flipping cards over... + + 0 1 2 3 +================== +0 | * * * * | +1 | * * * * | +2 | * * * * | +3 | * * * * | + + +Please enter the row of the first coordinate: 2 +Please enter the column of the first coordinate: 1 +Please enter the row of the second coordinate: 0 +Please enter the column of the second coordinate: 2 + + +Mismatch! Please try again! + 0 1 2 3 +================== +0 | * * 1 * | +1 | * * * * | +2 | * 4 * * | +3 | * * * * | + + +It's alright! Keep going you'll get there soon! You have 0 out of 8 matched pairs so far! + + +Enter 'n' or 'N' to quit or enter 'Y' to continue... +n + +C:\Users\ferdz\source\repos\Assign1\Debug\Assign1.exe (process 15808) exited with code 0. +To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. +Press any key to close this window . . . + +END OF SAMPLE RUN */ \ No newline at end of file diff --git a/C++/Movie Database - 2.cpp b/C++/Movie Database - 2.cpp index 1839ec812..4f7b3fd41 100644 --- a/C++/Movie Database - 2.cpp +++ b/C++/Movie Database - 2.cpp @@ -1,404 +1,404 @@ -/* 10/13/2020 -The program will read a file database for movies and store all the info -into a dynamically allocated struct - -It will then allow the user to search for a movie within the database -the search will not be case sensitive - -If the movie is found it will be displayed and will prompt the user -if they want to save it. If they choose to save it will be saved into -a file called favorites.txt. After all of this the user will be prompted -if they want to continue with the program. - -If the movie was not found, an error message will be displayed.*/ -#include -#include -#include -#include -#include -using namespace std; - -struct Movie {//Movie struct that will hold data for each movie - - string title; //string representing the movie title - string director; //a string for the director’s name - string release; //a string for the release date - int runtime; //an int for the movie’s runtime - double gross; //a double representing the gross total for the movie -}; - -int numberOfLines(ifstream&); -void populateMovieFromFile(ifstream&, Movie&); -void displayMovie(const Movie&); -Movie* createDatabase(int&); -bool caseInsensitiveCmp(string, string); -void findMovie(Movie*, int); -void saveToFile(const Movie&); -bool promptToContinue(); -void displayFavorites(); - -/**/ -int main() { - - int lineCount; //int for the number of lines in the file - //Note: this is uninitialized because the - //value will be passed by reference - //from the createDatabase function - - Movie* moviePtr = createDatabase(lineCount); //value will be return from createDatabase func - findMovie(moviePtr, lineCount); //calls find movie func - - bool run = promptToContinue(); //creates a bool that will keep the program running if true - - while (run) { //will keep iterating through loop if run = true - findMovie(moviePtr, lineCount); //calls find movie func - run = promptToContinue(); //checks if user wants to continue the program - //if user chooses to exit, the loop will stop - //since run = false - } - - displayFavorites(); //displays saved favorites each time the program ends - delete[] moviePtr; //cleans the heap -} - -/* -This function accepts an input file and returns an integer representing the number of -lines in the file -*/ -int numberOfLines(ifstream& inFile){ - - string line; - int count = 0; - - if(inFile){ - while (getline(inFile, line)) - count++; - } - - inFile.clear(); - inFile.seekg(0, inFile.beg); - return count; -} - -/*This function accepts an input file and a Movie object. Inside the function, a single line -should be read in from the current read position of the input file. Once the line has been -read in, it will be parsed and stored in the Movie object that was passed to the function. */ -void populateMovieFromFile(ifstream& inFile, Movie& movieList) { - - //Note: each inFile.ignore() clears the file buffer so that there will be no - //unexpected errors while reading data from file - - getline(inFile, movieList.title, ','); //reads title string and stops at ',' - inFile.ignore(); - - inFile >> movieList.gross; //reads double for movie gross - inFile.ignore(); - - getline(inFile, movieList.director, ','); //reads director string and stops at ',' - inFile.ignore(); - - getline(inFile, movieList.release, ','); //reads date string and stops at ',' - inFile.ignore(); - - inFile >> movieList.runtime; //reads int for movie runtime - inFile.ignore(); - -} - -/*This function accepts a Movie object passed by constant reference and displays the -contents of that object in a formatted fashion -Note: this function is similar to saveToFile except instead of cout the output will be -the file itself*/ -void displayMovie(const Movie& movieList) { - - cout << endl << setw(20) << "Title: " << movieList.title << endl; - cout << setw(20) << "Gross: " << movieList.gross << " billion dollars" << endl; - cout << setw(19) << "Director:" << movieList.director << endl; - cout << setw(20) << "Relase Date: " << movieList.release << endl; - cout << setw(20) << "Runtime: " << movieList.runtime << " minutes" << endl; -} - -/* this function will be responsible for creating your movie database -(which is just a dynamically-allocated array of Movie objects). The integer argument -passed by reference to the function represents the number of movies in the database. It -will not be initialized when you call the function, meaning its value will be set inside the -body of the function*/ -Movie* createDatabase(int& lineCount) { - - string filename; - Movie movieList; //temporary holds all data read from file - - cout << "Please enter filename: "; - cin >> filename; - - ifstream inFile; - inFile.open(filename); - - while (!inFile.is_open()) { - cout << "\nERROR: the file '" << filename << "' cannot be found " << endl; - cout << "\nPlease enter filename: "; - cin >> filename; - inFile.open(filename); - } - - if (inFile.is_open()) { - cout << "\nthe file '" << filename << "' has been successfully opened!" << endl; - } - - lineCount = numberOfLines(inFile); //counts number of lines in the file - //tells file pointer to start at 0 chars from - //the beginning of file - - Movie* moviePtr = new Movie[lineCount]; //creates a dynamically allocated array - //of movie pointers - - for (int i = 0; i < lineCount; i++) {//for loop will store movie information into - //each moviePtr - - populateMovieFromFile(inFile, movieList); - moviePtr[i] = movieList; - } - - return moviePtr; //returns moviePtr to main - inFile.close(); -} - -/*This function accepts two strings and performs a noncase-sensitive comparison on the -two. If the two strings are the same, the function should return true; otherwise, it should -return false. For example, if I pass the strings “skyfall” and “SKYFALL” to this function, it -should return true*/ -bool caseInsensitiveCmp(string str1, string str2) { - - //the two for loops will convert all strings to lowercase - for (int i = 0; i < str1.length(); i++) { - str1[i] = tolower(str1[i]); - } - - for (int j = 0; j < str2.length(); j++) { - str2[j] = tolower(str2[j]); - } - - if (str2.find(str1) != string::npos)//searches for user input string inside the movie title - return true; //if found returns true - else - return false; //if not found return false -} - -/*This function accepts a pointer to an array of Movie objects (your database), and the -number of Movies (which is the same thing as the number of elements in the array).*/ -void findMovie(Movie* moviePtr, int lineCount) { - - string findMovie; //Holds the user input for the movie to search for - string tempMovie; //will temporarily hold the dynamically allocated movie title in order - //to pass it into the function - Movie userMovie; //Struct that temporarily holds the information of the matched movie - bool movieFound = false; //bool that checks if a movie was found/not found - char choice; //Holds user input to save or not save the movie - static bool savedMov = false; //this static bool will keep track if a movie was saved or not - //if this remains false it means no movie has been saved - ofstream outFile; - - cout << "\nEnter a movie title to search for: "; - cin.ignore(); - getline(cin,findMovie); - - for (int i = 0; i < lineCount; i++) { //for loop will iterate through all movie titles - tempMovie = moviePtr[i].title; //sets string equal to the corresponding string (title) in pointer - if (caseInsensitiveCmp(findMovie, tempMovie)) { //checks if movie title and user input matches - userMovie = moviePtr[i]; //userMovie temp holds all data of the matched movie - movieFound = true; //sets movieFound to true since a match was found - - displayMovie(userMovie); //prints out movie - cout << "\nWould you like to save the above movie? (Y or N): "; - cin >> choice; - - if (choice == 'Y' || choice == 'y') { - saveToFile(userMovie); //saves movie to file - cout << "Successfully saved to 'favorites.txt'!" << endl; - savedMov = true; - } - } - } - - if (savedMov == false) { - outFile.open("favorites.txt"); - outFile.close(); - } - - if (movieFound == false) //prints out this statement if movieFound was not changed to true - cout << "Error: '" << findMovie << "' not found in database." << endl; -} - -/*This function accepts a Movie object, passed by constant reference. It should save the -Movie object to the “favorites.txt” file. If the file does not exist, create it. If the file does -exist, add the Movie object to the end of the file -Note: this function is similar to displayMovie. The only difference is we are opening the file -and then appending to it. Also, instead of the output being "cout" we are outputting to the file -itself.*/ -void saveToFile(const Movie& movieList) { - - ofstream outFile; - static bool firstCall = true; - - if (firstCall) { //overwrites favorites file if it exists on the first call - outFile.open("favorites.txt"); - firstCall = false; - } - - else if(!firstCall){ //appends to the file if this isn't the first time the function was called - outFile.open("favorites.txt", outFile.app); - } - - outFile << movieList.title << ", " << movieList.gross << ", " << movieList.director << ", "; - outFile << movieList.release << ", " << movieList.runtime << endl; - - outFile.close(); -} - -/*This function will determine whether or not the user wants to continue using the -program. First, ask the user if they would like to exit the program and prompt them to -either enter ‘Y’ or ‘N’. If ‘Y’ or ‘y’ is entered, the function will return false (the user no -longer wishes to continue); otherwise, return true*/ -bool promptToContinue() { - - char userChoice; - cout << "\nWould you to exit? ( Y / N ): "; - cin >> userChoice; - - if (userChoice == 'N' || userChoice == 'n') - return true; //returns true if user chooses to continue - else - return false; //returns false if user chooses to exit -} - -/*This function will display all saved favorite movies by displaying all the information in the -favorites.txt file. If there are no saved movies, display an error; otherwise, simply display -all saved movies. */ -void displayFavorites() { - - ifstream inFile; - string lineRead; - inFile.open("favorites.txt"); - int lineCount = numberOfLines(inFile); - - if(lineCount > 0){ - for (int i = 0; i < lineCount; i++) { - - getline(inFile, lineRead, ','); - cout << endl << setw(20) << "Title: " << lineRead << endl; - inFile.ignore(); - - getline(inFile, lineRead, ','); - cout << setw(20) << "Gross: " << lineRead << " billion dollars" << endl; - inFile.ignore(); - - getline(inFile, lineRead, ','); - cout << setw(19) << "Director:" << lineRead << endl; - inFile.ignore(); - - getline(inFile, lineRead, ','); - cout << setw(20) << "Relase Date: " << lineRead << endl; - inFile.ignore(); - - getline(inFile, lineRead); - cout << setw(20) << "Runtime: " << lineRead << " minutes" << endl; - - } - } - - else { - cout << "\n*******ERROR: THERE ARE NO SAVED MOVIES*******" << endl; - } - -} -/* SAMPLE RUN 1 -Please enter filename: asdujasd.txt -ERROR: the file cannot be found -Please enter filename: movies.txt - -Enter a movie title to search for: The lord of the - - Title: The Lord of the Rings: The Return of the King - Gross: 1.12 billion dollars - Director: Peter Jackson - Relase Date: 12/17/03 - Runtime: 200 minutes - -Would you like to save the above movie? (Y or N): Y -Successfully saved to 'favorites.txt'! - -Would you to exit? ( Y / N ): N - -Enter a movie title to search for: tItAnIc - - Title: Titanic - Gross: 2.187 billion dollars - Director: James Cameron - Relase Date: 12/19/97 - Runtime: 195 minutes - -Would you like to save the above movie? (Y or N): Y -Successfully saved to 'favorites.txt'! - -Would you to exit? ( Y / N ): n - -Enter a movie title to search for: UlTrOn - - Title: Avengers: Age of Ultron - Gross: 1.405 billion dollars - Director: Joss Whedon - Relase Date: 5/1/15 - Runtime: 141 minutes - -Would you like to save the above movie? (Y or N): Y -Successfully saved to 'favorites.txt'! - -Would you to exit? ( Y / N ): Y -Your saved movies are: - - - Title: The Lord of the Rings: The Return of the King - Gross: 1.12 billion dollars - Director: Peter Jackson - Relase Date: 12/17/03 - Runtime: 200 minutes - - Title: Titanic - Gross: 2.187 billion dollars - Director: James Cameron - Relase Date: 12/19/97 - Runtime: 195 minutes - - Title: Avengers: Age of Ultron - Gross: 1.405 billion dollars - Director: Joss Whedon - Relase Date: 5/1/15 - Runtime: 141 minutes - - -C:\Users\ferdz\source\repos\Assign3\Debug\Assign3.exe (process 8608) exited with code 0. -To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. -Press any key to close this window . . . - -SAMPLE RUN 2 (No movies saved) - -Please enter filename: movies.txt - -Enter a movie title to search for: Ultron - - Title: Avengers: Age of Ultron - Gross: 1.405 billion dollars - Director: Joss Whedon - Relase Date: 5/1/15 - Runtime: 141 minutes - -Would you like to save the above movie? (Y or N): n - -Would you to exit? ( Y / N ): Y -ERROR: No movies have been saved - -C:\Users\ferdz\source\repos\Assign3\Debug\Assign3.exe (process 14984) exited with code 0. -To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. -Press any key to close this window . . . - +/* 10/13/2020 +The program will read a file database for movies and store all the info +into a dynamically allocated struct + +It will then allow the user to search for a movie within the database +the search will not be case sensitive + +If the movie is found it will be displayed and will prompt the user +if they want to save it. If they choose to save it will be saved into +a file called favorites.txt. After all of this the user will be prompted +if they want to continue with the program. + +If the movie was not found, an error message will be displayed.*/ +#include +#include +#include +#include +#include +using namespace std; + +struct Movie {//Movie struct that will hold data for each movie + + string title; //string representing the movie title + string director; //a string for the director’s name + string release; //a string for the release date + int runtime; //an int for the movie’s runtime + double gross; //a double representing the gross total for the movie +}; + +int numberOfLines(ifstream&); +void populateMovieFromFile(ifstream&, Movie&); +void displayMovie(const Movie&); +Movie* createDatabase(int&); +bool caseInsensitiveCmp(string, string); +void findMovie(Movie*, int); +void saveToFile(const Movie&); +bool promptToContinue(); +void displayFavorites(); + +/**/ +int main() { + + int lineCount; //int for the number of lines in the file + //Note: this is uninitialized because the + //value will be passed by reference + //from the createDatabase function + + Movie* moviePtr = createDatabase(lineCount); //value will be return from createDatabase func + findMovie(moviePtr, lineCount); //calls find movie func + + bool run = promptToContinue(); //creates a bool that will keep the program running if true + + while (run) { //will keep iterating through loop if run = true + findMovie(moviePtr, lineCount); //calls find movie func + run = promptToContinue(); //checks if user wants to continue the program + //if user chooses to exit, the loop will stop + //since run = false + } + + displayFavorites(); //displays saved favorites each time the program ends + delete[] moviePtr; //cleans the heap +} + +/* +This function accepts an input file and returns an integer representing the number of +lines in the file +*/ +int numberOfLines(ifstream& inFile){ + + string line; + int count = 0; + + if(inFile){ + while (getline(inFile, line)) + count++; + } + + inFile.clear(); + inFile.seekg(0, inFile.beg); + return count; +} + +/*This function accepts an input file and a Movie object. Inside the function, a single line +should be read in from the current read position of the input file. Once the line has been +read in, it will be parsed and stored in the Movie object that was passed to the function. */ +void populateMovieFromFile(ifstream& inFile, Movie& movieList) { + + //Note: each inFile.ignore() clears the file buffer so that there will be no + //unexpected errors while reading data from file + + getline(inFile, movieList.title, ','); //reads title string and stops at ',' + inFile.ignore(); + + inFile >> movieList.gross; //reads double for movie gross + inFile.ignore(); + + getline(inFile, movieList.director, ','); //reads director string and stops at ',' + inFile.ignore(); + + getline(inFile, movieList.release, ','); //reads date string and stops at ',' + inFile.ignore(); + + inFile >> movieList.runtime; //reads int for movie runtime + inFile.ignore(); + +} + +/*This function accepts a Movie object passed by constant reference and displays the +contents of that object in a formatted fashion +Note: this function is similar to saveToFile except instead of cout the output will be +the file itself*/ +void displayMovie(const Movie& movieList) { + + cout << endl << setw(20) << "Title: " << movieList.title << endl; + cout << setw(20) << "Gross: " << movieList.gross << " billion dollars" << endl; + cout << setw(19) << "Director:" << movieList.director << endl; + cout << setw(20) << "Relase Date: " << movieList.release << endl; + cout << setw(20) << "Runtime: " << movieList.runtime << " minutes" << endl; +} + +/* this function will be responsible for creating your movie database +(which is just a dynamically-allocated array of Movie objects). The integer argument +passed by reference to the function represents the number of movies in the database. It +will not be initialized when you call the function, meaning its value will be set inside the +body of the function*/ +Movie* createDatabase(int& lineCount) { + + string filename; + Movie movieList; //temporary holds all data read from file + + cout << "Please enter filename: "; + cin >> filename; + + ifstream inFile; + inFile.open(filename); + + while (!inFile.is_open()) { + cout << "\nERROR: the file '" << filename << "' cannot be found " << endl; + cout << "\nPlease enter filename: "; + cin >> filename; + inFile.open(filename); + } + + if (inFile.is_open()) { + cout << "\nthe file '" << filename << "' has been successfully opened!" << endl; + } + + lineCount = numberOfLines(inFile); //counts number of lines in the file + //tells file pointer to start at 0 chars from + //the beginning of file + + Movie* moviePtr = new Movie[lineCount]; //creates a dynamically allocated array + //of movie pointers + + for (int i = 0; i < lineCount; i++) {//for loop will store movie information into + //each moviePtr + + populateMovieFromFile(inFile, movieList); + moviePtr[i] = movieList; + } + + return moviePtr; //returns moviePtr to main + inFile.close(); +} + +/*This function accepts two strings and performs a noncase-sensitive comparison on the +two. If the two strings are the same, the function should return true; otherwise, it should +return false. For example, if I pass the strings “skyfall” and “SKYFALL” to this function, it +should return true*/ +bool caseInsensitiveCmp(string str1, string str2) { + + //the two for loops will convert all strings to lowercase + for (int i = 0; i < str1.length(); i++) { + str1[i] = tolower(str1[i]); + } + + for (int j = 0; j < str2.length(); j++) { + str2[j] = tolower(str2[j]); + } + + if (str2.find(str1) != string::npos)//searches for user input string inside the movie title + return true; //if found returns true + else + return false; //if not found return false +} + +/*This function accepts a pointer to an array of Movie objects (your database), and the +number of Movies (which is the same thing as the number of elements in the array).*/ +void findMovie(Movie* moviePtr, int lineCount) { + + string findMovie; //Holds the user input for the movie to search for + string tempMovie; //will temporarily hold the dynamically allocated movie title in order + //to pass it into the function + Movie userMovie; //Struct that temporarily holds the information of the matched movie + bool movieFound = false; //bool that checks if a movie was found/not found + char choice; //Holds user input to save or not save the movie + static bool savedMov = false; //this static bool will keep track if a movie was saved or not + //if this remains false it means no movie has been saved + ofstream outFile; + + cout << "\nEnter a movie title to search for: "; + cin.ignore(); + getline(cin,findMovie); + + for (int i = 0; i < lineCount; i++) { //for loop will iterate through all movie titles + tempMovie = moviePtr[i].title; //sets string equal to the corresponding string (title) in pointer + if (caseInsensitiveCmp(findMovie, tempMovie)) { //checks if movie title and user input matches + userMovie = moviePtr[i]; //userMovie temp holds all data of the matched movie + movieFound = true; //sets movieFound to true since a match was found + + displayMovie(userMovie); //prints out movie + cout << "\nWould you like to save the above movie? (Y or N): "; + cin >> choice; + + if (choice == 'Y' || choice == 'y') { + saveToFile(userMovie); //saves movie to file + cout << "Successfully saved to 'favorites.txt'!" << endl; + savedMov = true; + } + } + } + + if (savedMov == false) { + outFile.open("favorites.txt"); + outFile.close(); + } + + if (movieFound == false) //prints out this statement if movieFound was not changed to true + cout << "Error: '" << findMovie << "' not found in database." << endl; +} + +/*This function accepts a Movie object, passed by constant reference. It should save the +Movie object to the “favorites.txt” file. If the file does not exist, create it. If the file does +exist, add the Movie object to the end of the file +Note: this function is similar to displayMovie. The only difference is we are opening the file +and then appending to it. Also, instead of the output being "cout" we are outputting to the file +itself.*/ +void saveToFile(const Movie& movieList) { + + ofstream outFile; + static bool firstCall = true; + + if (firstCall) { //overwrites favorites file if it exists on the first call + outFile.open("favorites.txt"); + firstCall = false; + } + + else if(!firstCall){ //appends to the file if this isn't the first time the function was called + outFile.open("favorites.txt", outFile.app); + } + + outFile << movieList.title << ", " << movieList.gross << ", " << movieList.director << ", "; + outFile << movieList.release << ", " << movieList.runtime << endl; + + outFile.close(); +} + +/*This function will determine whether or not the user wants to continue using the +program. First, ask the user if they would like to exit the program and prompt them to +either enter ‘Y’ or ‘N’. If ‘Y’ or ‘y’ is entered, the function will return false (the user no +longer wishes to continue); otherwise, return true*/ +bool promptToContinue() { + + char userChoice; + cout << "\nWould you to exit? ( Y / N ): "; + cin >> userChoice; + + if (userChoice == 'N' || userChoice == 'n') + return true; //returns true if user chooses to continue + else + return false; //returns false if user chooses to exit +} + +/*This function will display all saved favorite movies by displaying all the information in the +favorites.txt file. If there are no saved movies, display an error; otherwise, simply display +all saved movies. */ +void displayFavorites() { + + ifstream inFile; + string lineRead; + inFile.open("favorites.txt"); + int lineCount = numberOfLines(inFile); + + if(lineCount > 0){ + for (int i = 0; i < lineCount; i++) { + + getline(inFile, lineRead, ','); + cout << endl << setw(20) << "Title: " << lineRead << endl; + inFile.ignore(); + + getline(inFile, lineRead, ','); + cout << setw(20) << "Gross: " << lineRead << " billion dollars" << endl; + inFile.ignore(); + + getline(inFile, lineRead, ','); + cout << setw(19) << "Director:" << lineRead << endl; + inFile.ignore(); + + getline(inFile, lineRead, ','); + cout << setw(20) << "Relase Date: " << lineRead << endl; + inFile.ignore(); + + getline(inFile, lineRead); + cout << setw(20) << "Runtime: " << lineRead << " minutes" << endl; + + } + } + + else { + cout << "\n*******ERROR: THERE ARE NO SAVED MOVIES*******" << endl; + } + +} +/* SAMPLE RUN 1 +Please enter filename: asdujasd.txt +ERROR: the file cannot be found +Please enter filename: movies.txt + +Enter a movie title to search for: The lord of the + + Title: The Lord of the Rings: The Return of the King + Gross: 1.12 billion dollars + Director: Peter Jackson + Relase Date: 12/17/03 + Runtime: 200 minutes + +Would you like to save the above movie? (Y or N): Y +Successfully saved to 'favorites.txt'! + +Would you to exit? ( Y / N ): N + +Enter a movie title to search for: tItAnIc + + Title: Titanic + Gross: 2.187 billion dollars + Director: James Cameron + Relase Date: 12/19/97 + Runtime: 195 minutes + +Would you like to save the above movie? (Y or N): Y +Successfully saved to 'favorites.txt'! + +Would you to exit? ( Y / N ): n + +Enter a movie title to search for: UlTrOn + + Title: Avengers: Age of Ultron + Gross: 1.405 billion dollars + Director: Joss Whedon + Relase Date: 5/1/15 + Runtime: 141 minutes + +Would you like to save the above movie? (Y or N): Y +Successfully saved to 'favorites.txt'! + +Would you to exit? ( Y / N ): Y +Your saved movies are: + + + Title: The Lord of the Rings: The Return of the King + Gross: 1.12 billion dollars + Director: Peter Jackson + Relase Date: 12/17/03 + Runtime: 200 minutes + + Title: Titanic + Gross: 2.187 billion dollars + Director: James Cameron + Relase Date: 12/19/97 + Runtime: 195 minutes + + Title: Avengers: Age of Ultron + Gross: 1.405 billion dollars + Director: Joss Whedon + Relase Date: 5/1/15 + Runtime: 141 minutes + + +C:\Users\ferdz\source\repos\Assign3\Debug\Assign3.exe (process 8608) exited with code 0. +To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. +Press any key to close this window . . . + +SAMPLE RUN 2 (No movies saved) + +Please enter filename: movies.txt + +Enter a movie title to search for: Ultron + + Title: Avengers: Age of Ultron + Gross: 1.405 billion dollars + Director: Joss Whedon + Relase Date: 5/1/15 + Runtime: 141 minutes + +Would you like to save the above movie? (Y or N): n + +Would you to exit? ( Y / N ): Y +ERROR: No movies have been saved + +C:\Users\ferdz\source\repos\Assign3\Debug\Assign3.exe (process 14984) exited with code 0. +To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. +Press any key to close this window . . . + */ \ No newline at end of file diff --git a/C++/Student System - 3.cpp b/C++/Student System - 3.cpp index 98e8a30c3..81333dd7b 100644 --- a/C++/Student System - 3.cpp +++ b/C++/Student System - 3.cpp @@ -1,190 +1,190 @@ -// September 30, 2020 -/* - -This Program will save a student's information at a school and print it out - -The Program will save the number of students in the system, the student's name, -the number of tests each student has taken, and the scores they got for each test -(Even if the number of tests each student has taken differs from each other the -program will be able to save the scores and output it correctly) - -The Program will output all the data entered by the user in the following format: - -There are (# of students) students in the system - -Name of student #1: SAMPLE NAME -Grades of student #1: 99 99 99 99 - -Name of student #2: SAMPLE2 NAME2 -Grades of student #2: 99 99 99 99 - -etc.... - -*/ -#include -#include -using namespace std; - -int inputData(string*&, double**&); -void displayData(string*, double**, int); -void cleanHeap(string*, double**, int); - -int main() { - - string* name; //Holds string pointer for student names - double** testScores; //Holds double pointer for student test scores and assigns it to null - int numStudents = inputData(name, testScores); //Holds int value for number of Students - //It's value is returned from inputData function - displayData(name, testScores, numStudents); //Calls to displayData function - cleanHeap(name, testScores, numStudents); //Calls to cleanHeap function -} - -/*================================================================================ - InputData - This function will take in all input data and will pass by reference all values - via pointers -===================================================================================*/ - -int inputData(string*& name, double**& score) { - - int numStudents; //holds int value for number of students *Will be the value returned at end of function* - - cout << "How many students do you wish to enter?: " << endl; //prompts user to enter # of students - cin >> numStudents; - while(numStudents < 0) { //checks for validity of input *Will keep on iterating until a positive value is entered* - cout << "INVALID INPUT! You must enter a positive value! Try again!" << endl; - cout << "How many students do you wish to enter?: " << endl; - cin >> numStudents; - } - cin.ignore(); - - name = new string[numStudents]; //creates an array for student names in heap - score = new double* [numStudents]; //creates an array of pointers for student scores - //^This allows us to creates a makeshift 2D array later on - - string tempName; - double tempScore; //these variables will temporarily hold the values of user input - int tempNumTests; //after the values are inputted they are then transferred into the corresponding array - - for (int i = 0; i < numStudents; i++) { - - cout << "Enter the name of student #" << i + 1 << ": " << endl; - getline(cin, tempName); - name[i] = tempName; //sets the element in name[i] = to the name input by user - //Ex. i = 0 | student #1 name = Ferdz Duterte | name[i] = name[0] = Ferdz Duterte | - - cout << "How many tests did " << name[i] << " take?: " << endl; //Prompts user to enter # of tests the current student took - cin >> tempNumTests; - while (tempNumTests < 0) { //checks for validity of input *Will keep on iterating until a positive value is entered* - cout << "INVALID INPUT! You must enter a positive value! Try again!" << endl; - cout << "How many tests did " << name[i] << " take?: " << endl; - cin >> tempNumTests; - } - - score[i] = new double[tempNumTests+1]; //creates a 2D array for student scores - score[i][0] = tempNumTests; //Since the value of tempNumTests varies each iteration it will - //create an array with different # columns per student - - for (int j = 1; j < tempNumTests + 1; j++) { - cout << "Enter grade #" << j << ": " << endl; //prompts user to enter grades - cin >> tempScore; - while (tempScore < 0 || tempScore > 100) { //checks for validity of input *Will keep on iterating until a positive value is entered* - cout << "INVALID INPUT! You must enter a value between 0-100! Try again!" << endl; - cout << "Enter grade #" << j << ": " << endl; - cin >> tempScore; - } - score[i][j] = tempScore; //sets the scores for each student = score input by user - //The row corresponds to the student # (student i+1) - //On each column the score will be inputted - } - cin.ignore(); - } - return numStudents; //returns the # of students to main -} -/*===================================================================================== - displayData - This function will display all the data input by the user in the following format - STUDENTNAME: (SCORE1) (SCORE2) (SCORE3) ... - ======================================================================================*/ -void displayData(string* name, double** score, int numStudents) { - - cout << "\nThere are " << numStudents << " students in the system\n" << endl; //Prints total number of students inputted - for (int i = 0; i < numStudents; i++) { - cout << "Name of student #" << i + 1 << ": " << name[i] << endl;//Prints the name of the current student for the iteration - cout << "Grades for student #" << i + 1 << ": "; - for (int j = 1; j < score[i][0] + 1; j++) { //Loop will keep iterating until the all test scores for the - cout << score[i][j] << " "; //current student has been printed - } - cout << endl << endl; //Moves to next line for the next student once all scores for the current student have been printed - } -} - -/*============================================================== - cleanHeap - This function will clean all the dynamic allocated memory - stored in heap -================================================================*/ -void cleanHeap(string* name, double** score, int numStudents){ - - delete[] name; //Deletes the array of student names - for(int i = 0; i < numStudents; i++){ //Loop will delete the array of doubles the array of pointers are pointing to. - delete[] score[i]; - } - delete[] score; //deletes array of pointers -} -/*======================================================================================== - ~~~~~~~~~~~~~~ S A M P L E -------- R U N --------- S T A R T ~~~~~~~~~~~~~~~~~~~~~~~~~~ - ======================================================================================== - -How many students do you wish to enter?: --2 -INVALID INPUT! You must enter a positive value! Try again! -How many students do you wish to enter?: -2 -Enter the name of student #1: -Ferdz Duterte -How many tests did Ferdz Duterte take?: -3 -Enter grade #1: --100 -INVALID INPUT! You must enter a value between 0-100! Try again! -Enter grade #1: -101 -INVALID INPUT! You must enter a value between 0-100! Try again! -Enter grade #1: -100 -Enter grade #2: -100.00 -Enter grade #3: --1 -INVALID INPUT! You must enter a value between 0-100! Try again! -Enter grade #3: -0 -Enter the name of student #2: -Clide Aquino -How many tests did Clide Aquino take?: -2 -Enter grade #1: -101 -INVALID INPUT! You must enter a value between 0-100! Try again! -Enter grade #1: -87.43 -Enter grade #2: -69.69 - -There are 2 students in the system - -Name of student #1: Ferdz Duterte -Grades for student #1: 100 100 0 - -Name of student #2: Clide Aquino -Grades for student #2: 87.43 69.69 - -C:\Users\ferdz\source\repos\Assign2 v2.0\Debug\Assign2 v2.0.exe (process 10436) exited with code 0. -To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. -Press any key to close this window . . . - -======================================================================================== -~~~~~~~~~~~~~~~~ S A M P L E -------- R U N --------- E N D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -======================================================================================== +// September 30, 2020 +/* + +This Program will save a student's information at a school and print it out + +The Program will save the number of students in the system, the student's name, +the number of tests each student has taken, and the scores they got for each test +(Even if the number of tests each student has taken differs from each other the +program will be able to save the scores and output it correctly) + +The Program will output all the data entered by the user in the following format: + +There are (# of students) students in the system + +Name of student #1: SAMPLE NAME +Grades of student #1: 99 99 99 99 + +Name of student #2: SAMPLE2 NAME2 +Grades of student #2: 99 99 99 99 + +etc.... + +*/ +#include +#include +using namespace std; + +int inputData(string*&, double**&); +void displayData(string*, double**, int); +void cleanHeap(string*, double**, int); + +int main() { + + string* name; //Holds string pointer for student names + double** testScores; //Holds double pointer for student test scores and assigns it to null + int numStudents = inputData(name, testScores); //Holds int value for number of Students + //It's value is returned from inputData function + displayData(name, testScores, numStudents); //Calls to displayData function + cleanHeap(name, testScores, numStudents); //Calls to cleanHeap function +} + +/*================================================================================ + InputData + This function will take in all input data and will pass by reference all values + via pointers +===================================================================================*/ + +int inputData(string*& name, double**& score) { + + int numStudents; //holds int value for number of students *Will be the value returned at end of function* + + cout << "How many students do you wish to enter?: " << endl; //prompts user to enter # of students + cin >> numStudents; + while(numStudents < 0) { //checks for validity of input *Will keep on iterating until a positive value is entered* + cout << "INVALID INPUT! You must enter a positive value! Try again!" << endl; + cout << "How many students do you wish to enter?: " << endl; + cin >> numStudents; + } + cin.ignore(); + + name = new string[numStudents]; //creates an array for student names in heap + score = new double* [numStudents]; //creates an array of pointers for student scores + //^This allows us to creates a makeshift 2D array later on + + string tempName; + double tempScore; //these variables will temporarily hold the values of user input + int tempNumTests; //after the values are inputted they are then transferred into the corresponding array + + for (int i = 0; i < numStudents; i++) { + + cout << "Enter the name of student #" << i + 1 << ": " << endl; + getline(cin, tempName); + name[i] = tempName; //sets the element in name[i] = to the name input by user + //Ex. i = 0 | student #1 name = Ferdz Duterte | name[i] = name[0] = Ferdz Duterte | + + cout << "How many tests did " << name[i] << " take?: " << endl; //Prompts user to enter # of tests the current student took + cin >> tempNumTests; + while (tempNumTests < 0) { //checks for validity of input *Will keep on iterating until a positive value is entered* + cout << "INVALID INPUT! You must enter a positive value! Try again!" << endl; + cout << "How many tests did " << name[i] << " take?: " << endl; + cin >> tempNumTests; + } + + score[i] = new double[tempNumTests+1]; //creates a 2D array for student scores + score[i][0] = tempNumTests; //Since the value of tempNumTests varies each iteration it will + //create an array with different # columns per student + + for (int j = 1; j < tempNumTests + 1; j++) { + cout << "Enter grade #" << j << ": " << endl; //prompts user to enter grades + cin >> tempScore; + while (tempScore < 0 || tempScore > 100) { //checks for validity of input *Will keep on iterating until a positive value is entered* + cout << "INVALID INPUT! You must enter a value between 0-100! Try again!" << endl; + cout << "Enter grade #" << j << ": " << endl; + cin >> tempScore; + } + score[i][j] = tempScore; //sets the scores for each student = score input by user + //The row corresponds to the student # (student i+1) + //On each column the score will be inputted + } + cin.ignore(); + } + return numStudents; //returns the # of students to main +} +/*===================================================================================== + displayData + This function will display all the data input by the user in the following format + STUDENTNAME: (SCORE1) (SCORE2) (SCORE3) ... + ======================================================================================*/ +void displayData(string* name, double** score, int numStudents) { + + cout << "\nThere are " << numStudents << " students in the system\n" << endl; //Prints total number of students inputted + for (int i = 0; i < numStudents; i++) { + cout << "Name of student #" << i + 1 << ": " << name[i] << endl;//Prints the name of the current student for the iteration + cout << "Grades for student #" << i + 1 << ": "; + for (int j = 1; j < score[i][0] + 1; j++) { //Loop will keep iterating until the all test scores for the + cout << score[i][j] << " "; //current student has been printed + } + cout << endl << endl; //Moves to next line for the next student once all scores for the current student have been printed + } +} + +/*============================================================== + cleanHeap + This function will clean all the dynamic allocated memory + stored in heap +================================================================*/ +void cleanHeap(string* name, double** score, int numStudents){ + + delete[] name; //Deletes the array of student names + for(int i = 0; i < numStudents; i++){ //Loop will delete the array of doubles the array of pointers are pointing to. + delete[] score[i]; + } + delete[] score; //deletes array of pointers +} +/*======================================================================================== + ~~~~~~~~~~~~~~ S A M P L E -------- R U N --------- S T A R T ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ======================================================================================== + +How many students do you wish to enter?: +-2 +INVALID INPUT! You must enter a positive value! Try again! +How many students do you wish to enter?: +2 +Enter the name of student #1: +Ferdz Duterte +How many tests did Ferdz Duterte take?: +3 +Enter grade #1: +-100 +INVALID INPUT! You must enter a value between 0-100! Try again! +Enter grade #1: +101 +INVALID INPUT! You must enter a value between 0-100! Try again! +Enter grade #1: +100 +Enter grade #2: +100.00 +Enter grade #3: +-1 +INVALID INPUT! You must enter a value between 0-100! Try again! +Enter grade #3: +0 +Enter the name of student #2: +Clide Aquino +How many tests did Clide Aquino take?: +2 +Enter grade #1: +101 +INVALID INPUT! You must enter a value between 0-100! Try again! +Enter grade #1: +87.43 +Enter grade #2: +69.69 + +There are 2 students in the system + +Name of student #1: Ferdz Duterte +Grades for student #1: 100 100 0 + +Name of student #2: Clide Aquino +Grades for student #2: 87.43 69.69 + +C:\Users\ferdz\source\repos\Assign2 v2.0\Debug\Assign2 v2.0.exe (process 10436) exited with code 0. +To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. +Press any key to close this window . . . + +======================================================================================== +~~~~~~~~~~~~~~~~ S A M P L E -------- R U N --------- E N D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +======================================================================================== */ \ No newline at end of file diff --git a/C++/Vending Machine - 4.cpp b/C++/Vending Machine - 4.cpp index a37229694..ae17222ef 100644 --- a/C++/Vending Machine - 4.cpp +++ b/C++/Vending Machine - 4.cpp @@ -1,407 +1,407 @@ -/* -10/19/2020 -simulates a simple vending machine that sellschips, candy, and soda. Each of -these snacks has a different price and will have a different amount in stock. -When the program is running, the current contents of the vending machine will -be displayed to the user, and then a prompt to enter a number of quarters will -appear. After the user enters a number, the amount of money they entered will -appear in dollars and cents. For example, if the user entered 7 quarters, $1.75 -would be displayed. Next, the user will be prompted to make a selection from -the vending machine. If they have entered enough money and the snack is -in-stock, the item will be dispensed, and the number in-stock will decrease by -one. If the user entered more money than necessary to make the purchase, a -message will be displayed indicated that the appropriate amount of change has -been returned. -*/ - -#include -#include -#include -#include -using namespace std; - -/* -Snack -This is basically the body of the code defining everything -The public members are mostly functions that are setters and getters -for the private members. I also added in a print function so that there -will be less code in main*/ -class Snack { - - public: - - Snack(); //default constructor - Snack(string, double, int); //overloaded constructor - - //inlined setters since they are short - void SetName(string nameToSet) { snackName = nameToSet; } - void SetPrice(double priceToSet) { snackPrice = priceToSet; } - - //decided to define the function here since it was not too long - void SetQuantity(int quantityToSet) { - snackInStock = quantityToSet; - timePtr = new string[quantityToSet]; //set values for timePtr here - } //since it was impossible to do so - //in the default constructor - - //inlined getters - string GetName() const { return snackName; } - double GetPrice() const { return snackPrice; } - int GetQuantity() const { return snackInStock; } - int GetSold() const { return snackSold; } - bool buyItem(double&); - void Print() const; - string GetCurrentTime(); //provided function - ~Snack(); - - private: - - string* timePtr; - string snackName; - double snackPrice; - int snackInStock; - int snackSold; -}; - -//function declarations -void displayVendingMachine(const Snack[], int); -int getQuarters(); -void userBuyItem(Snack[], int); -bool promptToContinue(); - -Snack::Snack() {//default constructor - - snackName = ""; - snackPrice = 0; - snackInStock = 0; - snackSold = 0; -} - -//overloaded construct, has parameters -Snack::Snack(string nameToSet, double priceToSet, int quantityToSet) { - - snackName = nameToSet; - snackPrice = priceToSet; - snackInStock = quantityToSet; - snackSold = 0; - timePtr = new string[snackInStock]; -} - -/* -Snack::buyItem -Checks whether money is enough and item is available -will then return a bool value (true/false). -Returns true if money is enough and decrements the quantity -of snacks in stock and increments the # of snacks sold. -Returns false if money is insufficient or item is sold out -Also displays the change dispensed to user -*/ -bool Snack::buyItem(double& moneyEntered) { - - if (snackInStock <= 0) { - cout << "ERROR: Item is sold out" << endl; - snackInStock = 0; - cout << "$" << moneyEntered << " dispensed below." << endl; - return false; - } - - else if (moneyEntered >= snackPrice){ - moneyEntered = moneyEntered - snackPrice; - snackInStock--; - snackSold++; - timePtr[snackInStock] = GetCurrentTime(); - cout << snackName << " has been dispensed" << endl; - if (moneyEntered != 0) { - cout << "$" << moneyEntered << " dispensed below." << endl; - } - return true; - } - - else if(moneyEntered < snackPrice){ - cout << "You don't have enough money for that!" << endl; - return false; - } - -} - -//prints a line containing name of snack, snack price, and # of snacks -void Snack::Print() const { - - cout << left << setw(15) << snackName - << left << setw(15) << fixed << setprecision(2) << snackPrice - << left << setw(15) << snackInStock << endl; - -} - -//displays the table for the vending machine -void displayVendingMachine(const Snack SnackArr[], int SIZE) { - - cout << left << setw(15) << "Item #" - << left << setw(15) << "Item Name" - << left << setw(15) << "Price" - << left << setw(15) << "# in-stock" << endl; - - cout << left << setfill('=') << setw(59) << "=" << endl; - - //prints 3 lines of snacks(Chips, Candy, Soda) - for (int i = 0; i < SIZE; i++) { - - cout << left << setfill(' ') << setw(15) << i + 1; - SnackArr[i].Print(); - } -} - -//gets number of quarters user has, loops until valid input is entered -int getQuarters() { - - int quarterCount = -1; - - while (quarterCount <= 0) { - cout << "\nEnter a number of quarters: "; - cin >> quarterCount; - - if (quarterCount <= 0) { - cout << "Please enter a number greater than 0" << endl; - } - } - return quarterCount; -} - -//displays the vending machine table and let's the user select which snack -//selection will keep looping until valid input (1, 2, 3) is entered -//also converts quarters to dollars and cents -void userBuyItem(Snack SnackArr[], int SIZE) { - - displayVendingMachine(SnackArr, SIZE); - int quarters = getQuarters(); - double totalMoney = quarters * 0.25; - - cout << "Amount Entered: $" << totalMoney << endl; - - int snackSel = -1; - - while (snackSel > 3 || snackSel < 1) { - cout << "\nEnter a number between 1 and 3 to make your selection : "; - cin >> snackSel; - if (snackSel > 3 || snackSel < 1) - cout << "INVALID INPUT" << endl; - } - SnackArr[snackSel - 1].buyItem(totalMoney); -} - -//asks if the user wants to continue using the vending machine -bool promptToContinue() { - - char choice; - - cout << "\nContinue? (Y/N): "; - cin >> choice; - - if (choice == 'Y' || choice == 'y') { - return true; - } - - else { - return false; - } -} - -//provided function -string Snack::GetCurrentTime() { - - time_t t = time(0); - struct tm ts; - char buff[10]; - ts = *localtime(&t); - strftime(buff, sizeof(buff), "%X", &ts); - return buff; - -} - -//destructor -//will print closing info and profit once main is exited -Snack::~Snack() { - - cout << "\nClosing info for " << GetName() << endl - << right << setw(15) << GetQuantity() << " in stock" << endl - << right << setw(15) << GetSold() << " sold for a profit of $" - << GetSold() * GetPrice() << endl; - - int initStock = (snackInStock + snackSold); - int i = initStock - 1; - if (timePtr[i].length() != 0) {//prints if the string contains something - cout << "\nTransactions occured at:" << endl; - while (i >= snackInStock) {//prints transaction times - cout << right << setw(22) << timePtr[i] << endl; - i--; - } - } -delete[] timePtr; -} - -//driver code -int main() { - - const int SIZE = 3; - Snack SnackArr[SIZE] = { - Snack(), //initialized by default constructor - Snack("Candy", 1.25, 5), //initialized by overloaded constructor - Snack("Soda", 1.00, 2) //initialized by overloaded constructor - }; - - //setters that will changed the initial values set by default constructor - SnackArr[0].SetName("Chips"); - SnackArr[0].SetPrice(1.75); - SnackArr[0].SetQuantity(3); - - bool run = true; //sentinel value to keep the program running - - while (run) { //loops as long as run == true - userBuyItem(SnackArr, SIZE); - run = promptToContinue(); //checks if user wants to continue - cout << endl; //loop exits if user chooses N/n - } -} - -/* SAMPLE RUN -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 5 -3 Soda 1.00 2 - -Enter a number of quarters: -1 -Please enter a number greater than 0 - -Enter a number of quarters: 12 -Amount Entered: $3.00 - -Enter a number between 1 and 3 to make your selection : 0 -INVALID INPUT - -Enter a number between 1 and 3 to make your selection : -1 -INVALID INPUT - -Enter a number between 1 and 3 to make your selection : 4 -INVALID INPUT - -Enter a number between 1 and 3 to make your selection : 3 -Soda has been dispensed -$2.00 dispensed below. - -Continue? (Y/N): y - -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 5 -3 Soda 1.00 1 - -Enter a number of quarters: 12 -Amount Entered: $3.00 - -Enter a number between 1 and 3 to make your selection : 3 -Soda has been dispensed -$2.00 dispensed below. - -Continue? (Y/N): y - -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 5 -3 Soda 1.00 0 - -Enter a number of quarters: 3 -Amount Entered: $0.75 - -Enter a number between 1 and 3 to make your selection : 2 -You don't have enough money for that! - -Continue? (Y/N): y - -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 5 -3 Soda 1.00 0 - -Enter a number of quarters: 12 -Amount Entered: $3.00 - -Enter a number between 1 and 3 to make your selection : 3 -ERROR: Item is sold out -$3.00 dispensed below. - -Continue? (Y/N): y - -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 5 -3 Soda 1.00 0 - -Enter a number of quarters: 12 -Amount Entered: $3.00 - -Enter a number between 1 and 3 to make your selection : 2 -Candy has been dispensed -$1.75 dispensed below. - -Continue? (Y/N): y - -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 4 -3 Soda 1.00 0 - -Enter a number of quarters: 12 -Amount Entered: $3.00 - -Enter a number between 1 and 3 to make your selection : 2 -Candy has been dispensed -$1.75 dispensed below. - -Continue? (Y/N): y - -Item # Item Name Price # in-stock -=========================================================== -1 Chips 1.75 3 -2 Candy 1.25 3 -3 Soda 1.00 0 - -Enter a number of quarters: 12 -Amount Entered: $3.00 - -Enter a number between 1 and 3 to make your selection : 1 -Chips has been dispensed -$1.25 dispensed below. - -Continue? (Y/N): n - - -Closing info for Soda - 0 in stock - 2 sold for a profit of $2.00 - -Transactions occured at: - 23:50:24 - 23:50:31 - -Closing info for Candy - 3 in stock - 2 sold for a profit of $2.50 - -Transactions occured at: - 23:51:21 - 23:51:30 - -Closing info for Chips - 2 in stock - 1 sold for a profit of $1.75 - -Transactions occured at: - 23:51:32 -*/ - +/* +10/19/2020 +simulates a simple vending machine that sellschips, candy, and soda. Each of +these snacks has a different price and will have a different amount in stock. +When the program is running, the current contents of the vending machine will +be displayed to the user, and then a prompt to enter a number of quarters will +appear. After the user enters a number, the amount of money they entered will +appear in dollars and cents. For example, if the user entered 7 quarters, $1.75 +would be displayed. Next, the user will be prompted to make a selection from +the vending machine. If they have entered enough money and the snack is +in-stock, the item will be dispensed, and the number in-stock will decrease by +one. If the user entered more money than necessary to make the purchase, a +message will be displayed indicated that the appropriate amount of change has +been returned. +*/ + +#include +#include +#include +#include +using namespace std; + +/* +Snack +This is basically the body of the code defining everything +The public members are mostly functions that are setters and getters +for the private members. I also added in a print function so that there +will be less code in main*/ +class Snack { + + public: + + Snack(); //default constructor + Snack(string, double, int); //overloaded constructor + + //inlined setters since they are short + void SetName(string nameToSet) { snackName = nameToSet; } + void SetPrice(double priceToSet) { snackPrice = priceToSet; } + + //decided to define the function here since it was not too long + void SetQuantity(int quantityToSet) { + snackInStock = quantityToSet; + timePtr = new string[quantityToSet]; //set values for timePtr here + } //since it was impossible to do so + //in the default constructor + + //inlined getters + string GetName() const { return snackName; } + double GetPrice() const { return snackPrice; } + int GetQuantity() const { return snackInStock; } + int GetSold() const { return snackSold; } + bool buyItem(double&); + void Print() const; + string GetCurrentTime(); //provided function + ~Snack(); + + private: + + string* timePtr; + string snackName; + double snackPrice; + int snackInStock; + int snackSold; +}; + +//function declarations +void displayVendingMachine(const Snack[], int); +int getQuarters(); +void userBuyItem(Snack[], int); +bool promptToContinue(); + +Snack::Snack() {//default constructor + + snackName = ""; + snackPrice = 0; + snackInStock = 0; + snackSold = 0; +} + +//overloaded construct, has parameters +Snack::Snack(string nameToSet, double priceToSet, int quantityToSet) { + + snackName = nameToSet; + snackPrice = priceToSet; + snackInStock = quantityToSet; + snackSold = 0; + timePtr = new string[snackInStock]; +} + +/* +Snack::buyItem +Checks whether money is enough and item is available +will then return a bool value (true/false). +Returns true if money is enough and decrements the quantity +of snacks in stock and increments the # of snacks sold. +Returns false if money is insufficient or item is sold out +Also displays the change dispensed to user +*/ +bool Snack::buyItem(double& moneyEntered) { + + if (snackInStock <= 0) { + cout << "ERROR: Item is sold out" << endl; + snackInStock = 0; + cout << "$" << moneyEntered << " dispensed below." << endl; + return false; + } + + else if (moneyEntered >= snackPrice){ + moneyEntered = moneyEntered - snackPrice; + snackInStock--; + snackSold++; + timePtr[snackInStock] = GetCurrentTime(); + cout << snackName << " has been dispensed" << endl; + if (moneyEntered != 0) { + cout << "$" << moneyEntered << " dispensed below." << endl; + } + return true; + } + + else if(moneyEntered < snackPrice){ + cout << "You don't have enough money for that!" << endl; + return false; + } + +} + +//prints a line containing name of snack, snack price, and # of snacks +void Snack::Print() const { + + cout << left << setw(15) << snackName + << left << setw(15) << fixed << setprecision(2) << snackPrice + << left << setw(15) << snackInStock << endl; + +} + +//displays the table for the vending machine +void displayVendingMachine(const Snack SnackArr[], int SIZE) { + + cout << left << setw(15) << "Item #" + << left << setw(15) << "Item Name" + << left << setw(15) << "Price" + << left << setw(15) << "# in-stock" << endl; + + cout << left << setfill('=') << setw(59) << "=" << endl; + + //prints 3 lines of snacks(Chips, Candy, Soda) + for (int i = 0; i < SIZE; i++) { + + cout << left << setfill(' ') << setw(15) << i + 1; + SnackArr[i].Print(); + } +} + +//gets number of quarters user has, loops until valid input is entered +int getQuarters() { + + int quarterCount = -1; + + while (quarterCount <= 0) { + cout << "\nEnter a number of quarters: "; + cin >> quarterCount; + + if (quarterCount <= 0) { + cout << "Please enter a number greater than 0" << endl; + } + } + return quarterCount; +} + +//displays the vending machine table and let's the user select which snack +//selection will keep looping until valid input (1, 2, 3) is entered +//also converts quarters to dollars and cents +void userBuyItem(Snack SnackArr[], int SIZE) { + + displayVendingMachine(SnackArr, SIZE); + int quarters = getQuarters(); + double totalMoney = quarters * 0.25; + + cout << "Amount Entered: $" << totalMoney << endl; + + int snackSel = -1; + + while (snackSel > 3 || snackSel < 1) { + cout << "\nEnter a number between 1 and 3 to make your selection : "; + cin >> snackSel; + if (snackSel > 3 || snackSel < 1) + cout << "INVALID INPUT" << endl; + } + SnackArr[snackSel - 1].buyItem(totalMoney); +} + +//asks if the user wants to continue using the vending machine +bool promptToContinue() { + + char choice; + + cout << "\nContinue? (Y/N): "; + cin >> choice; + + if (choice == 'Y' || choice == 'y') { + return true; + } + + else { + return false; + } +} + +//provided function +string Snack::GetCurrentTime() { + + time_t t = time(0); + struct tm ts; + char buff[10]; + ts = *localtime(&t); + strftime(buff, sizeof(buff), "%X", &ts); + return buff; + +} + +//destructor +//will print closing info and profit once main is exited +Snack::~Snack() { + + cout << "\nClosing info for " << GetName() << endl + << right << setw(15) << GetQuantity() << " in stock" << endl + << right << setw(15) << GetSold() << " sold for a profit of $" + << GetSold() * GetPrice() << endl; + + int initStock = (snackInStock + snackSold); + int i = initStock - 1; + if (timePtr[i].length() != 0) {//prints if the string contains something + cout << "\nTransactions occured at:" << endl; + while (i >= snackInStock) {//prints transaction times + cout << right << setw(22) << timePtr[i] << endl; + i--; + } + } +delete[] timePtr; +} + +//driver code +int main() { + + const int SIZE = 3; + Snack SnackArr[SIZE] = { + Snack(), //initialized by default constructor + Snack("Candy", 1.25, 5), //initialized by overloaded constructor + Snack("Soda", 1.00, 2) //initialized by overloaded constructor + }; + + //setters that will changed the initial values set by default constructor + SnackArr[0].SetName("Chips"); + SnackArr[0].SetPrice(1.75); + SnackArr[0].SetQuantity(3); + + bool run = true; //sentinel value to keep the program running + + while (run) { //loops as long as run == true + userBuyItem(SnackArr, SIZE); + run = promptToContinue(); //checks if user wants to continue + cout << endl; //loop exits if user chooses N/n + } +} + +/* SAMPLE RUN +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 5 +3 Soda 1.00 2 + +Enter a number of quarters: -1 +Please enter a number greater than 0 + +Enter a number of quarters: 12 +Amount Entered: $3.00 + +Enter a number between 1 and 3 to make your selection : 0 +INVALID INPUT + +Enter a number between 1 and 3 to make your selection : -1 +INVALID INPUT + +Enter a number between 1 and 3 to make your selection : 4 +INVALID INPUT + +Enter a number between 1 and 3 to make your selection : 3 +Soda has been dispensed +$2.00 dispensed below. + +Continue? (Y/N): y + +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 5 +3 Soda 1.00 1 + +Enter a number of quarters: 12 +Amount Entered: $3.00 + +Enter a number between 1 and 3 to make your selection : 3 +Soda has been dispensed +$2.00 dispensed below. + +Continue? (Y/N): y + +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 5 +3 Soda 1.00 0 + +Enter a number of quarters: 3 +Amount Entered: $0.75 + +Enter a number between 1 and 3 to make your selection : 2 +You don't have enough money for that! + +Continue? (Y/N): y + +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 5 +3 Soda 1.00 0 + +Enter a number of quarters: 12 +Amount Entered: $3.00 + +Enter a number between 1 and 3 to make your selection : 3 +ERROR: Item is sold out +$3.00 dispensed below. + +Continue? (Y/N): y + +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 5 +3 Soda 1.00 0 + +Enter a number of quarters: 12 +Amount Entered: $3.00 + +Enter a number between 1 and 3 to make your selection : 2 +Candy has been dispensed +$1.75 dispensed below. + +Continue? (Y/N): y + +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 4 +3 Soda 1.00 0 + +Enter a number of quarters: 12 +Amount Entered: $3.00 + +Enter a number between 1 and 3 to make your selection : 2 +Candy has been dispensed +$1.75 dispensed below. + +Continue? (Y/N): y + +Item # Item Name Price # in-stock +=========================================================== +1 Chips 1.75 3 +2 Candy 1.25 3 +3 Soda 1.00 0 + +Enter a number of quarters: 12 +Amount Entered: $3.00 + +Enter a number between 1 and 3 to make your selection : 1 +Chips has been dispensed +$1.25 dispensed below. + +Continue? (Y/N): n + + +Closing info for Soda + 0 in stock + 2 sold for a profit of $2.00 + +Transactions occured at: + 23:50:24 + 23:50:31 + +Closing info for Candy + 3 in stock + 2 sold for a profit of $2.50 + +Transactions occured at: + 23:51:21 + 23:51:30 + +Closing info for Chips + 2 in stock + 1 sold for a profit of $1.75 + +Transactions occured at: + 23:51:32 +*/ + diff --git a/CountingRooms.cpp b/CountingRooms.cpp index 2c1f76012..8aa0dc6bb 100644 --- a/CountingRooms.cpp +++ b/CountingRooms.cpp @@ -1,67 +1,67 @@ -#include -#include -using namespace std; - -#define ll long long int - -#define OJ \ - freopen("input.txt", "r", stdin); \ - freopen("output.txt", "w", stdout); -#define FIO \ - ios_base::sync_with_stdio(false); \ - cin.tie(NULL); \ - cout.tie(NULL); - -char arr[1001][1001]; -bool vis[1001][1001] = {false}; -int n, m; - -bool isValid(int x, int y){ - if(x<0 || x>=n || y<0 || y>=m){ - return false; - } - if(vis[x][y] == true || arr[x][y] == '#'){ - return false; - } - - return true; -} - -void dfs(int x, int y){ - vis[x][y] = true; - if(isValid(x-1, y)){ - dfs(x-1, y); - } - if(isValid(x+1, y)){ - dfs(x+1, y); - } - if(isValid(x, y-1)){ - dfs(x, y-1); - } - if(isValid(x, y+1)){ - dfs(x, y+1); - } -} - -int main() -{ - //OJ; - cin >> n >> m; - for(int i=0; i> arr[i][j]; - } - } - - int count = 0; - for(int i=0; i +#include +using namespace std; + +#define ll long long int + +#define OJ \ + freopen("input.txt", "r", stdin); \ + freopen("output.txt", "w", stdout); +#define FIO \ + ios_base::sync_with_stdio(false); \ + cin.tie(NULL); \ + cout.tie(NULL); + +char arr[1001][1001]; +bool vis[1001][1001] = {false}; +int n, m; + +bool isValid(int x, int y){ + if(x<0 || x>=n || y<0 || y>=m){ + return false; + } + if(vis[x][y] == true || arr[x][y] == '#'){ + return false; + } + + return true; +} + +void dfs(int x, int y){ + vis[x][y] = true; + if(isValid(x-1, y)){ + dfs(x-1, y); + } + if(isValid(x+1, y)){ + dfs(x+1, y); + } + if(isValid(x, y-1)){ + dfs(x, y-1); + } + if(isValid(x, y+1)){ + dfs(x, y+1); + } +} + +int main() +{ + //OJ; + cin >> n >> m; + for(int i=0; i> arr[i][j]; + } + } + + int count = 0; + for(int i=0; i num2 && num1 > num3) - { - System.out.println("Greatest number is:"+num1); - } - else if(num2 > num3) - { - System.out.println("Greatest number is:"+num2); - } - else - { - System.out.println("Greatest number is:"+num3); - } - } - public static void main(String[] args) { - System.out.println("Program to Find Greatest Number"); - FindGreatestNumber g = new FindGreatestNumber(); - g.setvalue(); - g.calcGreatest(); - } - -} +import java.util.Scanner; +public class FindGreatestNumber { + int num1,num2,num3; + public void setvalue(){ + Scanner sc = new Scanner(System.in); + System.out.print("Enter the first number:"); + num1 = sc.nextInt(); + System.out.print("Enter the second number:"); + num2 = sc.nextInt(); + System.out.print("Enter the third number:"); + num3 = sc.nextInt(); + sc.close(); + } + public void calcGreatest(){ + if(num1 > num2 && num1 > num3) + { + System.out.println("Greatest number is:"+num1); + } + else if(num2 > num3) + { + System.out.println("Greatest number is:"+num2); + } + else + { + System.out.println("Greatest number is:"+num3); + } + } + public static void main(String[] args) { + System.out.println("Program to Find Greatest Number"); + FindGreatestNumber g = new FindGreatestNumber(); + g.setvalue(); + g.calcGreatest(); + } + +} diff --git a/GamerNishant_RadixSort.cpp.cpp b/GamerNishant_RadixSort.cpp.cpp index bf7474779..d6969d94b 100644 --- a/GamerNishant_RadixSort.cpp.cpp +++ b/GamerNishant_RadixSort.cpp.cpp @@ -1,60 +1,60 @@ -/* Author - Rahul Pathak */ -/* Given n d-digit numbers in which each digit can take on up to k possible values, - RADIX-SORT correctly sorts these numbers in O(d*(n+k)) time if the stable sort - it uses takes O(n+k) time. - Here, we use Counting sort as a subroutine. -*/ - -/* For each digit i where i varies from the least significant to the most significant digit, - sort the input array using counting sort according to the i'th digit. */ -#include -#include -using namespace std; - -int findMaxElement(vector A) -{ - int maximum = A[0]; - for (int i = 1; i < A.size(); i++) - { - maximum = max(maximum, A[i]); - } - return maximum; -} - -void radixSort(vector &A) -{ - int power, i = findMaxElement(A); - // Count sort subroutine for each digit - // This loops iterates for number of times equal to the number of digits in the maximum element - for (power = 1; i / power != 0; power *= 10) - { - int result[A.size()], i, count[10] = {0}; - - // Store frequency - for (i = 0; i < A.size(); i++) - count[(A[i] / power) % 10]++; - // Store number of elements before the current element - // that should appear in the sorted array - for (i = 1; i < 10; i++) - count[i] += count[i - 1]; - // placing each element at correct place in the array sorted according to - // the particular digit - for (i = A.size() - 1; i >= 0; i--) - { - result[count[(A[i] / power) % 10] - 1] = A[i]; - count[(A[i] / power) % 10]--; - } - for (i = 0; i < A.size(); i++) - A[i] = result[i]; - } -} - -int main() -{ - vector A = {23, 2, 43, 32, 8, 13, 5, 16, 17, 1}; - radixSort(A); - for (int i = 0; i < A.size(); i++) - cout << A[i] << ' '; - cout << endl; - return 0; +/* Author - Rahul Pathak */ +/* Given n d-digit numbers in which each digit can take on up to k possible values, + RADIX-SORT correctly sorts these numbers in O(d*(n+k)) time if the stable sort + it uses takes O(n+k) time. + Here, we use Counting sort as a subroutine. +*/ + +/* For each digit i where i varies from the least significant to the most significant digit, + sort the input array using counting sort according to the i'th digit. */ +#include +#include +using namespace std; + +int findMaxElement(vector A) +{ + int maximum = A[0]; + for (int i = 1; i < A.size(); i++) + { + maximum = max(maximum, A[i]); + } + return maximum; +} + +void radixSort(vector &A) +{ + int power, i = findMaxElement(A); + // Count sort subroutine for each digit + // This loops iterates for number of times equal to the number of digits in the maximum element + for (power = 1; i / power != 0; power *= 10) + { + int result[A.size()], i, count[10] = {0}; + + // Store frequency + for (i = 0; i < A.size(); i++) + count[(A[i] / power) % 10]++; + // Store number of elements before the current element + // that should appear in the sorted array + for (i = 1; i < 10; i++) + count[i] += count[i - 1]; + // placing each element at correct place in the array sorted according to + // the particular digit + for (i = A.size() - 1; i >= 0; i--) + { + result[count[(A[i] / power) % 10] - 1] = A[i]; + count[(A[i] / power) % 10]--; + } + for (i = 0; i < A.size(); i++) + A[i] = result[i]; + } +} + +int main() +{ + vector A = {23, 2, 43, 32, 8, 13, 5, 16, 17, 1}; + radixSort(A); + for (int i = 0; i < A.size(); i++) + cout << A[i] << ' '; + cout << endl; + return 0; } \ No newline at end of file diff --git a/HelloWorld.java b/HelloWorld.java index 948b1f6da..cc1df5ae7 100644 --- a/HelloWorld.java +++ b/HelloWorld.java @@ -1,9 +1,9 @@ -import java.util.Scanner; - -public class HelloWorld { - - public static void main(String[] args) { - System.out.println("Hello World"); - } - -} +import java.util.Scanner; + +public class HelloWorld { + + public static void main(String[] args) { + System.out.println("Hello World"); + } + +} diff --git a/JAVA /MergeSortInLinkedList/ListNode.class b/JAVA /MergeSortInLinkedList/ListNode.class deleted file mode 100644 index 5d53db14c22d3ad5e05609e86483a45526b8cb12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmZ9HOH0F05QWdAd9>Hq)<@e#5yXu#hy`({xDkXvtc!~Kw7rznnn0Qs|CWm)xbO$~ zqr`KI59neZoco=bJD*?g9{?`UQE;$ZgN;3t_C2&bv;~!AG80H7urvKq3RE1Y^Rl0h z^`*eQO0%@QCKjAL61kx)XvArz`-|tHE*_HMjEWsZ=Di+7|866wLB1$P`ZhIC_f8iR zJ;;kP%Fa3BNsrB{vuUzSd?;-BaN+r=q9&;R{zA|+KyQ|0livMssz)Ubd4a>TECwyi zFfQf_gOece*&VP7s}sIKUfBq?nccP6Vy94NZ_pzSGvky&!|n>!Cf{E3jUWD)v{}~p ROHUI~7(KU4JADj-JgtCGo-OTAKoo2N5fUTXR+ADE!^VM5$Ut8yQ`CiP{T*)D zs?m~2;*y066IcESe}m$=(-KgKN&9`@{od!?+kXB1`3rypqu~~A%g8LJTwbi98`o6KX}E)gK=;3kELW|3&a7xiVqU{Sr)McHhVgh*e@QnlG5y~}F zXPX7qm8wkctkYzb;!nttO{PqvkmSV~<+54K3G}kT1u7c|n5Ty?1e5>E_u8fUZ3uLP zFD9~My9501g#_GXxgPhuY~DITe3fl{#6T0+0v(i{JoQlvYWMgd#CsaNG)j--3{vu@ zC}rw5zH&G9`Vm}D57Cs-6H4?LQ?X;{(T`AK{Jur29{mJ2&+gO#n)MhD47k%eMdsk- zyUr3ddcbr>f(pF}MP!1?J9c(Cv!|ia?t>RM_*?1cvIDe27{VZ;7{(+<_{7GrfCwI9 z99epUteAl37Xm7-^V9EBA5fjp?N-rKch)6b4edj(17BkM3B|$oMq+ax!jp@hl!zp1pNxsu0l{9%XdNfvpFQEjLV~l@*{|Ev4HHlrRp}Fl!4J|da z)^N2!$HB=Dc@yW^h{H$RU6{fse`9g}7bVHTBg_*095#@^GkRWO9QUCw| diff --git a/JAVA /MergeSortInLinkedList/MergeSortIn2LinkedList.java b/JAVA /MergeSortInLinkedList/MergeSortIn2LinkedList.java deleted file mode 100644 index 9b6c9354c..000000000 --- a/JAVA /MergeSortInLinkedList/MergeSortIn2LinkedList.java +++ /dev/null @@ -1,64 +0,0 @@ - -// LANGUAGE: Java -// ENV: Java 8 -// AUTHOR: Noopur Agarwal -// GITHUB: https://github.com/noopurAg -/** - * Definition for singly-linked list. - * class ListNode { - * int val; - * ListNode next; - * ListNode() {} - * ListNode(int val) { this.val = val; } - * ListNode(int val, ListNode next) { this.val = val; this.next = next; } - * } - */ -// l1 and l2 are the two sorted Linked List -// l1: 2->6-7 , l2: 3->4->9 -class ListNode { - int val; - ListNode next; - ListNode() {} - ListNode(int val) { this.val = val; } - ListNode(int val, ListNode next) { this.val = val; this.next = next; } - } -public class MergeSortIn2LinkedList { - - public ListNode mergeTwoLists(ListNode l1, ListNode l2) { - - ListNode temp = new ListNode(); - ListNode start = temp; - while(l1!=null && l2!=null){ - if(l1.val"); - start=start.next; - } - } - -} diff --git a/JavaScript/insertion_sort.js b/JavaScript/insertion_sort.js deleted file mode 100644 index e59ebd3b4..000000000 --- a/JavaScript/insertion_sort.js +++ /dev/null @@ -1,23 +0,0 @@ -var _testObj = { - numStorage : new Array(2, 34, 4, 0, 234, 5), - - getSort: function(data) { - var i,j; - for(i = 1; i < data.length; i++) - { - over = data[i]; - - for(j = i-1; j >= 0 && data[j] > over; j--) - { - data[j+1] = data[j]; - } - data[j+1] = over; - } - //возвращаем обработанный маÑÑив - return data; - } -}; - -alert(_testObj.getSort(_testObj.numStorage)); - - diff --git a/Javacode/Avltree.java b/Javacode/Avltree.java deleted file mode 100644 index 6ed00e7b0..000000000 --- a/Javacode/Avltree.java +++ /dev/null @@ -1,213 +0,0 @@ -import java.util.*; -public class Avltree -{ - - static class node - { - public long xkey,ykey; - public node left; - public node right; - public int height; - public int count; - public Vector wc; - public node() - { - xkey=0; - ykey=0; - left=null; - right=null; - height=0; - count=0; - wc=new Vector(); - } - } - static class t - { - static int post; - static long data; - public t() - { - post=0; - long data=0; - } - } - - static int height(node N) - { - if (N == null) - return 0; - return N.height; - } - static int max(int a, int b) - { - return (a > b) ? a : b; - } - - static node newNode(long xkey,long ykey,int pos) - { - node node = new node(); - node.xkey = xkey; - node.ykey = ykey; - node.left = null; - node.right = null; - node.height = 1; - node.count = 1; - node.wc.add(pos); - return (node); - } - static node rightRotate(node y) - { - node x = y.left; - node T2 = x.right; - x.right = y; - y.left = T2; - y.height = max(height(y.left), height(y.right)) + 1; - x.height = max(height(x.left), height(x.right)) + 1; - return x; - } - static node leftRotate(node x) - { - node y = x.right; - node T2 = y.left; - y.left = x; - x.right = T2; - x.height = max(height(x.left), height(x.right)) + 1; - y.height = max(height(y.left), height(y.right)) + 1; - return y; - } - - static int getBalance(node N) - { - if (N == null) - return 0; - return height(N.left) - height(N.right); - } - - static node insert(node node, long xkey,long ykey,int pos) - { - - if (node == null) - return (newNode(xkey,ykey,pos)); - - if (xkey == node.xkey) { - (node.count)++; - node.wc.add(pos); - return node; - } - if (xkey < node.xkey) - node.left = insert(node.left, xkey,ykey,pos); - else - node.right = insert(node.right, xkey,ykey,pos); - node.height = max(height(node.left), height(node.right)) + 1; - int balance = getBalance(node); - if (balance > 1 && xkey < node.left.xkey) - return rightRotate(node); - - if (balance < -1 && xkey > node.right.xkey) - return leftRotate(node); - - if (balance > 1 && xkey > node.left.xkey) { - node.left = leftRotate(node.left); - return rightRotate(node); - } - if (balance < -1 && xkey < node.right.xkey) { - node.right = rightRotate(node.right); - return leftRotate(node); - } - return node; - } -static void inorder(node r,t toy) - { t node=null; - if (r != null) - { - inorder(r.left,toy); - if(r.count==1) - { - toy.data=r.xkey; - toy.post=r.wc.get(0); - - } - inorder(r.right,toy); - } - } - static void search(node r, long val,Vector u) - { - - while ((r != null)) - { - long rval = r.xkey; - if (val < rval) - r = r.left; - else if (val > rval) - r = r.right; - else - { - u=r.wc; - - } - } - } - public static void main (String[] args) - { - try - { - solution obj = new solution(); - obj.run(args); - } - catch (Exception e) - { - e.printStackTrace (); - } - } - public void run (String[] args) throws Exception - { - BufferedReader scan = new BufferedReader(new InputStreamReader(System.in)); - StringTokenizer st = new StringTokenizer(scan.readLine()); - long t=Long.parseLong(next()); - long n; - for(int i=1;i<=t;i++) - { - n=Long.parseLong(next()); - long key=4*n-1; - node rootx=null; - node rooty=null; - Long[] x=new Long[2000001]; - Long[] y=new Long[2000001]; - for(int k=1;k<=n;k++) - { - - x[k]=scan.nextLong(); - y[k]=scan.nextLong(); - } - for(int k=1;k<=n;k++) - { - rootx=insert(rootx,x[k],y[k],k); - rooty=insert(rooty,y[k],x[k],k); - } - t tx=new t(); - t ty=new t(); - inorder(rootx,tx); - inorder(rooty,ty); - Vector txw=new Vector(); - search(rootx,x[ty.post],txw); - Vector tyw=new Vector(); - search(rooty,y[tx.post],tyw); - int npos; - if(txw.size()==1) - { - npos=txw.get(1); - } - else{ - npos=tyw.get(1); - } - long finalx,finaly; - finalx=x[tx.post]+x[ty.post]-x[npos]; - finaly=y[tx.post]+y[ty.post]-y[npos]; - System.out.println(finalx +" "+finaly); - - } - } - -} - - diff --git a/Javacode/sort.java b/Javacode/sort.java deleted file mode 100644 index d1f47fbcf..000000000 --- a/Javacode/sort.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.io.*; -import java.util.*; - -class insert{ - void sort(int A[]) - { - int i,j,v,n=A.length; - for(i=1;i=0&&A[j]>v) - { - A[j+1]=A[j]; - j--; - } - A[j+1]=v; - } - } - public static void main(String[] arg) - { - insert i=new insert(); - int A[] ={9,8,7,6,5,4,3,2,1}; - i.sort(A); - for(int j=0;j -#include -using namespace std; - -int maxSubArraySum(int a[], int size) -{ - int max_so_far = INT_MIN, max_ending_here = 0; - - for (int i = 0; i < size; i++) - { - max_ending_here = max_ending_here + a[i]; - if (max_so_far < max_ending_here) - max_so_far = max_ending_here; - - if (max_ending_here < 0) - max_ending_here = 0; - } - return max_so_far; -} - -int main() -{ - int a[] = {-2, -3, 8, -1, -2, 1, 5, -4}; - int n = sizeof(a)/sizeof(a[0]); - int max_sum = maxSubArraySum(a, n); - cout << "Maximum contiguous sum is " << max_sum; - return 0; -} diff --git a/LCM-GCD.java b/LCM-GCD.java deleted file mode 100644 index 50ae58894..000000000 --- a/LCM-GCD.java +++ /dev/null @@ -1,28 +0,0 @@ -/* package codechef; // don't place package name! */ - -import java.util.*; -import java.lang.*; -import java.io.*; - -/* Name of the class has to be "Main" only if the class is public. */ -class me -{ - static Long gcd(Long a, Long b){ - if(b==0) - return a; - return(gcd(b, a%b)); - } - static Long lcm(Long a, Long b){ - return ((a*b)/gcd(a , b)); - } - public static void main (String[] args) throws java.lang.Exception - { - Scanner sc=new Scanner(System.in); - int testcases=sc.nextInt(); - while(testcases-->0){ - long A=sc.nextLong(); - long B=sc.nextLong(); - System.out.println(gcd(A , B)+" "+lcm(A , B)); - } - } -} \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d500e82fb..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Shivay Lamba - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Languages/.DS_Store b/Languages/.DS_Store deleted file mode 100644 index 31894d816ff35d91dda6dbc2144040fa00def708..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMO>f*p7=CB7Np?3aangj8BBWIVQc)t5XhRwaRo!e-HR%Ugva68LmaW(8Y^*q* zmF-QMEJ3;O12}*Hi3MmGY~Tn zGY~TnGjJ9dz?v;es?U@0Ic6YcAZFl*0g)fFIE2jm^1zcab>Jko0FX&E%YwRm^@q%g z2FScG4?Kw$6y^Lt*~LgJmV0Sl*NI zIc6YcppyZycTdtR6={*2$o~Bu#P{JpvdDo)xayA6@b~$L)rM&}?!?5;EYX$h?&(dX zGO5h@%!ASf-zmAO+jI)5eNS8!Rd=K6*UOxnM|HKjV(2>+WoV9Du4-7iEe9Jl9gzF) z8&-|)6nN9BIZ{u_>qw>2sdPmdX|<+v+01B)N|AO`{~rk88^ATinvqqxquOnZ^P?hD39hR%ny<=u`TdzNa7P zkba@x>2KD{6n2@7u_<j=uG*3aI9lEcz@8(HXgY<3M5xDaRGMn6p z!;5eXI(!e^AQQp(2!|cU%0LWbZxW|F&}&gWf)ybd#P-sHOdOk}L%$hD6P_Zm8VI{2 z&}Hy*CyZkvh=W=Ok*Y1EBVEi4Pt0*u!8MoHZy}j9s1ebDbP~DOEj-yasbQQ*1?=_E zGx@l)mJDX5kqmMt=ls(ogCzMAjJQsw-40?k5Nm+cXSh*_tZs~HN=J&&Dx4^U?4jE* zmn*SW*aQqt6v5s_*p%UNvs8#+;TjR_yU<&MYut*i=Il4Pz~z8xdnkYnnD;EK=rdT+ zb2BGf_cSYdXpUxmvZV2?2EwUbLj7BOe%^npNqwe0uK)G;r&$0anA(408XG6yC*o;I zynBgIj;03@ir)n6)dk!F6~i7Nl1K=Z0jddY`tg1%JS>z9dN5`e-nb!BNm#%1+~8A$ zumP`mq23Telk70pG6;5}$v}o}kf;nob{9!Qr_yl=L}d1m@%pef8qnQDZZ`dwPJ^_t zNkooLWCM=TcIH^d48#n?44j&QE)SU%-~VqM|NsBg`eI -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/accepts/README.md b/Languages/APIs/movie-rating/node_modules/accepts/README.md deleted file mode 100644 index 66a2f5400..000000000 --- a/Languages/APIs/movie-rating/node_modules/accepts/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# accepts - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). -Extracted from [koa](https://www.npmjs.com/package/koa) for general use. - -In addition to negotiator, it allows: - -- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` - as well as `('text/html', 'application/json')`. -- Allows type shorthands such as `json`. -- Returns `false` when no types match -- Treats non-existent headers as `*` - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install accepts -``` - -## API - - - -```js -var accepts = require('accepts') -``` - -### accepts(req) - -Create a new `Accepts` object for the given `req`. - -#### .charset(charsets) - -Return the first accepted charset. If nothing in `charsets` is accepted, -then `false` is returned. - -#### .charsets() - -Return the charsets that the request accepts, in the order of the client's -preference (most preferred first). - -#### .encoding(encodings) - -Return the first accepted encoding. If nothing in `encodings` is accepted, -then `false` is returned. - -#### .encodings() - -Return the encodings that the request accepts, in the order of the client's -preference (most preferred first). - -#### .language(languages) - -Return the first accepted language. If nothing in `languages` is accepted, -then `false` is returned. - -#### .languages() - -Return the languages that the request accepts, in the order of the client's -preference (most preferred first). - -#### .type(types) - -Return the first accepted type (and it is returned as the same text as what -appears in the `types` array). If nothing in `types` is accepted, then `false` -is returned. - -The `types` array can contain full MIME types or file extensions. Any value -that is not a full MIME types is passed to `require('mime-types').lookup`. - -#### .types() - -Return the types that the request accepts, in the order of the client's -preference (most preferred first). - -## Examples - -### Simple type negotiation - -This simple example shows how to use `accepts` to return a different typed -respond body based on what the client wants to accept. The server lists it's -preferences in order and will get back the best match between the client and -server. - -```js -var accepts = require('accepts') -var http = require('http') - -function app (req, res) { - var accept = accepts(req) - - // the order of this list is significant; should be server preferred order - switch (accept.type(['json', 'html'])) { - case 'json': - res.setHeader('Content-Type', 'application/json') - res.write('{"hello":"world!"}') - break - case 'html': - res.setHeader('Content-Type', 'text/html') - res.write('hello, world!') - break - default: - // the fallback is text/plain, so no need to specify it above - res.setHeader('Content-Type', 'text/plain') - res.write('hello, world!') - break - } - - res.end() -} - -http.createServer(app).listen(3000) -``` - -You can test this out with the cURL program: -```sh -curl -I -H'Accept: text/html' http://localhost:3000/ -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master -[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master -[node-version-image]: https://badgen.net/npm/node/accepts -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/accepts -[npm-url]: https://npmjs.org/package/accepts -[npm-version-image]: https://badgen.net/npm/v/accepts -[travis-image]: https://badgen.net/travis/jshttp/accepts/master -[travis-url]: https://travis-ci.org/jshttp/accepts diff --git a/Languages/APIs/movie-rating/node_modules/accepts/index.js b/Languages/APIs/movie-rating/node_modules/accepts/index.js deleted file mode 100644 index e9b2f63fb..000000000 --- a/Languages/APIs/movie-rating/node_modules/accepts/index.js +++ /dev/null @@ -1,238 +0,0 @@ -/*! - * accepts - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var Negotiator = require('negotiator') -var mime = require('mime-types') - -/** - * Module exports. - * @public - */ - -module.exports = Accepts - -/** - * Create a new Accepts object for the given req. - * - * @param {object} req - * @public - */ - -function Accepts (req) { - if (!(this instanceof Accepts)) { - return new Accepts(req) - } - - this.headers = req.headers - this.negotiator = new Negotiator(req) -} - -/** - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single mime type string - * such as "application/json", the extension name - * such as "json" or an array `["json", "html", "text/plain"]`. When a list - * or array is given the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * this.types('html'); - * // => "html" - * - * // Accept: text/*, application/json - * this.types('html'); - * // => "html" - * this.types('text/html'); - * // => "text/html" - * this.types('json', 'text'); - * // => "json" - * this.types('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * this.types('image/png'); - * this.types('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * this.types(['html', 'json']); - * this.types('html', 'json'); - * // => "json" - * - * @param {String|Array} types... - * @return {String|Array|Boolean} - * @public - */ - -Accepts.prototype.type = -Accepts.prototype.types = function (types_) { - var types = types_ - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i] - } - } - - // no types, return all requested types - if (!types || types.length === 0) { - return this.negotiator.mediaTypes() - } - - // no accept header, return first given type - if (!this.headers.accept) { - return types[0] - } - - var mimes = types.map(extToMime) - var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) - var first = accepts[0] - - return first - ? types[mimes.indexOf(first)] - : false -} - -/** - * Return accepted encodings or best fit based on `encodings`. - * - * Given `Accept-Encoding: gzip, deflate` - * an array sorted by quality is returned: - * - * ['gzip', 'deflate'] - * - * @param {String|Array} encodings... - * @return {String|Array} - * @public - */ - -Accepts.prototype.encoding = -Accepts.prototype.encodings = function (encodings_) { - var encodings = encodings_ - - // support flattened arguments - if (encodings && !Array.isArray(encodings)) { - encodings = new Array(arguments.length) - for (var i = 0; i < encodings.length; i++) { - encodings[i] = arguments[i] - } - } - - // no encodings, return all requested encodings - if (!encodings || encodings.length === 0) { - return this.negotiator.encodings() - } - - return this.negotiator.encodings(encodings)[0] || false -} - -/** - * Return accepted charsets or best fit based on `charsets`. - * - * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` - * an array sorted by quality is returned: - * - * ['utf-8', 'utf-7', 'iso-8859-1'] - * - * @param {String|Array} charsets... - * @return {String|Array} - * @public - */ - -Accepts.prototype.charset = -Accepts.prototype.charsets = function (charsets_) { - var charsets = charsets_ - - // support flattened arguments - if (charsets && !Array.isArray(charsets)) { - charsets = new Array(arguments.length) - for (var i = 0; i < charsets.length; i++) { - charsets[i] = arguments[i] - } - } - - // no charsets, return all requested charsets - if (!charsets || charsets.length === 0) { - return this.negotiator.charsets() - } - - return this.negotiator.charsets(charsets)[0] || false -} - -/** - * Return accepted languages or best fit based on `langs`. - * - * Given `Accept-Language: en;q=0.8, es, pt` - * an array sorted by quality is returned: - * - * ['es', 'pt', 'en'] - * - * @param {String|Array} langs... - * @return {Array|String} - * @public - */ - -Accepts.prototype.lang = -Accepts.prototype.langs = -Accepts.prototype.language = -Accepts.prototype.languages = function (languages_) { - var languages = languages_ - - // support flattened arguments - if (languages && !Array.isArray(languages)) { - languages = new Array(arguments.length) - for (var i = 0; i < languages.length; i++) { - languages[i] = arguments[i] - } - } - - // no languages, return all requested languages - if (!languages || languages.length === 0) { - return this.negotiator.languages() - } - - return this.negotiator.languages(languages)[0] || false -} - -/** - * Convert extnames to mime. - * - * @param {String} type - * @return {String} - * @private - */ - -function extToMime (type) { - return type.indexOf('/') === -1 - ? mime.lookup(type) - : type -} - -/** - * Check if mime is valid. - * - * @param {String} type - * @return {String} - * @private - */ - -function validMime (type) { - return typeof type === 'string' -} diff --git a/Languages/APIs/movie-rating/node_modules/accepts/package.json b/Languages/APIs/movie-rating/node_modules/accepts/package.json deleted file mode 100644 index d1c0ae338..000000000 --- a/Languages/APIs/movie-rating/node_modules/accepts/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_from": "accepts@~1.3.7", - "_id": "accepts@1.3.7", - "_inBundle": false, - "_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "_location": "/accepts", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "accepts@~1.3.7", - "name": "accepts", - "escapedName": "accepts", - "rawSpec": "~1.3.7", - "saveSpec": null, - "fetchSpec": "~1.3.7" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd", - "_spec": "accepts@~1.3.7", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "bugs": { - "url": "https://github.com/jshttp/accepts/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "deprecated": false, - "description": "Higher-level content negotiation", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.0.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "homepage": "https://github.com/jshttp/accepts#readme", - "keywords": [ - "content", - "negotiation", - "accept", - "accepts" - ], - "license": "MIT", - "name": "accepts", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/accepts.git" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test" - }, - "version": "1.3.7" -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/.tonic_example.js b/Languages/APIs/movie-rating/node_modules/ajv/.tonic_example.js deleted file mode 100644 index aa11812d8..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/.tonic_example.js +++ /dev/null @@ -1,20 +0,0 @@ -var Ajv = require('ajv'); -var ajv = new Ajv({allErrors: true}); - -var schema = { - "properties": { - "foo": { "type": "string" }, - "bar": { "type": "number", "maximum": 3 } - } -}; - -var validate = ajv.compile(schema); - -test({"foo": "abc", "bar": 2}); -test({"foo": 2, "bar": 4}); - -function test(data) { - var valid = validate(data); - if (valid) console.log('Valid!'); - else console.log('Invalid: ' + ajv.errorsText(validate.errors)); -} \ No newline at end of file diff --git a/Languages/APIs/movie-rating/node_modules/ajv/LICENSE b/Languages/APIs/movie-rating/node_modules/ajv/LICENSE deleted file mode 100644 index 96ee71998..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Languages/APIs/movie-rating/node_modules/ajv/README.md b/Languages/APIs/movie-rating/node_modules/ajv/README.md deleted file mode 100644 index cafbd71c9..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/README.md +++ /dev/null @@ -1,1359 +0,0 @@ -Ajv logo - -# Ajv: Another JSON Schema Validator - -The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. - -[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) -[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) -[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) -[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) -[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) -[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) - - -## Using version 6 - -[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. - -[Ajv version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). - -__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: - -```javascript -ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); -``` - -To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId: - -```javascript -var ajv = new Ajv({schemaId: 'id'}); -// If you want to use both draft-04 and draft-06/07 schemas: -// var ajv = new Ajv({schemaId: 'auto'}); -ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); -``` - - -## Contents - -- [Performance](#performance) -- [Features](#features) -- [Getting started](#getting-started) -- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) -- [Using in browser](#using-in-browser) -- [Command line interface](#command-line-interface) -- Validation - - [Keywords](#validation-keywords) - - [Annotation keywords](#annotation-keywords) - - [Formats](#formats) - - [Combining schemas with $ref](#ref) - - [$data reference](#data-reference) - - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) - - [Defining custom keywords](#defining-custom-keywords) - - [Asynchronous schema compilation](#asynchronous-schema-compilation) - - [Asynchronous validation](#asynchronous-validation) -- [Security considerations](#security-considerations) - - [Security contact](#security-contact) - - [Untrusted schemas](#untrusted-schemas) - - [Circular references in objects](#circular-references-in-javascript-objects) - - [Trusted schemas](#security-risks-of-trusted-schemas) -- Modifying data during validation - - [Filtering data](#filtering-data) - - [Assigning defaults](#assigning-defaults) - - [Coercing data types](#coercing-data-types) -- API - - [Methods](#api) - - [Options](#options) - - [Validation errors](#validation-errors) -- [Plugins](#plugins) -- [Related packages](#related-packages) -- [Some packages using Ajv](#some-packages-using-ajv) -- [Tests, Contributing, History, Support, License](#tests) - - -## Performance - -Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. - -Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: - -- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place -- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster -- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) -- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) - - -Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): - -[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) - - -## Features - -- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: - - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) - - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) - - support of circular references between schemas - - correct string lengths for strings with unicode pairs (can be turned off) - - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off) - - [validates schemas against meta-schema](#api-validateschema) -- supports [browsers](#using-in-browser) and Node.js 0.10-8.x -- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation -- "All errors" validation mode with [option allErrors](#options) -- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages -- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package -- [filtering data](#filtering-data) from additional properties -- [assigning defaults](#assigning-defaults) to missing properties and items -- [coercing data](#coercing-data-types) to the types specified in `type` keywords -- [custom keywords](#defining-custom-keywords) -- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else` -- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail). -- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package -- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords -- [asynchronous validation](#asynchronous-validation) of custom formats and keywords - -Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). - - -## Install - -``` -npm install ajv -``` - - -## Getting started - -Try it in the Node.js REPL: https://tonicdev.com/npm/ajv - - -The fastest validation call: - -```javascript -var Ajv = require('ajv'); -var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} -var validate = ajv.compile(schema); -var valid = validate(data); -if (!valid) console.log(validate.errors); -``` - -or with less code - -```javascript -// ... -var valid = ajv.validate(schema, data); -if (!valid) console.log(ajv.errors); -// ... -``` - -or - -```javascript -// ... -var valid = ajv.addSchema(schema, 'mySchema') - .validate('mySchema', data); -if (!valid) console.log(ajv.errorsText()); -// ... -``` - -See [API](#api) and [Options](#options) for more details. - -Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. - -The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). - -__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) - - -## Using in browser - -You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. - -If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). - -Then you need to load Ajv in the browser: -```html - -``` - -This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. - -The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). - -Ajv is tested with these browsers: - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) - -__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). - - -## Command line interface - -CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: - -- compiling JSON Schemas to test their validity -- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) -- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) -- validating data file(s) against JSON Schema -- testing expected validity of data against JSON Schema -- referenced schemas -- custom meta-schemas -- files in JSON and JavaScript format -- all Ajv options -- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format - - -## Validation keywords - -Ajv supports all validation keywords from draft-07 of JSON Schema standard: - -- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) -- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf -- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format -- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) -- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) -- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) -- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#ifthenelse) - -With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: - -- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. -- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. - -See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. - - -## Annotation keywords - -JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation. - -- `title` and `description`: information about the data represented by that schema -- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options). -- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults). -- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema. -- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.). -- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64". -- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png". - -__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance. - - -## Formats - -The following formats are supported for string validation with "format" keyword: - -- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). -- _time_: time with optional time-zone. -- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). -- _uri_: full URI. -- _uri-reference_: URI reference, including full and relative URIs. -- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) -- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url). -- _email_: email address. -- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). -- _ipv4_: IP address v4. -- _ipv6_: IP address v6. -- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. -- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). -- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). -- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). - -__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here. - -There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, `email`, and `hostname`. See [Options](#options) for details. - -You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. - -The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. - -You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). - - -## Combining schemas with $ref - -You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. - -Example: - -```javascript -var schema = { - "$id": "http://example.com/schemas/schema.json", - "type": "object", - "properties": { - "foo": { "$ref": "defs.json#/definitions/int" }, - "bar": { "$ref": "defs.json#/definitions/str" } - } -}; - -var defsSchema = { - "$id": "http://example.com/schemas/defs.json", - "definitions": { - "int": { "type": "integer" }, - "str": { "type": "string" } - } -}; -``` - -Now to compile your schema you can either pass all schemas to Ajv instance: - -```javascript -var ajv = new Ajv({schemas: [schema, defsSchema]}); -var validate = ajv.getSchema('http://example.com/schemas/schema.json'); -``` - -or use `addSchema` method: - -```javascript -var ajv = new Ajv; -var validate = ajv.addSchema(defsSchema) - .compile(schema); -``` - -See [Options](#options) and [addSchema](#api) method. - -__Please note__: -- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). -- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). -- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. -- The actual location of the schema file in the file system is not used. -- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. -- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. -- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). - - -## $data reference - -With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. - -`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. - -The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). - -Examples. - -This schema requires that the value in property `smaller` is less or equal than the value in the property larger: - -```javascript -var ajv = new Ajv({$data: true}); - -var schema = { - "properties": { - "smaller": { - "type": "number", - "maximum": { "$data": "1/larger" } - }, - "larger": { "type": "number" } - } -}; - -var validData = { - smaller: 5, - larger: 7 -}; - -ajv.validate(schema, validData); // true -``` - -This schema requires that the properties have the same format as their field names: - -```javascript -var schema = { - "additionalProperties": { - "type": "string", - "format": { "$data": "0#" } - } -}; - -var validData = { - 'date-time': '1963-06-19T08:30:06.283185Z', - email: 'joe.bloggs@example.com' -} -``` - -`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. - - -## $merge and $patch keywords - -With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). - -To add keywords `$merge` and `$patch` to Ajv instance use this code: - -```javascript -require('ajv-merge-patch')(ajv); -``` - -Examples. - -Using `$merge`: - -```json -{ - "$merge": { - "source": { - "type": "object", - "properties": { "p": { "type": "string" } }, - "additionalProperties": false - }, - "with": { - "properties": { "q": { "type": "number" } } - } - } -} -``` - -Using `$patch`: - -```json -{ - "$patch": { - "source": { - "type": "object", - "properties": { "p": { "type": "string" } }, - "additionalProperties": false - }, - "with": [ - { "op": "add", "path": "/properties/q", "value": { "type": "number" } } - ] - } -} -``` - -The schemas above are equivalent to this schema: - -```json -{ - "type": "object", - "properties": { - "p": { "type": "string" }, - "q": { "type": "number" } - }, - "additionalProperties": false -} -``` - -The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. - -See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. - - -## Defining custom keywords - -The advantages of using custom keywords are: - -- allow creating validation scenarios that cannot be expressed using JSON Schema -- simplify your schemas -- help bringing a bigger part of the validation logic to your schemas -- make your schemas more expressive, less verbose and closer to your application domain -- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated - -If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). - -The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. - -You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. - -Ajv allows defining keywords with: -- validation function -- compilation function -- macro function -- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. - -Example. `range` and `exclusiveRange` keywords using compiled schema: - -```javascript -ajv.addKeyword('range', { - type: 'number', - compile: function (sch, parentSchema) { - var min = sch[0]; - var max = sch[1]; - - return parentSchema.exclusiveRange === true - ? function (data) { return data > min && data < max; } - : function (data) { return data >= min && data <= max; } - } -}); - -var schema = { "range": [2, 4], "exclusiveRange": true }; -var validate = ajv.compile(schema); -console.log(validate(2.01)); // true -console.log(validate(3.99)); // true -console.log(validate(2)); // false -console.log(validate(4)); // false -``` - -Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. - -See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. - - -## Asynchronous schema compilation - -During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). - -Example: - -```javascript -var ajv = new Ajv({ loadSchema: loadSchema }); - -ajv.compileAsync(schema).then(function (validate) { - var valid = validate(data); - // ... -}); - -function loadSchema(uri) { - return request.json(uri).then(function (res) { - if (res.statusCode >= 400) - throw new Error('Loading error: ' + res.statusCode); - return res.body; - }); -} -``` - -__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. - - -## Asynchronous validation - -Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation - -You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). - -If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. - -__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. - -Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). - -Ajv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options). - -The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. - -Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. - - -Example: - -```javascript -var ajv = new Ajv; -// require('ajv-async')(ajv); - -ajv.addKeyword('idExists', { - async: true, - type: 'number', - validate: checkIdExists -}); - - -function checkIdExists(schema, data) { - return knex(schema.table) - .select('id') - .where('id', data) - .then(function (rows) { - return !!rows.length; // true if record is found - }); -} - -var schema = { - "$async": true, - "properties": { - "userId": { - "type": "integer", - "idExists": { "table": "users" } - }, - "postId": { - "type": "integer", - "idExists": { "table": "posts" } - } - } -}; - -var validate = ajv.compile(schema); - -validate({ userId: 1, postId: 19 }) -.then(function (data) { - console.log('Data is valid', data); // { userId: 1, postId: 19 } -}) -.catch(function (err) { - if (!(err instanceof Ajv.ValidationError)) throw err; - // data is invalid - console.log('Validation errors:', err.errors); -}); -``` - -### Using transpilers with asynchronous validation functions. - -[ajv-async](https://github.com/epoberezkin/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). - - -#### Using nodent - -```javascript -var ajv = new Ajv; -require('ajv-async')(ajv); -// in the browser if you want to load ajv-async bundle separately you can: -// window.ajvAsync(ajv); -var validate = ajv.compile(schema); // transpiled es7 async function -validate(data).then(successFunc).catch(errorFunc); -``` - - -#### Using other transpilers - -```javascript -var ajv = new Ajv({ processCode: transpileFunc }); -var validate = ajv.compile(schema); // transpiled es7 async function -validate(data).then(successFunc).catch(errorFunc); -``` - -See [Options](#options). - - -## Security considerations - -JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider. - - -##### Security contact - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues. - - -##### Untrusted schemas - -Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application. - -If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent: -- compiling schemas can cause stack overflow (if they are too deep) -- compiling schemas can be slow (e.g. [#557](https://github.com/epoberezkin/ajv/issues/557)) -- validating certain data can be slow - -It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords. - -Regardless the measures you take, using untrusted schemas increases security risks. - - -##### Circular references in JavaScript objects - -Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/epoberezkin/ajv/issues/802). - -An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references. - - -##### Security risks of trusted schemas - -Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to): - -- `pattern` and `format` for large strings - use `maxLength` to mitigate -- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate -- `patternProperties` for large property names - use `propertyNames` to mitigate - -__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors). - -You can validate your JSON schemas against [this meta-schema](https://github.com/epoberezkin/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: - -```javascript -const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json')); - -const schema1 = {format: 'email'}; -isSchemaSecure(schema1); // false - -const schema2 = {format: 'email', maxLength: 256}; -isSchemaSecure(schema2); // true -``` - -__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results. - - -## Filtering data - -With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. - -This option modifies original data. - -Example: - -```javascript -var ajv = new Ajv({ removeAdditional: true }); -var schema = { - "additionalProperties": false, - "properties": { - "foo": { "type": "number" }, - "bar": { - "additionalProperties": { "type": "number" }, - "properties": { - "baz": { "type": "string" } - } - } - } -} - -var data = { - "foo": 0, - "additional1": 1, // will be removed; `additionalProperties` == false - "bar": { - "baz": "abc", - "additional2": 2 // will NOT be removed; `additionalProperties` != false - }, -} - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } -``` - -If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. - -If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). - -__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: - -```json -{ - "type": "object", - "oneOf": [ - { - "properties": { - "foo": { "type": "string" } - }, - "required": [ "foo" ], - "additionalProperties": false - }, - { - "properties": { - "bar": { "type": "integer" } - }, - "required": [ "bar" ], - "additionalProperties": false - } - ] -} -``` - -The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. - -With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). - -While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: - -```json -{ - "type": "object", - "properties": { - "foo": { "type": "string" }, - "bar": { "type": "integer" } - }, - "additionalProperties": false, - "oneOf": [ - { "required": [ "foo" ] }, - { "required": [ "bar" ] } - ] -} -``` - -The schema above is also more efficient - it will compile into a faster function. - - -## Assigning defaults - -With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. - -With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults. - -This option modifies original data. - -__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema. - - -Example 1 (`default` in `properties`): - -```javascript -var ajv = new Ajv({ useDefaults: true }); -var schema = { - "type": "object", - "properties": { - "foo": { "type": "number" }, - "bar": { "type": "string", "default": "baz" } - }, - "required": [ "foo", "bar" ] -}; - -var data = { "foo": 1 }; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": 1, "bar": "baz" } -``` - -Example 2 (`default` in `items`): - -```javascript -var schema = { - "type": "array", - "items": [ - { "type": "number" }, - { "type": "string", "default": "foo" } - ] -} - -var data = [ 1 ]; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // [ 1, "foo" ] -``` - -`default` keywords in other cases are ignored: - -- not in `properties` or `items` subschemas -- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) -- in `if` subschema of `switch` keyword -- in schemas generated by custom macro keywords - -The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning). - - -## Coercing data types - -When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. - -This option modifies original data. - -__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. - - -Example 1: - -```javascript -var ajv = new Ajv({ coerceTypes: true }); -var schema = { - "type": "object", - "properties": { - "foo": { "type": "number" }, - "bar": { "type": "boolean" } - }, - "required": [ "foo", "bar" ] -}; - -var data = { "foo": "1", "bar": "false" }; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": 1, "bar": false } -``` - -Example 2 (array coercions): - -```javascript -var ajv = new Ajv({ coerceTypes: 'array' }); -var schema = { - "properties": { - "foo": { "type": "array", "items": { "type": "number" } }, - "bar": { "type": "boolean" } - } -}; - -var data = { "foo": "1", "bar": ["false"] }; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": [1], "bar": false } -``` - -The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). - -See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. - - -## API - -##### new Ajv(Object options) -> Object - -Create Ajv instance. - - -##### .compile(Object schema) -> Function<Object data> - -Generate validating function and cache the compiled schema for future use. - -Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema. - -The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options). - - -##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise - -Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: - -- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). -- a schema containing a missing reference is loaded, but the reference cannot be resolved. -- schema (or some loaded/referenced schema) is invalid. - -The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. - -You can asynchronously compile meta-schema by passing `true` as the second parameter. - -See example in [Asynchronous compilation](#asynchronous-schema-compilation). - - -##### .validate(Object schema|String key|String ref, data) -> Boolean - -Validate data using passed schema (it will be compiled and cached). - -Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. - -Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). - -__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. - -If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). - - -##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv - -Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. - -Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. - -Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. - - -Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. - -Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. - -By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. - -__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. -This allows you to do nice things like the following. - -```javascript -var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); -``` - -##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv - -Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). - -There is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. - - -##### .validateSchema(Object schema) -> Boolean - -Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. - -By default this method is called automatically when the schema is added, so you rarely need to use it directly. - -If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). - -If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. - -Errors will be available at `ajv.errors`. - - -##### .getSchema(String key) -> Function<Object data> - -Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. - - -##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv - -Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. - -Schema can be removed using: -- key passed to `addSchema` -- it's full reference (id) -- RegExp that should match schema id or key (meta-schemas won't be removed) -- actual schema object that will be stable-stringified to remove schema from cache - -If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. - - -##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv - -Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. - -Strings are converted to RegExp. - -Function should return validation result as `true` or `false`. - -If object is passed it should have properties `validate`, `compare` and `async`: - -- _validate_: a string, RegExp or a function as described above. -- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. -- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. -- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. - -Custom formats can be also added via `formats` option. - - -##### .addKeyword(String keyword, Object definition) -> Ajv - -Add custom validation keyword to Ajv instance. - -Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. - -Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. -It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. - -Example Keywords: -- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. -- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc. -- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword - -Keyword definition is an object with the following properties: - -- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. -- _validate_: validating function -- _compile_: compiling function -- _macro_: macro function -- _inline_: compiling function that returns code (as string) -- _schema_: an optional `false` value used with "validate" keyword to not pass schema -- _metaSchema_: an optional meta-schema for keyword schema -- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation -- _modifying_: `true` MUST be passed if keyword modifies data -- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression) -- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. -- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). -- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. -- _errors_: an optional boolean or string `"full"` indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. - -_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. - -__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. - -See [Defining custom keywords](#defining-custom-keywords) for more details. - - -##### .getKeyword(String keyword) -> Object|Boolean - -Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. - - -##### .removeKeyword(String keyword) -> Ajv - -Removes custom or pre-defined keyword so you can redefine them. - -While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. - -__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. - - -##### .errorsText([Array<Object> errors [, Object options]]) -> String - -Returns the text with all errors in a String. - -Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). - - -## Options - -Defaults: - -```javascript -{ - // validation and reporting options: - $data: false, - allErrors: false, - verbose: false, - $comment: false, // NEW in Ajv version 6.0 - jsonPointers: false, - uniqueItems: true, - unicode: true, - nullable: false, - format: 'fast', - formats: {}, - unknownFormats: true, - schemas: {}, - logger: undefined, - // referenced schema options: - schemaId: '$id', - missingRefs: true, - extendRefs: 'ignore', // recommended 'fail' - loadSchema: undefined, // function(uri: string): Promise {} - // options to modify validated data: - removeAdditional: false, - useDefaults: false, - coerceTypes: false, - // strict mode options - strictDefaults: false, - strictKeywords: false, - // asynchronous validation options: - transpile: undefined, // requires ajv-async package - // advanced options: - meta: true, - validateSchema: true, - addUsedSchema: true, - inlineRefs: true, - passContext: false, - loopRequired: Infinity, - ownProperties: false, - multipleOfPrecision: false, - errorDataPath: 'object', // deprecated - messages: true, - sourceCode: false, - processCode: undefined, // function (str: string): string {} - cache: new Cache, - serialize: undefined -} -``` - -##### Validation and reporting options - -- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). -- _allErrors_: check all rules collecting all errors. Default is to return after the first error. -- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). -- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values: - - `false` (default): ignore $comment keyword. - - `true`: log the keyword value to console. - - function: pass the keyword value, its schema path and root schema to the specified function -- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. -- _uniqueItems_: validate `uniqueItems` keyword (true by default). -- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. -- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/). -- _format_: formats validation mode. Option values: - - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option). - - `"full"` - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. - - `false` - ignore all format keywords. -- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. -- _unknownFormats_: handling of unknown formats. Option values: - - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. - - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. - - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification. -- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. -- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values: - - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. - - `false` - logging is disabled. - - -##### Referenced schema options - -- _schemaId_: this option defines which keywords are used as schema URI. Option value: - - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged). - - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). - - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. -- _missingRefs_: handling of missing referenced schemas. Option values: - - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). - - `"ignore"` - to log error during compilation and always pass validation. - - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. -- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: - - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. - - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. - - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). -- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). - - -##### Options to modify validated data - -- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: - - `false` (default) - not to remove additional properties - - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). - - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. - - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). -- _useDefaults_: replace missing or undefined properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: - - `false` (default) - do not use defaults - - `true` - insert defaults by value (object literal is used). - - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string). - - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. -- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: - - `false` (default) - no type coercion. - - `true` - coerce scalar data types. - - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). - - -##### Strict mode options - -- _strictDefaults_: report ignored `default` keywords in schemas. Option values: - - `false` (default) - ignored defaults are not reported - - `true` - if an ignored default is present, throw an error - - `"log"` - if an ignored default is present, log warning -- _strictKeywords_: report unknown keywords in schemas. Option values: - - `false` (default) - unknown keywords are not reported - - `true` - if an unknown keyword is present, throw an error - - `"log"` - if an unknown keyword is present, log warning - - -##### Asynchronous validation options - -- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: - - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. - - `true` - always transpile with nodent. - - `false` - do not transpile; if async functions are not supported an exception will be thrown. - - -##### Advanced options - -- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. -- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: - - `true` (default) - if the validation fails, throw the exception. - - `"log"` - if the validation fails, log error. - - `false` - skip schema validation. -- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. -- _inlineRefs_: Affects compilation of referenced schemas. Option values: - - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. - - `false` - to not inline referenced schemas (they will be compiled as separate functions). - - integer number - to limit the maximum number of keywords of the schema that will be inlined. -- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. -- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. -- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. -- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). -- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. -- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). -- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). -- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: - - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. - - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. -- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. -- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. - - -## Validation errors - -In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. - - -### Error objects - -Each error is an object with the following properties: - -- _keyword_: validation keyword. -- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). -- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. -- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. -- _message_: the standard error message (can be excluded with option `messages` set to false). -- _schema_: the schema of the keyword (added with `verbose` option). -- _parentSchema_: the schema containing the keyword (added with `verbose` option) -- _data_: the data validated by the keyword (added with `verbose` option). - -__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. - - -### Error parameters - -Properties of `params` object in errors depend on the keyword that failed validation. - -- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). -- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). -- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). -- `dependencies` - properties: - - `property` (dependent property), - - `missingProperty` (required missing dependency - only the first one is reported currently) - - `deps` (required dependencies, comma separated list as a string), - - `depsCount` (the number of required dependencies). -- `format` - property `format` (the schema of the keyword). -- `maximum`, `minimum` - properties: - - `limit` (number, the schema of the keyword), - - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), - - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") -- `multipleOf` - property `multipleOf` (the schema of the keyword) -- `pattern` - property `pattern` (the schema of the keyword) -- `required` - property `missingProperty` (required property that is missing). -- `propertyNames` - property `propertyName` (an invalid property name). -- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). -- `type` - property `type` (required type(s), a string, can be a comma-separated list) -- `uniqueItems` - properties `i` and `j` (indices of duplicate items). -- `const` - property `allowedValue` pointing to the value (the schema of the keyword). -- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). -- `$ref` - property `ref` with the referenced schema URI. -- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes). -- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). - - -## Plugins - -Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: - -- it exports a function -- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining -- this function can accept an optional configuration as the second parameter - -If you have published a useful plugin please submit a PR to add it to the next section. - - -## Related packages - -- [ajv-async](https://github.com/epoberezkin/ajv-async) - plugin to configure async validation mode -- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats -- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface -- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - plugin for custom error messages -- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages -- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas -- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) -- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - plugin with keywords $merge and $patch -- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions - - -## Some packages using Ajv - -- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser -- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services -- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition -- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator -- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org -- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com -- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js -- [table](https://github.com/gajus/table) - formats data into a string table -- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser -- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content -- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation -- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation -- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages -- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema -- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests -- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema -- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file -- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app -- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter -- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages -- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX - - -## Tests - -``` -npm install -git submodule update --init -npm test -``` - -## Contributing - -All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. - -`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. - -`npm run watch` - automatically compiles templates when files in dot folder change - -Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) - - -## Changes history - -See https://github.com/epoberezkin/ajv/releases - -__Please note__: [Changes in version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0). - -[Version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). - -[Version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). - -[Version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). - -[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). - - -## Open-source software support - -Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers. - - -## License - -[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) diff --git a/Languages/APIs/movie-rating/node_modules/ajv/dist/ajv.bundle.js b/Languages/APIs/movie-rating/node_modules/ajv/dist/ajv.bundle.js deleted file mode 100644 index a6afe9935..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/dist/ajv.bundle.js +++ /dev/null @@ -1,7172 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: hostname, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -function hostname(str) { - // https://tools.ietf.org/html/rfc1034#section-3.5 - // https://tools.ietf.org/html/rfc1123#section-2 - return str.length <= 255 && HOSTNAME.test(str); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} - -},{"./util":10}],5:[function(require,module,exports){ -'use strict'; - -var resolve = require('./resolve') - , util = require('./util') - , errorClasses = require('./error_classes') - , stableStringify = require('fast-json-stable-stringify'); - -var validateGenerator = require('../dotjs/validate'); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = require('fast-deep-equal'); - -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; - -module.exports = compile; - - -/** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function - */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; - - root = root || { schema: schema, refVal: refVal, refs: refs }; - - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); - - var formats = this._formats; - var RULES = this.RULES; - - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } - - /* @this {*} - custom context, see passContext option */ - function callValidate() { - /* jshint validthis: true */ - var validate = compilation.validate; - var result = validate.apply(this, arguments); - callValidate.errors = validate.errors; - return result; - } - - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); - - var $async = _schema.$async === true; - - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); - - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - - if (opts.processCode) sourceCode = opts.processCode(sourceCode); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'equal', - 'ucs2length', - 'ValidationError', - sourceCode - ); - - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError - ); - - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } - - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } - - return validate; - } - - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } - - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } - - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } - - function removeLocalRef(ref) { - delete refs[ref]; - } - - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } - - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && !!refVal.$async }; - } - - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } - - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; - } - } - - function useCustomRule(rule, schema, parentSchema, it) { - if (self._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error('parent schema must have all required keywords: ' + deps.join(',')); - - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } - } - - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; - - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - - var index = customRules.length; - customRules[index] = validate; - - return { - code: 'customRule' + index, - validate: validate - }; - } -} - - -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} - - -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} - - -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } - } - return length; -}; - -},{}],10:[function(require,module,exports){ -'use strict'; - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: require('fast-deep-equal'), - ucs2length: require('./ucs2length'), - varOccurences: varOccurences, - varReplace: varReplace, - cleanUpCode: cleanUpCode, - finalCleanUpCode: finalCleanUpCode, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],14:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],15:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],16:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],17:[function(require,module,exports){ -'use strict'; -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - out = it.util.cleanUpCode(out); - return out; -} - -},{}],18:[function(require,module,exports){ -'use strict'; -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - -},{}],19:[function(require,module,exports){ -'use strict'; -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} - -},{}],20:[function(require,module,exports){ -'use strict'; -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],21:[function(require,module,exports){ -'use strict'; -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - return out; -} - -},{}],22:[function(require,module,exports){ -'use strict'; -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += 'await '; - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} - -},{}],24:[function(require,module,exports){ -'use strict'; -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],25:[function(require,module,exports){ -'use strict'; -module.exports = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],26:[function(require,module,exports){ -'use strict'; -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - -},{}],27:[function(require,module,exports){ -'use strict'; - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': require('./ref'), - allOf: require('./allOf'), - anyOf: require('./anyOf'), - '$comment': require('./comment'), - const: require('./const'), - contains: require('./contains'), - dependencies: require('./dependencies'), - 'enum': require('./enum'), - format: require('./format'), - 'if': require('./if'), - items: require('./items'), - maximum: require('./_limit'), - minimum: require('./_limit'), - maxItems: require('./_limitItems'), - minItems: require('./_limitItems'), - maxLength: require('./_limitLength'), - minLength: require('./_limitLength'), - maxProperties: require('./_limitProperties'), - minProperties: require('./_limitProperties'), - multipleOf: require('./multipleOf'), - not: require('./not'), - oneOf: require('./oneOf'), - pattern: require('./pattern'), - properties: require('./properties'), - propertyNames: require('./propertyNames'), - required: require('./required'), - uniqueItems: require('./uniqueItems'), - validate: require('./validate') -}; - -},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){ -'use strict'; -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} - -},{}],29:[function(require,module,exports){ -'use strict'; -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],30:[function(require,module,exports){ -'use strict'; -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; -} - -},{}],31:[function(require,module,exports){ -'use strict'; -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - -},{}],32:[function(require,module,exports){ -'use strict'; -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],33:[function(require,module,exports){ -'use strict'; -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} - -},{}],34:[function(require,module,exports){ -'use strict'; -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} - -},{}],37:[function(require,module,exports){ -'use strict'; -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - -},{}],38:[function(require,module,exports){ -'use strict'; -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [undefined]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; - } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } - if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - out = it.util.cleanUpCode(out); - if ($top) { - out = it.util.finalCleanUpCode(out, $async); - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} - -},{}],39:[function(require,module,exports){ -'use strict'; - -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = require('./dotjs/custom'); -var definitionSchema = require('./definition_schema'); - -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword -}; - - -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); - - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); - - if (definition) { - this.validateKeyword(definition, true); - - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i=0; i 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} -function subexp(str) { - return "(?:" + str + ")"; -} -function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); -} -function toUpperCase(str) { - return str.toUpperCase(); -} -function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; -} -function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; -} - -function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), - //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), - //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), - //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), - //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), - //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), - //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), - //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), - //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -var URI_PROTOCOL = buildExps(false); - -var IRI_PROTOCOL = buildExps(true); - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - - - - - - - - - - - - - -var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}; - -/** Highest positive signed 32-bit float value */ - -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' - -/** Regular expressions */ -var regexPunycode = /^xn--/; -var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error$1(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); -}; - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -var digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -var decode = function decode(input) { - // Don't use UCS-2. - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (var j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - var oldi = i; - for (var w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error$1('invalid-input'); - } - - var digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - - w *= baseMinusT; - } - - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - - return String.fromCodePoint.apply(String, output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -var encode = function encode(input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - - // Handle the basic code points. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var basicLength = output.length; - var handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base;; /* no condition */k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -var SCHEMES = {}; -function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; -} -function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} - -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } -} -var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; -function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - //fix port number - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} - -function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number") { - uriTokens.push(":"); - uriTokens.push(components.port.toString(10)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} - -var RDS1 = /^\.\.?\//; -var RDS2 = /^\/\.(\/|$)/; -var RDS3 = /^\/\.\.(\/|$)/; -var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} - -function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) {} - //TODO: normalize IPv6 address as per RFC 5952 - - //if host component is a domain name - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - //convert IDN via punycode - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} - -function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} - -function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} - -function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} - -function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} - -function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); -} - -function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); -} - -var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - //normalize the default port - if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; - -var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize -}; - -var O = {}; -var isIRI = true; -//RFC 3986 -var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -var UNRESERVED = new RegExp(UNRESERVED$$, "g"); -var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -var NOT_HFVALUE = NOT_HFNAME; -function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; -} -var handler$2 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; - -var URN_PARSE = /^([^\:]+)\:(.*)/; -//RFC 2141 -var handler$3 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } -}; - -var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -//RFC 4122 -var handler$4 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } -}; - -SCHEMES[handler.scheme] = handler; -SCHEMES[handler$1.scheme] = handler$1; -SCHEMES[handler$2.scheme] = handler$2; -SCHEMES[handler$3.scheme] = handler$3; -SCHEMES[handler$4.scheme] = handler$4; - -exports.SCHEMES = SCHEMES; -exports.pctEncChar = pctEncChar; -exports.pctDecChars = pctDecChars; -exports.parse = parse; -exports.removeDotSegments = removeDotSegments; -exports.serialize = serialize; -exports.resolveComponents = resolveComponents; -exports.resolve = resolve; -exports.normalize = normalize; -exports.equal = equal; -exports.escapeComponent = escapeComponent; -exports.unescapeComponent = unescapeComponent; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - - -},{}],"ajv":[function(require,module,exports){ -'use strict'; - -var compileSchema = require('./compile') - , resolve = require('./compile/resolve') - , Cache = require('./cache') - , SchemaObject = require('./compile/schema_obj') - , stableStringify = require('fast-json-stable-stringify') - , formats = require('./compile/formats') - , rules = require('./compile/rules') - , $dataMetaSchema = require('./data') - , util = require('./compile/util'); - -module.exports = Ajv; - -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; - -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; - -Ajv.prototype.compileAsync = require('./compile/async'); -var customKeyword = require('./keyword'); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = require('./compile/error_classes'); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; - -var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; - -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; -var META_SUPPORT_DATA = ['/properties']; - -/** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance - */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - - if (opts.formats) addInitialFormats(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); - addInitialSchemas(this); -} - - - -/** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } - - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; -} - - -/** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function - */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); -} - - -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,f=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&s.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var $=e("./resolve"),D=e("./util"),j=e("./error_classes"),O=e("fast-json-stable-stringify"),I=e("../dotjs/validate"),A=D.ucs2length,C=e("fast-deep-equal"),k=j.Validation;function L(e,r,t){var a=s.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}function z(e,r,t){var a=s.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}function s(e,r,t){for(var a=0;a",g=f?">":"<",P=void 0;if(v){var E=e.util.getData(m.$data,i,e.dataPathArr),w="exclusive"+o,b="exclType"+o,S="exclIsNumber"+o,_="' + "+(R="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+E+"; ";var F;P=p;(F=F||[]).push(s+=" var "+w+"; var "+b+" = typeof "+(E="schemaExcl"+o)+"; if ("+b+" != 'boolean' && "+b+" != 'undefined' && "+b+" != 'number') { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var x=s;s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+b+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+E+" "+y+"= "+a+") ? "+h+" "+g+"= "+E+" : "+h+" "+g+" "+a+" ) : ( ("+w+" = "+E+" === true) ? "+h+" "+g+"= "+a+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { var op"+o+" = "+w+" ? '"+y+"' : '"+y+"='; ",void 0===n&&(c=e.errSchemaPath+"/"+(P=p),a=E,d=v)}else{_=y;if((S="number"==typeof m)&&d){var R="'"+_+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+y+"= "+a+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { "}else{S&&void 0===n?(w=!0,c=e.errSchemaPath+"/"+(P=p),a=m,g+="="):(S&&(a=Math[f?"min":"max"](m,n)),m===(!S||a)?(w=!0,c=e.errSchemaPath+"/"+(P=p),g+="="):(w=!1,_+="="));R="'"+_+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+h+" "+g+" "+a+" || "+h+" !== "+h+") { "}}P=P||r,(F=F||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+R+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+_+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";x=s;return s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"fewer",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+h+".length ":" ucs2length("+h+") ";var f=r,p=p||[];p.push(s+=" "+("maxLength"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;a=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"fewer",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m "+x+") { ";var $=u+"["+x+"]";f.schema=F,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;var D=e.validate(f);f.baseId=P,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",a+=" } ",c&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&(e.opts.strictKeywords?"object"==typeof E&&0 "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;D=e.validate(f);f.baseId=P,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+m+") break; "),a+=" } } ",c&&(a+=" if ("+m+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) ");var f=f||[];f.push(s+=" ) { "),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof i&&0 1) { ";var p=e.schema.items&&e.schema.items.type,m=Array.isArray(p);if(!p||"object"==p||"array"==p||m&&(0<=p.indexOf("object")||0<=p.indexOf("array")))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else s+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ",s+=" if ("+e.util["checkDataType"+(m?"s":"")](p,"item",!0)+") continue; ",m&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ";s+=" } ",f&&(s+=" } ");var v=v||[];v.push(s+=" if (!"+d+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var y=s;s=v.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e,r){var t="",s=!0===a.schema.$async,o=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),i=a.self._getId(a.schema);if(a.opts.strictKeywords){var n=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(n){var l="unknown keyword: "+n;if("log"!==a.opts.strictKeywords)throw new Error(l);a.logger.warn(l)}}if(a.isTop&&(t+=" var validate = ",s&&(a.async=!0,t+="async "),t+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(a.opts.sourceCode||a.opts.processCode)&&(t+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof a.schema||!o&&!a.schema.$ref){var c=a.level,u=a.dataLevel,h=a.schema[e="false schema"],d=a.schemaPath+a.util.getProperty(e),f=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,m="data"+(u||""),v="valid"+c;if(!1===a.schema){a.isTop?p=!0:t+=" var "+v+" = false; ",(G=G||[]).push(t),t="",!1!==a.createErrors?(t+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(f)+" , params: {} ",!1!==a.opts.messages&&(t+=" , message: 'boolean schema is false' "),a.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+m+" "),t+=" } "):t+=" {} ";var y=t;t=G.pop(),t+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else t+=a.isTop?s?" return data; ":" validate.errors = null; return true; ":" var "+v+" = true; ";return a.isTop&&(t+=" }; return validate; "),t}if(a.isTop){var g=a.isTop;c=a.level=0,u=a.dataLevel=0,m="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[void 0],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var P="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(P);a.logger.warn(P)}t+=" var vErrors = null; ",t+=" var errors = 0; ",t+=" if (rootData === undefined) rootData = data; "}else{c=a.level,m="data"+((u=a.dataLevel)||"");if(i&&(a.baseId=a.resolve.url(a.baseId,i)),s&&!a.async)throw new Error("async schema in sync schema");t+=" var errs_"+c+" = errors;"}v="valid"+c,p=!a.opts.allErrors;var E="",w="",b=a.schema.type,S=Array.isArray(b);if(b&&a.opts.nullable&&!0===a.schema.nullable&&(S?-1==b.indexOf("null")&&(b=b.concat("null")):"null"!=b&&(b=[b,"null"],S=!0)),S&&1==b.length&&(b=b[0],S=!1),a.schema.$ref&&o){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(o=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(t+=" "+a.RULES.all.$comment.code(a,"$comment")),b){if(a.opts.coerceTypes)var _=a.util.coerceToTypes(a.opts.coerceTypes,b);var F=a.RULES.types[b];if(_||S||!0===F||F&&!Y(F)){d=a.schemaPath+".type",f=a.errSchemaPath+"/type",d=a.schemaPath+".type",f=a.errSchemaPath+"/type";if(t+=" if ("+a.util[S?"checkDataTypes":"checkDataType"](b,m,!0)+") { ",_){var x="dataType"+c,R="coerced"+c;t+=" var "+x+" = typeof "+m+"; ","array"==a.opts.coerceTypes&&(t+=" if ("+x+" == 'object' && Array.isArray("+m+")) "+x+" = 'array'; "),t+=" var "+R+" = undefined; ";var $="",D=_;if(D)for(var j,O=-1,I=D.length-1;O= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=Math.floor,z=String.fromCharCode;function T(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=L(e/r);455L((A-s)/h))&&T("overflow"),s+=f*h;var p=d<=i?1:i+26<=d?26:d-i;if(fL(A/m)&&T("overflow"),h*=m}var v=t.length+1;i=Q(s-u,v,0==u),L(s/v)>A-o&&T("overflow"),o+=L(s/v),s%=v,t.splice(s++,0,o)}return String.fromCodePoint.apply(String,t)},c=function(e){var r=[],t=(e=q(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(z(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,f=d;for(d&&r.push("-");fL((A-s)/w)&&T("overflow"),s+=(p-a)*w,a=p;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&T("overflow"),R==a){for(var $=s,D=36;;D+=36){var j=D<=o?1:o+26<=D?26:D-o;if($>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function f(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]'),Z=new RegExp(K,"g"),G=new RegExp(B,"g"),Y=new RegExp(C("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',J),"g"),W=new RegExp(C("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),X=W;function ee(e){var r=f(e);return r.match(Z)?r:e}var re={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n); - - message: string; - errors: Array; - ajv: true; - validation: true; - } - - class MissingRefError extends Error { - constructor(baseId: string, ref: string, message?: string); - static message: (baseId: string, ref: string) => string; - - message: string; - missingRef: string; - missingSchema: string; - } -} - -declare namespace ajv { - type ValidationError = AjvErrors.ValidationError; - - type MissingRefError = AjvErrors.MissingRefError; - - interface Ajv { - /** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default). - * @param {string|object|Boolean} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ - validate(schemaKeyRef: object | string | boolean, data: any): boolean | PromiseLike; - /** - * Create validating function for passed schema. - * @param {object|Boolean} schema schema object - * @return {Function} validating function - */ - compile(schema: object | boolean): ValidateFunction; - /** - * Creates validating function for passed schema with asynchronous loading of missing schemas. - * `loadSchema` option should be a function that accepts schema uri and node-style callback. - * @this Ajv - * @param {object|Boolean} schema schema object - * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped - * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function. - * @return {PromiseLike} validating function - */ - compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike; - /** - * Adds schema to the instance. - * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @return {Ajv} this for method chaining - */ - addSchema(schema: Array | object, key?: string): Ajv; - /** - * Add schema that will be used to validate other schemas - * options in META_IGNORE_OPTIONS are alway set to false - * @param {object} schema schema object - * @param {string} key optional schema key - * @return {Ajv} this for method chaining - */ - addMetaSchema(schema: object, key?: string): Ajv; - /** - * Validate schema - * @param {object|Boolean} schema schema to validate - * @return {Boolean} true if schema is valid - */ - validateSchema(schema: object | boolean): boolean; - /** - * Get compiled schema from the instance by `key` or `ref`. - * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). - * @return {Function} schema validating function (with property `schema`). - */ - getSchema(keyRef: string): ValidateFunction; - /** - * Remove cached schema(s). - * If no parameter is passed all schemas but meta-schemas are removed. - * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. - * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. - * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object - * @return {Ajv} this for method chaining - */ - removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; - /** - * Add custom format - * @param {string} name format name - * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) - * @return {Ajv} this for method chaining - */ - addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; - /** - * Define custom keyword - * @this Ajv - * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. - * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ - addKeyword(keyword: string, definition: KeywordDefinition): Ajv; - /** - * Get keyword definition - * @this Ajv - * @param {string} keyword pre-defined or custom keyword. - * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. - */ - getKeyword(keyword: string): object | boolean; - /** - * Remove keyword - * @this Ajv - * @param {string} keyword pre-defined or custom keyword. - * @return {Ajv} this for method chaining - */ - removeKeyword(keyword: string): Ajv; - /** - * Validate keyword - * @this Ajv - * @param {object} definition keyword definition object - * @param {boolean} throwError true to throw exception if definition is invalid - * @return {boolean} validation result - */ - validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean; - /** - * Convert array of error message objects to string - * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {object} options optional options with properties `separator` and `dataVar`. - * @return {string} human readable string with all errors descriptions - */ - errorsText(errors?: Array | null, options?: ErrorsTextOptions): string; - errors?: Array | null; - } - - interface CustomLogger { - log(...args: any[]): any; - warn(...args: any[]): any; - error(...args: any[]): any; - } - - interface ValidateFunction { - ( - data: any, - dataPath?: string, - parentData?: object | Array, - parentDataProperty?: string | number, - rootData?: object | Array - ): boolean | PromiseLike; - schema?: object | boolean; - errors?: null | Array; - refs?: object; - refVal?: Array; - root?: ValidateFunction | object; - $async?: true; - source?: object; - } - - interface Options { - $data?: boolean; - allErrors?: boolean; - verbose?: boolean; - jsonPointers?: boolean; - uniqueItems?: boolean; - unicode?: boolean; - format?: string; - formats?: object; - unknownFormats?: true | string[] | 'ignore'; - schemas?: Array | object; - schemaId?: '$id' | 'id' | 'auto'; - missingRefs?: true | 'ignore' | 'fail'; - extendRefs?: true | 'ignore' | 'fail'; - loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike; - removeAdditional?: boolean | 'all' | 'failing'; - useDefaults?: boolean | 'empty' | 'shared'; - coerceTypes?: boolean | 'array'; - strictDefaults?: boolean | 'log'; - strictKeywords?: boolean | 'log'; - async?: boolean | string; - transpile?: string | ((code: string) => string); - meta?: boolean | object; - validateSchema?: boolean | 'log'; - addUsedSchema?: boolean; - inlineRefs?: boolean | number; - passContext?: boolean; - loopRequired?: number; - ownProperties?: boolean; - multipleOfPrecision?: boolean | number; - errorDataPath?: string, - messages?: boolean; - sourceCode?: boolean; - processCode?: (code: string) => string; - cache?: object; - logger?: CustomLogger | false; - nullable?: boolean; - serialize?: ((schema: object | boolean) => any) | false; - } - - type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike); - type NumberFormatValidator = ((data: number) => boolean | PromiseLike); - - interface NumberFormatDefinition { - type: "number", - validate: NumberFormatValidator; - compare?: (data1: number, data2: number) => number; - async?: boolean; - } - - interface StringFormatDefinition { - type?: "string", - validate: FormatValidator; - compare?: (data1: string, data2: string) => number; - async?: boolean; - } - - type FormatDefinition = NumberFormatDefinition | StringFormatDefinition; - - interface KeywordDefinition { - type?: string | Array; - async?: boolean; - $data?: boolean; - errors?: boolean | string; - metaSchema?: object; - // schema: false makes validate not to expect schema (ValidateFunction) - schema?: boolean; - statements?: boolean; - dependencies?: Array; - modifying?: boolean; - valid?: boolean; - // one and only one of the following properties should be present - validate?: SchemaValidateFunction | ValidateFunction; - compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction; - macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean; - inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string; - } - - interface CompilationContext { - level: number; - dataLevel: number; - schema: any; - schemaPath: string; - baseId: string; - async: boolean; - opts: Options; - formats: { - [index: string]: FormatDefinition | undefined; - }; - compositeRule: boolean; - validate: (schema: object) => boolean; - util: { - copy(obj: any, target?: any): any; - toHash(source: string[]): { [index: string]: true | undefined }; - equal(obj: any, target: any): boolean; - getProperty(str: string): string; - schemaHasRules(schema: object, rules: any): string; - escapeQuotes(str: string): string; - toQuotedString(str: string): string; - getData(jsonPointer: string, dataLevel: number, paths: string[]): string; - escapeJsonPointer(str: string): string; - unescapeJsonPointer(str: string): string; - escapeFragment(str: string): string; - unescapeFragment(str: string): string; - }; - self: Ajv; - } - - interface SchemaValidateFunction { - ( - schema: any, - data: any, - parentSchema?: object, - dataPath?: string, - parentData?: object | Array, - parentDataProperty?: string | number, - rootData?: object | Array - ): boolean | PromiseLike; - errors?: Array; - } - - interface ErrorsTextOptions { - separator?: string; - dataVar?: string; - } - - interface ErrorObject { - keyword: string; - dataPath: string; - schemaPath: string; - params: ErrorParameters; - // Added to validation errors of propertyNames keyword schema - propertyName?: string; - // Excluded if messages set to false. - message?: string; - // These are added with the `verbose` option. - schema?: any; - parentSchema?: object; - data?: any; - } - - type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | - DependenciesParams | FormatParams | ComparisonParams | - MultipleOfParams | PatternParams | RequiredParams | - TypeParams | UniqueItemsParams | CustomParams | - PatternRequiredParams | PropertyNamesParams | - IfParams | SwitchParams | NoParams | EnumParams; - - interface RefParams { - ref: string; - } - - interface LimitParams { - limit: number; - } - - interface AdditionalPropertiesParams { - additionalProperty: string; - } - - interface DependenciesParams { - property: string; - missingProperty: string; - depsCount: number; - deps: string; - } - - interface FormatParams { - format: string - } - - interface ComparisonParams { - comparison: string; - limit: number | string; - exclusive: boolean; - } - - interface MultipleOfParams { - multipleOf: number; - } - - interface PatternParams { - pattern: string; - } - - interface RequiredParams { - missingProperty: string; - } - - interface TypeParams { - type: string; - } - - interface UniqueItemsParams { - i: number; - j: number; - } - - interface CustomParams { - keyword: string; - } - - interface PatternRequiredParams { - missingPattern: string; - } - - interface PropertyNamesParams { - propertyName: string; - } - - interface IfParams { - failingKeyword: string; - } - - interface SwitchParams { - caseIndex: number; - } - - interface NoParams { } - - interface EnumParams { - allowedValues: Array; - } -} - -export = ajv; diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/ajv.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/ajv.js deleted file mode 100644 index 611b93835..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/ajv.js +++ /dev/null @@ -1,497 +0,0 @@ -'use strict'; - -var compileSchema = require('./compile') - , resolve = require('./compile/resolve') - , Cache = require('./cache') - , SchemaObject = require('./compile/schema_obj') - , stableStringify = require('fast-json-stable-stringify') - , formats = require('./compile/formats') - , rules = require('./compile/rules') - , $dataMetaSchema = require('./data') - , util = require('./compile/util'); - -module.exports = Ajv; - -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; - -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; - -Ajv.prototype.compileAsync = require('./compile/async'); -var customKeyword = require('./keyword'); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = require('./compile/error_classes'); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; - -var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; - -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; -var META_SUPPORT_DATA = ['/properties']; - -/** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance - */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - - if (opts.formats) addInitialFormats(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); - addInitialSchemas(this); -} - - - -/** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } - - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; -} - - -/** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function - */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); -} - - -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: hostname, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -function hostname(str) { - // https://tools.ietf.org/html/rfc1034#section-3.5 - // https://tools.ietf.org/html/rfc1123#section-2 - return str.length <= 255 && HOSTNAME.test(str); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/compile/index.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/compile/index.js deleted file mode 100644 index f4d3f0d58..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/compile/index.js +++ /dev/null @@ -1,387 +0,0 @@ -'use strict'; - -var resolve = require('./resolve') - , util = require('./util') - , errorClasses = require('./error_classes') - , stableStringify = require('fast-json-stable-stringify'); - -var validateGenerator = require('../dotjs/validate'); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = require('fast-deep-equal'); - -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; - -module.exports = compile; - - -/** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function - */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; - - root = root || { schema: schema, refVal: refVal, refs: refs }; - - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); - - var formats = this._formats; - var RULES = this.RULES; - - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } - - /* @this {*} - custom context, see passContext option */ - function callValidate() { - /* jshint validthis: true */ - var validate = compilation.validate; - var result = validate.apply(this, arguments); - callValidate.errors = validate.errors; - return result; - } - - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); - - var $async = _schema.$async === true; - - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); - - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - - if (opts.processCode) sourceCode = opts.processCode(sourceCode); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'equal', - 'ucs2length', - 'ValidationError', - sourceCode - ); - - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError - ); - - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } - - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } - - return validate; - } - - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } - - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } - - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } - - function removeLocalRef(ref) { - delete refs[ref]; - } - - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } - - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && !!refVal.$async }; - } - - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } - - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; - } - } - - function useCustomRule(rule, schema, parentSchema, it) { - if (self._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error('parent schema must have all required keywords: ' + deps.join(',')); - - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } - } - - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; - - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - - var index = customRules.length; - customRules[index] = validate; - - return { - code: 'customRule' + index, - validate: validate - }; - } -} - - -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} - - -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} - - -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } - } - return length; -}; diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/compile/util.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/compile/util.js deleted file mode 100644 index 0efa00111..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/compile/util.js +++ /dev/null @@ -1,274 +0,0 @@ -'use strict'; - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: require('fast-deep-equal'), - ucs2length: require('./ucs2length'), - varOccurences: varOccurences, - varReplace: varReplace, - cleanUpCode: cleanUpCode, - finalCleanUpCode: finalCleanUpCode, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i' - , $notOp = $isMax ? '>' : '<' - , $errorKeyword = undefined; -}} - -{{? $isDataExcl }} - {{ - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) - , $exclusive = 'exclusive' + $lvl - , $exclType = 'exclType' + $lvl - , $exclIsNumber = 'exclIsNumber' + $lvl - , $opExpr = 'op' + $lvl - , $opStr = '\' + ' + $opExpr + ' + \''; - }} - var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; - {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} - - var {{=$exclusive}}; - var {{=$exclType}} = typeof {{=$schemaValueExcl}}; - if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') { - {{ var $errorKeyword = $exclusiveKeyword; }} - {{# def.error:'_exclusiveLimit' }} - } else if ({{# def.$dataNotType:'number' }} - {{=$exclType}} == 'number' - ? ( - ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}}) - ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}} - : {{=$data}} {{=$notOp}} {{=$schemaValue}} - ) - : ( - ({{=$exclusive}} = {{=$schemaValueExcl}} === true) - ? {{=$data}} {{=$notOp}}= {{=$schemaValue}} - : {{=$data}} {{=$notOp}} {{=$schemaValue}} - ) - || {{=$data}} !== {{=$data}}) { - var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; - {{ - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - }} -{{??}} - {{ - var $exclIsNumber = typeof $schemaExcl == 'number' - , $opStr = $op; /*used in error*/ - }} - - {{? $exclIsNumber && $isData }} - {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }} - if ({{# def.$dataNotType:'number' }} - ( {{=$schemaValue}} === undefined - || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}} - ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}} - : {{=$data}} {{=$notOp}} {{=$schemaValue}} ) - || {{=$data}} !== {{=$data}}) { - {{??}} - {{ - if ($exclIsNumber && $schema === undefined) { - {{# def.setExclusiveLimit }} - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) - $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - {{# def.setExclusiveLimit }} - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - - var $opExpr = '\'' + $opStr + '\''; /*used in error*/ - }} - - if ({{# def.$dataNotType:'number' }} - {{=$data}} {{=$notOp}} {{=$schemaValue}} - || {{=$data}} !== {{=$data}}) { - {{?}} -{{?}} - {{ $errorKeyword = $errorKeyword || $keyword; }} - {{# def.error:'_limit' }} - } {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitItems.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitItems.jst deleted file mode 100644 index a3e078e51..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitItems.jst +++ /dev/null @@ -1,10 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} -if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { - {{ var $errorKeyword = $keyword; }} - {{# def.error:'_limitItems' }} -} {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitLength.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitLength.jst deleted file mode 100644 index cfc8dbb01..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitLength.jst +++ /dev/null @@ -1,10 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} -if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { - {{ var $errorKeyword = $keyword; }} - {{# def.error:'_limitLength' }} -} {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitProperties.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitProperties.jst deleted file mode 100644 index da7ea776f..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/_limitProperties.jst +++ /dev/null @@ -1,10 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} -if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { - {{ var $errorKeyword = $keyword; }} - {{# def.error:'_limitProperties' }} -} {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/allOf.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/allOf.jst deleted file mode 100644 index 4c2836311..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/allOf.jst +++ /dev/null @@ -1,34 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{ - var $currentBaseId = $it.baseId - , $allSchemasEmpty = true; -}} - -{{~ $schema:$sch:$i }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{ - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - }} - - {{# def.insertSubschemaCode }} - - {{# def.ifResultValid }} - {{?}} -{{~}} - -{{? $breakOnError }} - {{? $allSchemasEmpty }} - if (true) { - {{??}} - {{= $closingBraces.slice(0,-1) }} - {{?}} -{{?}} - -{{# def.cleanUp }} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/anyOf.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/anyOf.jst deleted file mode 100644 index 086cf2b33..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/anyOf.jst +++ /dev/null @@ -1,48 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{ - var $noEmptySchema = $schema.every(function($sch) { - return {{# def.nonEmptySchema:$sch }}; - }); -}} -{{? $noEmptySchema }} - {{ var $currentBaseId = $it.baseId; }} - var {{=$errs}} = errors; - var {{=$valid}} = false; - - {{# def.setCompositeRule }} - - {{~ $schema:$sch:$i }} - {{ - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - }} - - {{# def.insertSubschemaCode }} - - {{=$valid}} = {{=$valid}} || {{=$nextValid}}; - - if (!{{=$valid}}) { - {{ $closingBraces += '}'; }} - {{~}} - - {{# def.resetCompositeRule }} - - {{= $closingBraces }} - - if (!{{=$valid}}) { - {{# def.extraError:'anyOf' }} - } else { - {{# def.resetErrors }} - {{? it.opts.allErrors }} } {{?}} - - {{# def.cleanUp }} -{{??}} - {{? $breakOnError }} - if (true) { - {{?}} -{{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/coerce.def b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/coerce.def deleted file mode 100644 index 86e0e18af..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/coerce.def +++ /dev/null @@ -1,61 +0,0 @@ -{{## def.coerceType: - {{ - var $dataType = 'dataType' + $lvl - , $coerced = 'coerced' + $lvl; - }} - var {{=$dataType}} = typeof {{=$data}}; - {{? it.opts.coerceTypes == 'array'}} - if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array'; - {{?}} - - var {{=$coerced}} = undefined; - - {{ var $bracesCoercion = ''; }} - {{~ $coerceToTypes:$type:$i }} - {{? $i }} - if ({{=$coerced}} === undefined) { - {{ $bracesCoercion += '}'; }} - {{?}} - - {{? it.opts.coerceTypes == 'array' && $type != 'array' }} - if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) { - {{=$coerced}} = {{=$data}} = {{=$data}}[0]; - {{=$dataType}} = typeof {{=$data}}; - /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/ - } - {{?}} - - {{? $type == 'string' }} - if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') - {{=$coerced}} = '' + {{=$data}}; - else if ({{=$data}} === null) {{=$coerced}} = ''; - {{?? $type == 'number' || $type == 'integer' }} - if ({{=$dataType}} == 'boolean' || {{=$data}} === null - || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} - {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) - {{=$coerced}} = +{{=$data}}; - {{?? $type == 'boolean' }} - if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) - {{=$coerced}} = false; - else if ({{=$data}} === 'true' || {{=$data}} === 1) - {{=$coerced}} = true; - {{?? $type == 'null' }} - if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) - {{=$coerced}} = null; - {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} - if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) - {{=$coerced}} = [{{=$data}}]; - {{?}} - {{~}} - - {{= $bracesCoercion }} - - if ({{=$coerced}} === undefined) { - {{# def.error:'type' }} - } else { - {{# def.setParentData }} - {{=$data}} = {{=$coerced}}; - {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} - {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; - } -#}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/comment.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/comment.jst deleted file mode 100644 index f95915035..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/comment.jst +++ /dev/null @@ -1,9 +0,0 @@ -{{# def.definitions }} -{{# def.setupKeyword }} - -{{ var $comment = it.util.toQuotedString($schema); }} -{{? it.opts.$comment === true }} - console.log({{=$comment}}); -{{?? typeof it.opts.$comment == 'function' }} - self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema); -{{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/const.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/const.jst deleted file mode 100644 index 2aa22980d..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/const.jst +++ /dev/null @@ -1,11 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{? !$isData }} - var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; -{{?}} -var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); -{{# def.checkError:'const' }} -{{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/contains.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/contains.jst deleted file mode 100644 index 925d2c84b..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/contains.jst +++ /dev/null @@ -1,57 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{ - var $idx = 'i' + $lvl - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $currentBaseId = it.baseId - , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; -}} - -var {{=$errs}} = errors; -var {{=$valid}}; - -{{? $nonEmptySchema }} - {{# def.setCompositeRule }} - - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - - var {{=$nextValid}} = false; - - for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { - {{ - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - - if ({{=$nextValid}}) break; - } - - {{# def.resetCompositeRule }} - {{= $closingBraces }} - - if (!{{=$nextValid}}) { -{{??}} - if ({{=$data}}.length == 0) { -{{?}} - - {{# def.error:'contains' }} - } else { - {{? $nonEmptySchema }} - {{# def.resetErrors }} - {{?}} - {{? it.opts.allErrors }} } {{?}} - -{{# def.cleanUp }} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/custom.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/custom.jst deleted file mode 100644 index d30588fb0..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/custom.jst +++ /dev/null @@ -1,191 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ - var $rule = this - , $definition = 'definition' + $lvl - , $rDef = $rule.definition - , $closingBraces = ''; - var $validate = $rDef.validate; - var $compile, $inline, $macro, $ruleValidate, $validateCode; -}} - -{{? $isData && $rDef.$data }} - {{ - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - }} - var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; - var {{=$validateCode}} = {{=$definition}}.validate; -{{??}} - {{ - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - }} -{{?}} - -{{ - var $ruleErrs = $validateCode + '.errors' - , $i = 'i' + $lvl - , $ruleErr = 'ruleErr' + $lvl - , $asyncKeyword = $rDef.async; - - if ($asyncKeyword && !it.async) - throw new Error('async keyword in sync schema'); -}} - - -{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} -var {{=$errs}} = errors; -var {{=$valid}}; - -{{## def.callRuleValidate: - {{=$validateCode}}.call( - {{? it.opts.passContext }}this{{??}}self{{?}} - {{? $compile || $rDef.schema === false }} - , {{=$data}} - {{??}} - , {{=$schemaValue}} - , {{=$data}} - , validate.schema{{=it.schemaPath}} - {{?}} - , {{# def.dataPath }} - {{# def.passParentData }} - , rootData - ) -#}} - -{{## def.extendErrors:_inline: - for (var {{=$i}}={{=$errs}}; {{=$i}} 0 - : it.util.schemaHasRules(_schema, it.RULES.all)) -#}} - - -{{## def.strLength: - {{? it.opts.unicode === false }} - {{=$data}}.length - {{??}} - ucs2length({{=$data}}) - {{?}} -#}} - - -{{## def.willOptimize: - it.util.varOccurences($code, $nextData) < 2 -#}} - - -{{## def.generateSubschemaCode: - {{ - var $code = it.validate($it); - $it.baseId = $currentBaseId; - }} -#}} - - -{{## def.insertSubschemaCode: - {{= it.validate($it) }} - {{ $it.baseId = $currentBaseId; }} -#}} - - -{{## def._optimizeValidate: - it.util.varReplace($code, $nextData, $passData) -#}} - - -{{## def.optimizeValidate: - {{? {{# def.willOptimize}} }} - {{= {{# def._optimizeValidate }} }} - {{??}} - var {{=$nextData}} = {{=$passData}}; - {{= $code }} - {{?}} -#}} - - -{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}} - - -{{## def.finalCleanUp: {{ out = it.util.finalCleanUpCode(out, $async); }} #}} - - -{{## def.$data: - {{ - var $isData = it.opts.$data && $schema && $schema.$data - , $schemaValue; - }} - {{? $isData }} - var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }}; - {{ $schemaValue = 'schema' + $lvl; }} - {{??}} - {{ $schemaValue = $schema; }} - {{?}} -#}} - - -{{## def.$dataNotType:_type: - {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}} -#}} - - -{{## def.check$dataIsArray: - if (schema{{=$lvl}} === undefined) {{=$valid}} = true; - else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false; - else { -#}} - - -{{## def.beginDefOut: - {{ - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - }} -#}} - - -{{## def.storeDefOut:_variable: - {{ - var _variable = out; - out = $$outStack.pop(); - }} -#}} - - -{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}} - -{{## def.setParentData: - {{ - var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData' - , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - }} -#}} - -{{## def.passParentData: - {{# def.setParentData }} - , {{= $parentData }} - , {{= $parentDataProperty }} -#}} - - -{{## def.iterateProperties: - {{? $ownProperties }} - {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}}); - for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) { - var {{=$key}} = {{=$dataProperties}}[{{=$idx}}]; - {{??}} - for (var {{=$key}} in {{=$data}}) { - {{?}} -#}} - - -{{## def.noPropertyInData: - {{=$useData}} === undefined - {{? $ownProperties }} - || !{{# def.isOwnProperty }} - {{?}} -#}} - - -{{## def.isOwnProperty: - Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}') -#}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/dependencies.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/dependencies.jst deleted file mode 100644 index c41f33422..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/dependencies.jst +++ /dev/null @@ -1,80 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.missing }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.propertyInData: - {{=$data}}{{= it.util.getProperty($property) }} !== undefined - {{? $ownProperties }} - && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}') - {{?}} -#}} - - -{{ - var $schemaDeps = {} - , $propertyDeps = {} - , $ownProperties = it.opts.ownProperties; - - for ($property in $schema) { - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } -}} - -var {{=$errs}} = errors; - -{{ var $currentErrorPath = it.errorPath; }} - -var missing{{=$lvl}}; -{{ for (var $property in $propertyDeps) { }} - {{ $deps = $propertyDeps[$property]; }} - {{? $deps.length }} - if ({{# def.propertyInData }} - {{? $breakOnError }} - && ({{# def.checkMissingProperty:$deps }})) { - {{# def.errorMissingProperty:'dependencies' }} - {{??}} - ) { - {{~ $deps:$propertyKey }} - {{# def.allErrorsMissingProperty:'dependencies' }} - {{~}} - {{?}} - } {{# def.elseIfValid }} - {{?}} -{{ } }} - -{{ - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; -}} - - -{{ for (var $property in $schemaDeps) { }} - {{ var $sch = $schemaDeps[$property]; }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{=$nextValid}} = true; - - if ({{# def.propertyInData }}) { - {{ - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - }} - - {{# def.insertSubschemaCode }} - } - - {{# def.ifResultValid }} - {{?}} -{{ } }} - -{{? $breakOnError }} - {{= $closingBraces }} - if ({{=$errs}} == errors) { -{{?}} - -{{# def.cleanUp }} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/enum.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/enum.jst deleted file mode 100644 index 357c2e8c0..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/enum.jst +++ /dev/null @@ -1,30 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ - var $i = 'i' + $lvl - , $vSchema = 'schema' + $lvl; -}} - -{{? !$isData }} - var {{=$vSchema}} = validate.schema{{=$schemaPath}}; -{{?}} -var {{=$valid}}; - -{{?$isData}}{{# def.check$dataIsArray }}{{?}} - -{{=$valid}} = false; - -for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) - if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { - {{=$valid}} = true; - break; - } - -{{? $isData }} } {{?}} - -{{# def.checkError:'enum' }} - -{{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/errors.def b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/errors.def deleted file mode 100644 index 5c5752cb0..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/errors.def +++ /dev/null @@ -1,194 +0,0 @@ -{{# def.definitions }} - -{{## def._error:_rule: - {{ 'istanbul ignore else'; }} - {{? it.createErrors !== false }} - { - keyword: '{{= $errorKeyword || _rule }}' - , dataPath: (dataPath || '') + {{= it.errorPath }} - , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}} - , params: {{# def._errorParams[_rule] }} - {{? it.opts.messages !== false }} - , message: {{# def._errorMessages[_rule] }} - {{?}} - {{? it.opts.verbose }} - , schema: {{# def._errorSchemas[_rule] }} - , parentSchema: validate.schema{{=it.schemaPath}} - , data: {{=$data}} - {{?}} - } - {{??}} - {} - {{?}} -#}} - - -{{## def._addError:_rule: - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; -#}} - - -{{## def.addError:_rule: - var err = {{# def._error:_rule }}; - {{# def._addError:_rule }} -#}} - - -{{## def.error:_rule: - {{# def.beginDefOut}} - {{# def._error:_rule }} - {{# def.storeDefOut:__err }} - - {{? !it.compositeRule && $breakOnError }} - {{ 'istanbul ignore if'; }} - {{? it.async }} - throw new ValidationError([{{=__err}}]); - {{??}} - validate.errors = [{{=__err}}]; - return false; - {{?}} - {{??}} - var err = {{=__err}}; - {{# def._addError:_rule }} - {{?}} -#}} - - -{{## def.extraError:_rule: - {{# def.addError:_rule}} - {{? !it.compositeRule && $breakOnError }} - {{ 'istanbul ignore if'; }} - {{? it.async }} - throw new ValidationError(vErrors); - {{??}} - validate.errors = vErrors; - return false; - {{?}} - {{?}} -#}} - - -{{## def.checkError:_rule: - if (!{{=$valid}}) { - {{# def.error:_rule }} - } -#}} - - -{{## def.resetErrors: - errors = {{=$errs}}; - if (vErrors !== null) { - if ({{=$errs}}) vErrors.length = {{=$errs}}; - else vErrors = null; - } -#}} - - -{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}} -{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}} -{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}} - -{{## def._errorMessages = { - 'false schema': "'boolean schema is false'", - $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'", - additionalItems: "'should NOT have more than {{=$schema.length}} items'", - additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'", - anyOf: "'should match some schema in anyOf'", - const: "'should be equal to constant'", - contains: "'should contain a valid item'", - dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'", - 'enum': "'should be equal to one of the allowed values'", - format: "'should match format \"{{#def.concatSchemaEQ}}\"'", - 'if': "'should match \"' + {{=$ifClause}} + '\" schema'", - _limit: "'should be {{=$opStr}} {{#def.appendSchema}}", - _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'", - _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'", - _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'", - _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'", - multipleOf: "'should be multiple of {{#def.appendSchema}}", - not: "'should NOT be valid'", - oneOf: "'should match exactly one schema in oneOf'", - pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'", - propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'", - required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'", - type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'", - uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'", - custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'", - patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''", - switch: "'should pass \"switch\" keyword validation'", - _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'", - _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'" -} #}} - - -{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}} -{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} - -{{## def._errorSchemas = { - 'false schema': "false", - $ref: "{{=it.util.toQuotedString($schema)}}", - additionalItems: "false", - additionalProperties: "false", - anyOf: "validate.schema{{=$schemaPath}}", - const: "validate.schema{{=$schemaPath}}", - contains: "validate.schema{{=$schemaPath}}", - dependencies: "validate.schema{{=$schemaPath}}", - 'enum': "validate.schema{{=$schemaPath}}", - format: "{{#def.schemaRefOrQS}}", - 'if': "validate.schema{{=$schemaPath}}", - _limit: "{{#def.schemaRefOrVal}}", - _exclusiveLimit: "validate.schema{{=$schemaPath}}", - _limitItems: "{{#def.schemaRefOrVal}}", - _limitLength: "{{#def.schemaRefOrVal}}", - _limitProperties:"{{#def.schemaRefOrVal}}", - multipleOf: "{{#def.schemaRefOrVal}}", - not: "validate.schema{{=$schemaPath}}", - oneOf: "validate.schema{{=$schemaPath}}", - pattern: "{{#def.schemaRefOrQS}}", - propertyNames: "validate.schema{{=$schemaPath}}", - required: "validate.schema{{=$schemaPath}}", - type: "validate.schema{{=$schemaPath}}", - uniqueItems: "{{#def.schemaRefOrVal}}", - custom: "validate.schema{{=$schemaPath}}", - patternRequired: "validate.schema{{=$schemaPath}}", - switch: "validate.schema{{=$schemaPath}}", - _formatLimit: "{{#def.schemaRefOrQS}}", - _formatExclusiveLimit: "validate.schema{{=$schemaPath}}" -} #}} - - -{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} - -{{## def._errorParams = { - 'false schema': "{}", - $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }", - additionalItems: "{ limit: {{=$schema.length}} }", - additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }", - anyOf: "{}", - const: "{ allowedValue: schema{{=$lvl}} }", - contains: "{}", - dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }", - 'enum': "{ allowedValues: schema{{=$lvl}} }", - format: "{ format: {{#def.schemaValueQS}} }", - 'if': "{ failingKeyword: {{=$ifClause}} }", - _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }", - _exclusiveLimit: "{}", - _limitItems: "{ limit: {{=$schemaValue}} }", - _limitLength: "{ limit: {{=$schemaValue}} }", - _limitProperties:"{ limit: {{=$schemaValue}} }", - multipleOf: "{ multipleOf: {{=$schemaValue}} }", - not: "{}", - oneOf: "{ passingSchemas: {{=$passingSchemas}} }", - pattern: "{ pattern: {{#def.schemaValueQS}} }", - propertyNames: "{ propertyName: '{{=$invalidName}}' }", - required: "{ missingProperty: '{{=$missingProperty}}' }", - type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }", - uniqueItems: "{ i: i, j: j }", - custom: "{ keyword: '{{=$rule.keyword}}' }", - patternRequired: "{ missingPattern: '{{=$missingPattern}}' }", - switch: "{ caseIndex: {{=$caseIndex}} }", - _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }", - _formatExclusiveLimit: "{}" -} #}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/format.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/format.jst deleted file mode 100644 index 37f14da80..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/format.jst +++ /dev/null @@ -1,106 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} - -{{## def.skipFormat: - {{? $breakOnError }} if (true) { {{?}} - {{ return out; }} -#}} - -{{? it.opts.format === false }}{{# def.skipFormat }}{{?}} - - -{{# def.$data }} - - -{{## def.$dataCheckFormat: - {{# def.$dataNotType:'string' }} - ({{? $unknownFormats != 'ignore' }} - ({{=$schemaValue}} && !{{=$format}} - {{? $allowUnknown }} - && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1 - {{?}}) || - {{?}} - ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}' - && !(typeof {{=$format}} == 'function' - ? {{? it.async}} - (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}})) - {{??}} - {{=$format}}({{=$data}}) - {{?}} - : {{=$format}}.test({{=$data}})))) -#}} - -{{## def.checkFormat: - {{ - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - }} - {{? typeof $format == 'function' }} - {{=$formatRef}}({{=$data}}) - {{??}} - {{=$formatRef}}.test({{=$data}}) - {{?}} -#}} - - -{{ - var $unknownFormats = it.opts.unknownFormats - , $allowUnknown = Array.isArray($unknownFormats); -}} - -{{? $isData }} - {{ - var $format = 'format' + $lvl - , $isObject = 'isObject' + $lvl - , $formatType = 'formatType' + $lvl; - }} - var {{=$format}} = formats[{{=$schemaValue}}]; - var {{=$isObject}} = typeof {{=$format}} == 'object' - && !({{=$format}} instanceof RegExp) - && {{=$format}}.validate; - var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string'; - if ({{=$isObject}}) { - {{? it.async}} - var async{{=$lvl}} = {{=$format}}.async; - {{?}} - {{=$format}} = {{=$format}}.validate; - } - if ({{# def.$dataCheckFormat }}) { -{{??}} - {{ var $format = it.formats[$schema]; }} - {{? !$format }} - {{? $unknownFormats == 'ignore' }} - {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }} - {{# def.skipFormat }} - {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }} - {{# def.skipFormat }} - {{??}} - {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }} - {{?}} - {{?}} - {{ - var $isObject = typeof $format == 'object' - && !($format instanceof RegExp) - && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - }} - {{? $formatType != $ruleType }} - {{# def.skipFormat }} - {{?}} - {{? $async }} - {{ - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - }} - if (!(await {{=$formatRef}}({{=$data}}))) { - {{??}} - if (!{{# def.checkFormat }}) { - {{?}} -{{?}} - {{# def.error:'format' }} - } {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/if.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/if.jst deleted file mode 100644 index 7ccc9b7f7..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/if.jst +++ /dev/null @@ -1,75 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.validateIfClause:_clause: - {{ - $it.schema = it.schema['_clause']; - $it.schemaPath = it.schemaPath + '._clause'; - $it.errSchemaPath = it.errSchemaPath + '/_clause'; - }} - {{# def.insertSubschemaCode }} - {{=$valid}} = {{=$nextValid}}; - {{? $thenPresent && $elsePresent }} - {{ $ifClause = 'ifClause' + $lvl; }} - var {{=$ifClause}} = '_clause'; - {{??}} - {{ $ifClause = '\'_clause\''; }} - {{?}} -#}} - -{{ - var $thenSch = it.schema['then'] - , $elseSch = it.schema['else'] - , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }} - , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }} - , $currentBaseId = $it.baseId; -}} - -{{? $thenPresent || $elsePresent }} - {{ - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - var {{=$errs}} = errors; - var {{=$valid}} = true; - - {{# def.setCompositeRule }} - {{# def.insertSubschemaCode }} - {{ $it.createErrors = true; }} - {{# def.resetErrors }} - {{# def.resetCompositeRule }} - - {{? $thenPresent }} - if ({{=$nextValid}}) { - {{# def.validateIfClause:then }} - } - {{? $elsePresent }} - else { - {{?}} - {{??}} - if (!{{=$nextValid}}) { - {{?}} - - {{? $elsePresent }} - {{# def.validateIfClause:else }} - } - {{?}} - - if (!{{=$valid}}) { - {{# def.extraError:'if' }} - } - {{? $breakOnError }} else { {{?}} - - {{# def.cleanUp }} -{{??}} - {{? $breakOnError }} - if (true) { - {{?}} -{{?}} - diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/items.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/items.jst deleted file mode 100644 index 8c0f5acb5..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/items.jst +++ /dev/null @@ -1,100 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.validateItems:startFrom: - for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { - {{ - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - - {{? $breakOnError }} - if (!{{=$nextValid}}) break; - {{?}} - } -#}} - -{{ - var $idx = 'i' + $lvl - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $currentBaseId = it.baseId; -}} - -var {{=$errs}} = errors; -var {{=$valid}}; - -{{? Array.isArray($schema) }} - {{ /* 'items' is an array of schemas */}} - {{ var $additionalItems = it.schema.additionalItems; }} - {{? $additionalItems === false }} - {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; - {{ - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - }} - {{# def.checkError:'additionalItems' }} - {{ $errSchemaPath = $currErrSchemaPath; }} - {{# def.elseIfValid}} - {{?}} - - {{~ $schema:$sch:$i }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{=$nextValid}} = true; - - if ({{=$data}}.length > {{=$i}}) { - {{ - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - } - - {{# def.ifResultValid }} - {{?}} - {{~}} - - {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} - {{ - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - }} - {{=$nextValid}} = true; - - if ({{=$data}}.length > {{= $schema.length }}) { - {{# def.validateItems: $schema.length }} - } - - {{# def.ifResultValid }} - {{?}} - -{{?? {{# def.nonEmptySchema:$schema }} }} - {{ /* 'items' is a single schema */}} - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - {{# def.validateItems: 0 }} -{{?}} - -{{? $breakOnError }} - {{= $closingBraces }} - if ({{=$errs}} == errors) { -{{?}} - -{{# def.cleanUp }} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/missing.def b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/missing.def deleted file mode 100644 index a73b9f966..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/missing.def +++ /dev/null @@ -1,39 +0,0 @@ -{{## def.checkMissingProperty:_properties: - {{~ _properties:$propertyKey:$i }} - {{?$i}} || {{?}} - {{ - var $prop = it.util.getProperty($propertyKey) - , $useData = $data + $prop; - }} - ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) - {{~}} -#}} - - -{{## def.errorMissingProperty:_error: - {{ - var $propertyPath = 'missing' + $lvl - , $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers - ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) - : $currentErrorPath + ' + ' + $propertyPath; - } - }} - {{# def.error:_error }} -#}} - - -{{## def.allErrorsMissingProperty:_error: - {{ - var $prop = it.util.getProperty($propertyKey) - , $missingProperty = it.util.escapeQuotes($propertyKey) - , $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - }} - if ({{# def.noPropertyInData }}) { - {{# def.addError:_error }} - } -#}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/multipleOf.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/multipleOf.jst deleted file mode 100644 index 5f8dd33b5..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/multipleOf.jst +++ /dev/null @@ -1,20 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -var division{{=$lvl}}; -if ({{?$isData}} - {{=$schemaValue}} !== undefined && ( - typeof {{=$schemaValue}} != 'number' || - {{?}} - (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, - {{? it.opts.multipleOfPrecision }} - Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} - {{??}} - division{{=$lvl}} !== parseInt(division{{=$lvl}}) - {{?}} - ) - {{?$isData}} ) {{?}} ) { - {{# def.error:'multipleOf' }} -} {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/not.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/not.jst deleted file mode 100644 index e03185ae8..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/not.jst +++ /dev/null @@ -1,43 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{? {{# def.nonEmptySchema:$schema }} }} - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - - var {{=$errs}} = errors; - - {{# def.setCompositeRule }} - - {{ - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - }} - {{= it.validate($it) }} - {{ - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - }} - - {{# def.resetCompositeRule }} - - if ({{=$nextValid}}) { - {{# def.error:'not' }} - } else { - {{# def.resetErrors }} - {{? it.opts.allErrors }} } {{?}} -{{??}} - {{# def.addError:'not' }} - {{? $breakOnError}} - if (false) { - {{?}} -{{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/oneOf.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/oneOf.jst deleted file mode 100644 index bcce2c6ed..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/oneOf.jst +++ /dev/null @@ -1,54 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{ - var $currentBaseId = $it.baseId - , $prevValid = 'prevValid' + $lvl - , $passingSchemas = 'passingSchemas' + $lvl; -}} - -var {{=$errs}} = errors - , {{=$prevValid}} = false - , {{=$valid}} = false - , {{=$passingSchemas}} = null; - -{{# def.setCompositeRule }} - -{{~ $schema:$sch:$i }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{ - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - }} - - {{# def.insertSubschemaCode }} - {{??}} - var {{=$nextValid}} = true; - {{?}} - - {{? $i }} - if ({{=$nextValid}} && {{=$prevValid}}) { - {{=$valid}} = false; - {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}]; - } else { - {{ $closingBraces += '}'; }} - {{?}} - - if ({{=$nextValid}}) { - {{=$valid}} = {{=$prevValid}} = true; - {{=$passingSchemas}} = {{=$i}}; - } -{{~}} - -{{# def.resetCompositeRule }} - -{{= $closingBraces }} - -if (!{{=$valid}}) { - {{# def.extraError:'oneOf' }} -} else { - {{# def.resetErrors }} -{{? it.opts.allErrors }} } {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/pattern.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/pattern.jst deleted file mode 100644 index 3a37ef6cb..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/pattern.jst +++ /dev/null @@ -1,14 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ - var $regexp = $isData - ? '(new RegExp(' + $schemaValue + '))' - : it.usePattern($schema); -}} - -if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { - {{# def.error:'pattern' }} -} {{? $breakOnError }} else { {{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/properties.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/properties.jst deleted file mode 100644 index 862067e75..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/properties.jst +++ /dev/null @@ -1,244 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.validateAdditional: - {{ /* additionalProperties is schema */ - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty - ? it.errorPath - : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} -#}} - - -{{ - var $key = 'key' + $lvl - , $idx = 'idx' + $lvl - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $dataProperties = 'dataProperties' + $lvl; - - var $schemaKeys = Object.keys($schema || {}) - , $pProperties = it.schema.patternProperties || {} - , $pPropertyKeys = Object.keys($pProperties) - , $aProperties = it.schema.additionalProperties - , $someProperties = $schemaKeys.length || $pPropertyKeys.length - , $noAdditional = $aProperties === false - , $additionalIsSchema = typeof $aProperties == 'object' - && Object.keys($aProperties).length - , $removeAdditional = it.opts.removeAdditional - , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional - , $ownProperties = it.opts.ownProperties - , $currentBaseId = it.baseId; - - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) - var $requiredHash = it.util.toHash($required); -}} - - -var {{=$errs}} = errors; -var {{=$nextValid}} = true; -{{? $ownProperties }} - var {{=$dataProperties}} = undefined; -{{?}} - -{{? $checkAdditional }} - {{# def.iterateProperties }} - {{? $someProperties }} - var isAdditional{{=$lvl}} = !(false - {{? $schemaKeys.length }} - {{? $schemaKeys.length > 8 }} - || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}}) - {{??}} - {{~ $schemaKeys:$propertyKey }} - || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} - {{~}} - {{?}} - {{?}} - {{? $pPropertyKeys.length }} - {{~ $pPropertyKeys:$pProperty:$i }} - || {{= it.usePattern($pProperty) }}.test({{=$key}}) - {{~}} - {{?}} - ); - - if (isAdditional{{=$lvl}}) { - {{?}} - {{? $removeAdditional == 'all' }} - delete {{=$data}}[{{=$key}}]; - {{??}} - {{ - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - }} - {{? $noAdditional }} - {{? $removeAdditional }} - delete {{=$data}}[{{=$key}}]; - {{??}} - {{=$nextValid}} = false; - {{ - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - }} - {{# def.error:'additionalProperties' }} - {{ $errSchemaPath = $currErrSchemaPath; }} - {{? $breakOnError }} break; {{?}} - {{?}} - {{?? $additionalIsSchema }} - {{? $removeAdditional == 'failing' }} - var {{=$errs}} = errors; - {{# def.setCompositeRule }} - - {{# def.validateAdditional }} - - if (!{{=$nextValid}}) { - errors = {{=$errs}}; - if (validate.errors !== null) { - if (errors) validate.errors.length = errors; - else validate.errors = null; - } - delete {{=$data}}[{{=$key}}]; - } - - {{# def.resetCompositeRule }} - {{??}} - {{# def.validateAdditional }} - {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} - {{?}} - {{?}} - {{ it.errorPath = $currentErrorPath; }} - {{?}} - {{? $someProperties }} - } - {{?}} - } - - {{# def.ifResultValid }} -{{?}} - -{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} - -{{? $schemaKeys.length }} - {{~ $schemaKeys:$propertyKey }} - {{ var $sch = $schema[$propertyKey]; }} - - {{? {{# def.nonEmptySchema:$sch}} }} - {{ - var $prop = it.util.getProperty($propertyKey) - , $passData = $data + $prop - , $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - }} - - {{# def.generateSubschemaCode }} - - {{? {{# def.willOptimize }} }} - {{ - $code = {{# def._optimizeValidate }}; - var $useData = $passData; - }} - {{??}} - {{ var $useData = $nextData; }} - var {{=$nextData}} = {{=$passData}}; - {{?}} - - {{? $hasDefault }} - {{= $code }} - {{??}} - {{? $requiredHash && $requiredHash[$propertyKey] }} - if ({{# def.noPropertyInData }}) { - {{=$nextValid}} = false; - {{ - var $currentErrorPath = it.errorPath - , $currErrSchemaPath = $errSchemaPath - , $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - }} - {{# def.error:'required' }} - {{ $errSchemaPath = $currErrSchemaPath; }} - {{ it.errorPath = $currentErrorPath; }} - } else { - {{??}} - {{? $breakOnError }} - if ({{# def.noPropertyInData }}) { - {{=$nextValid}} = true; - } else { - {{??}} - if ({{=$useData}} !== undefined - {{? $ownProperties }} - && {{# def.isOwnProperty }} - {{?}} - ) { - {{?}} - {{?}} - - {{= $code }} - } - {{?}} {{ /* $hasDefault */ }} - {{?}} {{ /* def.nonEmptySchema */ }} - - {{# def.ifResultValid }} - {{~}} -{{?}} - -{{? $pPropertyKeys.length }} - {{~ $pPropertyKeys:$pProperty }} - {{ var $sch = $pProperties[$pProperty]; }} - - {{? {{# def.nonEmptySchema:$sch}} }} - {{ - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' - + it.util.escapeFragment($pProperty); - }} - - {{# def.iterateProperties }} - if ({{= it.usePattern($pProperty) }}.test({{=$key}})) { - {{ - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - - {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} - } - {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} - } - - {{# def.ifResultValid }} - {{?}} {{ /* def.nonEmptySchema */ }} - {{~}} -{{?}} - - -{{? $breakOnError }} - {{= $closingBraces }} - if ({{=$errs}} == errors) { -{{?}} - -{{# def.cleanUp }} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/propertyNames.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/propertyNames.jst deleted file mode 100644 index ee52b2151..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/propertyNames.jst +++ /dev/null @@ -1,54 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -var {{=$errs}} = errors; - -{{? {{# def.nonEmptySchema:$schema }} }} - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - - {{ - var $key = 'key' + $lvl - , $idx = 'idx' + $lvl - , $i = 'i' + $lvl - , $invalidName = '\' + ' + $key + ' + \'' - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $dataProperties = 'dataProperties' + $lvl - , $ownProperties = it.opts.ownProperties - , $currentBaseId = it.baseId; - }} - - {{? $ownProperties }} - var {{=$dataProperties}} = undefined; - {{?}} - {{# def.iterateProperties }} - var startErrs{{=$lvl}} = errors; - - {{ var $passData = $key; }} - {{# def.setCompositeRule }} - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - {{# def.resetCompositeRule }} - - if (!{{=$nextValid}}) { - for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired - , $ownProperties = it.opts.ownProperties; - }} - - {{? $breakOnError }} - var missing{{=$lvl}}; - {{? $loopRequired }} - {{# def.setupLoop }} - var {{=$valid}} = true; - - {{?$isData}}{{# def.check$dataIsArray }}{{?}} - - for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { - {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined - {{? $ownProperties }} - && {{# def.isRequiredOwnProperty }} - {{?}}; - if (!{{=$valid}}) break; - } - - {{? $isData }} } {{?}} - - {{# def.checkError:'required' }} - else { - {{??}} - if ({{# def.checkMissingProperty:$required }}) { - {{# def.errorMissingProperty:'required' }} - } else { - {{?}} - {{??}} - {{? $loopRequired }} - {{# def.setupLoop }} - {{? $isData }} - if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { - {{# def.addError:'required' }} - } else if ({{=$vSchema}} !== undefined) { - {{?}} - - for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { - if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined - {{? $ownProperties }} - || !{{# def.isRequiredOwnProperty }} - {{?}}) { - {{# def.addError:'required' }} - } - } - - {{? $isData }} } {{?}} - {{??}} - {{~ $required:$propertyKey }} - {{# def.allErrorsMissingProperty:'required' }} - {{~}} - {{?}} - {{?}} - - {{ it.errorPath = $currentErrorPath; }} - -{{?? $breakOnError }} - if (true) { -{{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/uniqueItems.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/uniqueItems.jst deleted file mode 100644 index 22f82f99d..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/uniqueItems.jst +++ /dev/null @@ -1,62 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - - -{{? ($schema || $isData) && it.opts.uniqueItems !== false }} - {{? $isData }} - var {{=$valid}}; - if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) - {{=$valid}} = true; - else if (typeof {{=$schemaValue}} != 'boolean') - {{=$valid}} = false; - else { - {{?}} - - var i = {{=$data}}.length - , {{=$valid}} = true - , j; - if (i > 1) { - {{ - var $itemType = it.schema.items && it.schema.items.type - , $typeIsArray = Array.isArray($itemType); - }} - {{? !$itemType || $itemType == 'object' || $itemType == 'array' || - ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }} - outer: - for (;i--;) { - for (j = i; j--;) { - if (equal({{=$data}}[i], {{=$data}}[j])) { - {{=$valid}} = false; - break outer; - } - } - } - {{??}} - var itemIndices = {}, item; - for (;i--;) { - var item = {{=$data}}[i]; - {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }} - if ({{= it.util[$method]($itemType, 'item', true) }}) continue; - {{? $typeIsArray}} - if (typeof item == 'string') item = '"' + item; - {{?}} - if (typeof itemIndices[item] == 'number') { - {{=$valid}} = false; - j = itemIndices[item]; - break; - } - itemIndices[item] = i; - } - {{?}} - } - - {{? $isData }} } {{?}} - - if (!{{=$valid}}) { - {{# def.error:'uniqueItems' }} - } {{? $breakOnError }} else { {{?}} -{{??}} - {{? $breakOnError }} if (true) { {{?}} -{{?}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/validate.jst b/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/validate.jst deleted file mode 100644 index f8a1edfc0..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dot/validate.jst +++ /dev/null @@ -1,282 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.defaults }} -{{# def.coerce }} - -{{ /** - * schema compilation (render) time: - * it = { schema, RULES, _validate, opts } - * it.validate - this template function, - * it is used recursively to generate code for subschemas - * - * runtime: - * "validate" is a variable name to which this function will be assigned - * validateRef etc. are defined in the parent scope in index.js - */ }} - -{{ - var $async = it.schema.$async === true - , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') - , $id = it.self._getId(it.schema); -}} - -{{ - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } -}} - -{{? it.isTop }} - var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) { - 'use strict'; - {{? $id && (it.opts.sourceCode || it.opts.processCode) }} - {{= '/\*# sourceURL=' + $id + ' */' }} - {{?}} -{{?}} - -{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }} - {{ var $keyword = 'false schema'; }} - {{# def.setupKeyword }} - {{? it.schema === false}} - {{? it.isTop}} - {{ $breakOnError = true; }} - {{??}} - var {{=$valid}} = false; - {{?}} - {{# def.error:'false schema' }} - {{??}} - {{? it.isTop}} - {{? $async }} - return data; - {{??}} - validate.errors = null; - return true; - {{?}} - {{??}} - var {{=$valid}} = true; - {{?}} - {{?}} - - {{? it.isTop}} - }; - return validate; - {{?}} - - {{ return out; }} -{{?}} - - -{{? it.isTop }} - {{ - var $top = it.isTop - , $lvl = it.level = 0 - , $dataLvl = it.dataLevel = 0 - , $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - - it.dataPathArr = [undefined]; - - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - }} - - var vErrors = null; {{ /* don't edit, used in replace */ }} - var errors = 0; {{ /* don't edit, used in replace */ }} - if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }} -{{??}} - {{ - var $lvl = it.level - , $dataLvl = it.dataLevel - , $data = 'data' + ($dataLvl || ''); - - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - - if ($async && !it.async) throw new Error('async schema in sync schema'); - }} - - var errs_{{=$lvl}} = errors; -{{?}} - -{{ - var $valid = 'valid' + $lvl - , $breakOnError = !it.opts.allErrors - , $closingBraces1 = '' - , $closingBraces2 = ''; - - var $errorKeyword; - var $typeSchema = it.schema.type - , $typeIsArray = Array.isArray($typeSchema); - - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) - $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } -}} - -{{## def.checkType: - {{ - var $schemaPath = it.schemaPath + '.type' - , $errSchemaPath = it.errSchemaPath + '/type' - , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - }} - - if ({{= it.util[$method]($typeSchema, $data, true) }}) { -#}} - -{{? it.schema.$ref && $refKeywords }} - {{? it.opts.extendRefs == 'fail' }} - {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }} - {{?? it.opts.extendRefs !== true }} - {{ - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - }} - {{?}} -{{?}} - -{{? it.schema.$comment && it.opts.$comment }} - {{= it.RULES.all.$comment.code(it, '$comment') }} -{{?}} - -{{? $typeSchema }} - {{? it.opts.coerceTypes }} - {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }} - {{?}} - - {{ var $rulesGroup = it.RULES.types[$typeSchema]; }} - {{? $coerceToTypes || $typeIsArray || $rulesGroup === true || - ($rulesGroup && !$shouldUseGroup($rulesGroup)) }} - {{ - var $schemaPath = it.schemaPath + '.type' - , $errSchemaPath = it.errSchemaPath + '/type'; - }} - {{# def.checkType }} - {{? $coerceToTypes }} - {{# def.coerceType }} - {{??}} - {{# def.error:'type' }} - {{?}} - } - {{?}} -{{?}} - - -{{? it.schema.$ref && !$refKeywords }} - {{= it.RULES.all.$ref.code(it, '$ref') }} - {{? $breakOnError }} - } - if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { - {{ $closingBraces2 += '}'; }} - {{?}} -{{??}} - {{~ it.RULES:$rulesGroup }} - {{? $shouldUseGroup($rulesGroup) }} - {{? $rulesGroup.type }} - if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) { - {{?}} - {{? it.opts.useDefaults }} - {{? $rulesGroup.type == 'object' && it.schema.properties }} - {{# def.defaultProperties }} - {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} - {{# def.defaultItems }} - {{?}} - {{?}} - {{~ $rulesGroup.rules:$rule }} - {{? $shouldUseRule($rule) }} - {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} - {{? $code }} - {{= $code }} - {{? $breakOnError }} - {{ $closingBraces1 += '}'; }} - {{?}} - {{?}} - {{?}} - {{~}} - {{? $breakOnError }} - {{= $closingBraces1 }} - {{ $closingBraces1 = ''; }} - {{?}} - {{? $rulesGroup.type }} - } - {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} - else { - {{ - var $schemaPath = it.schemaPath + '.type' - , $errSchemaPath = it.errSchemaPath + '/type'; - }} - {{# def.error:'type' }} - } - {{?}} - {{?}} - - {{? $breakOnError }} - if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { - {{ $closingBraces2 += '}'; }} - {{?}} - {{?}} - {{~}} -{{?}} - -{{? $breakOnError }} {{= $closingBraces2 }} {{?}} - -{{? $top }} - {{? $async }} - if (errors === 0) return data; {{ /* don't edit, used in replace */ }} - else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} - {{??}} - validate.errors = vErrors; {{ /* don't edit, used in replace */ }} - return errors === 0; {{ /* don't edit, used in replace */ }} - {{?}} - }; - - return validate; -{{??}} - var {{=$valid}} = errors === errs_{{=$lvl}}; -{{?}} - -{{# def.cleanUp }} - -{{? $top }} - {{# def.finalCleanUp }} -{{?}} - -{{ - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i=0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) - return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || - ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i=0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) - return true; - } -}} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/README.md b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/README.md deleted file mode 100644 index 4d994846c..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -These files are compiled dot templates from dot folder. - -Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limit.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limit.js deleted file mode 100644 index f02a76014..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limit.js +++ /dev/null @@ -1,157 +0,0 @@ -'use strict'; -module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == 'maximum', - $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitItems.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitItems.js deleted file mode 100644 index a27d11886..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitItems.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitLength.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitLength.js deleted file mode 100644 index 789f3741e..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitLength.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitProperties.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitProperties.js deleted file mode 100644 index 11dc93931..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/_limitProperties.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/allOf.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/allOf.js deleted file mode 100644 index 4bad914d6..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/allOf.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - out = it.util.cleanUpCode(out); - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/anyOf.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/anyOf.js deleted file mode 100644 index 01551d54b..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/anyOf.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/comment.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/comment.js deleted file mode 100644 index dd66bb8f0..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/comment.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/const.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/const.js deleted file mode 100644 index 15b7c619f..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/const.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/contains.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/contains.js deleted file mode 100644 index cd4dfabeb..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/contains.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/custom.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/custom.js deleted file mode 100644 index f3e641e70..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/custom.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += 'await '; - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/enum.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/enum.js deleted file mode 100644 index 90580b9ff..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/enum.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/format.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/format.js deleted file mode 100644 index cd9a5693e..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/format.js +++ /dev/null @@ -1,150 +0,0 @@ -'use strict'; -module.exports = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/if.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/if.js deleted file mode 100644 index 019f61ab5..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/if.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/index.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/index.js deleted file mode 100644 index 2fb1b00ef..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': require('./ref'), - allOf: require('./allOf'), - anyOf: require('./anyOf'), - '$comment': require('./comment'), - const: require('./const'), - contains: require('./contains'), - dependencies: require('./dependencies'), - 'enum': require('./enum'), - format: require('./format'), - 'if': require('./if'), - items: require('./items'), - maximum: require('./_limit'), - minimum: require('./_limit'), - maxItems: require('./_limitItems'), - minItems: require('./_limitItems'), - maxLength: require('./_limitLength'), - minLength: require('./_limitLength'), - maxProperties: require('./_limitProperties'), - minProperties: require('./_limitProperties'), - multipleOf: require('./multipleOf'), - not: require('./not'), - oneOf: require('./oneOf'), - pattern: require('./pattern'), - properties: require('./properties'), - propertyNames: require('./propertyNames'), - required: require('./required'), - uniqueItems: require('./uniqueItems'), - validate: require('./validate') -}; diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/items.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/items.js deleted file mode 100644 index d5532f07c..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/items.js +++ /dev/null @@ -1,141 +0,0 @@ -'use strict'; -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/multipleOf.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/multipleOf.js deleted file mode 100644 index af087d2c3..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/multipleOf.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/not.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/not.js deleted file mode 100644 index 6aea65991..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/not.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/oneOf.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/oneOf.js deleted file mode 100644 index 30988d5e3..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/oneOf.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/pattern.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/pattern.js deleted file mode 100644 index 1d74d6b04..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/pattern.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/properties.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/properties.js deleted file mode 100644 index 34a82c62d..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/properties.js +++ /dev/null @@ -1,330 +0,0 @@ -'use strict'; -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/propertyNames.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/propertyNames.js deleted file mode 100644 index b2bf29540..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/propertyNames.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/uniqueItems.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/uniqueItems.js deleted file mode 100644 index c4f6536b4..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/uniqueItems.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/validate.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/validate.js deleted file mode 100644 index cd0efc810..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/dotjs/validate.js +++ /dev/null @@ -1,494 +0,0 @@ -'use strict'; -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [undefined]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; - } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } - if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - out = it.util.cleanUpCode(out); - if ($top) { - out = it.util.finalCleanUpCode(out, $async); - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} diff --git a/Languages/APIs/movie-rating/node_modules/ajv/lib/keyword.js b/Languages/APIs/movie-rating/node_modules/ajv/lib/keyword.js deleted file mode 100644 index 5fec19a67..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/lib/keyword.js +++ /dev/null @@ -1,146 +0,0 @@ -'use strict'; - -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = require('./dotjs/custom'); -var definitionSchema = require('./definition_schema'); - -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword -}; - - -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); - - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); - - if (definition) { - this.validateKeyword(definition, true); - - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i=0; i ../ajv-dist/bower.json - cd ../ajv-dist - - if [[ `git status --porcelain` ]]; then - echo "Changes detected. Updating master branch..." - git add -A - git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" - git push --quiet origin master > /dev/null 2>&1 - fi - - echo "Publishing tag..." - - git tag $TRAVIS_TAG - git push --tags > /dev/null 2>&1 - - echo "Done" -fi diff --git a/Languages/APIs/movie-rating/node_modules/ajv/scripts/travis-gh-pages b/Languages/APIs/movie-rating/node_modules/ajv/scripts/travis-gh-pages deleted file mode 100755 index 46ded1611..000000000 --- a/Languages/APIs/movie-rating/node_modules/ajv/scripts/travis-gh-pages +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then - git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { - rm -rf ../gh-pages - git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages - mkdir -p ../gh-pages/_source - cp *.md ../gh-pages/_source - cp LICENSE ../gh-pages/_source - currentDir=$(pwd) - cd ../gh-pages - $currentDir/node_modules/.bin/gh-pages-generator - # remove logo from README - sed -i -E "s/]+ajv_logo[^>]+>//" index.md - git config user.email "$GIT_USER_EMAIL" - git config user.name "$GIT_USER_NAME" - git add . - git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" - git push --quiet origin gh-pages > /dev/null 2>&1 - } -fi diff --git a/Languages/APIs/movie-rating/node_modules/array-flatten/LICENSE b/Languages/APIs/movie-rating/node_modules/array-flatten/LICENSE deleted file mode 100644 index 983fbe8ae..000000000 --- a/Languages/APIs/movie-rating/node_modules/array-flatten/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/array-flatten/README.md b/Languages/APIs/movie-rating/node_modules/array-flatten/README.md deleted file mode 100644 index 91fa5b637..000000000 --- a/Languages/APIs/movie-rating/node_modules/array-flatten/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Array Flatten - -[![NPM version][npm-image]][npm-url] -[![NPM downloads][downloads-image]][downloads-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] - -> Flatten an array of nested arrays into a single flat array. Accepts an optional depth. - -## Installation - -``` -npm install array-flatten --save -``` - -## Usage - -```javascript -var flatten = require('array-flatten') - -flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) -//=> [1, 2, 3, 4, 5, 6, 7, 8, 9] - -flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) -//=> [1, 2, 3, [4, [5], 6], 7, 8, 9] - -(function () { - flatten(arguments) //=> [1, 2, 3] -})(1, [2, 3]) -``` - -## License - -MIT - -[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat -[npm-url]: https://npmjs.org/package/array-flatten -[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat -[downloads-url]: https://npmjs.org/package/array-flatten -[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat -[travis-url]: https://travis-ci.org/blakeembrey/array-flatten -[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat -[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master diff --git a/Languages/APIs/movie-rating/node_modules/array-flatten/array-flatten.js b/Languages/APIs/movie-rating/node_modules/array-flatten/array-flatten.js deleted file mode 100644 index 089117b32..000000000 --- a/Languages/APIs/movie-rating/node_modules/array-flatten/array-flatten.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -/** - * Expose `arrayFlatten`. - */ -module.exports = arrayFlatten - -/** - * Recursive flatten function with depth. - * - * @param {Array} array - * @param {Array} result - * @param {Number} depth - * @return {Array} - */ -function flattenWithDepth (array, result, depth) { - for (var i = 0; i < array.length; i++) { - var value = array[i] - - if (depth > 0 && Array.isArray(value)) { - flattenWithDepth(value, result, depth - 1) - } else { - result.push(value) - } - } - - return result -} - -/** - * Recursive flatten function. Omitting depth is slightly faster. - * - * @param {Array} array - * @param {Array} result - * @return {Array} - */ -function flattenForever (array, result) { - for (var i = 0; i < array.length; i++) { - var value = array[i] - - if (Array.isArray(value)) { - flattenForever(value, result) - } else { - result.push(value) - } - } - - return result -} - -/** - * Flatten an array, with the ability to define a depth. - * - * @param {Array} array - * @param {Number} depth - * @return {Array} - */ -function arrayFlatten (array, depth) { - if (depth == null) { - return flattenForever(array, []) - } - - return flattenWithDepth(array, [], depth) -} diff --git a/Languages/APIs/movie-rating/node_modules/array-flatten/package.json b/Languages/APIs/movie-rating/node_modules/array-flatten/package.json deleted file mode 100644 index efdae29e5..000000000 --- a/Languages/APIs/movie-rating/node_modules/array-flatten/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "array-flatten@1.1.1", - "_id": "array-flatten@1.1.1", - "_inBundle": false, - "_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "_location": "/array-flatten", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "array-flatten@1.1.1", - "name": "array-flatten", - "escapedName": "array-flatten", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", - "_spec": "array-flatten@1.1.1", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "author": { - "name": "Blake Embrey", - "email": "hello@blakeembrey.com", - "url": "http://blakeembrey.me" - }, - "bugs": { - "url": "https://github.com/blakeembrey/array-flatten/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Flatten an array of nested arrays into a single flat array", - "devDependencies": { - "istanbul": "^0.3.13", - "mocha": "^2.2.4", - "pre-commit": "^1.0.7", - "standard": "^3.7.3" - }, - "files": [ - "array-flatten.js", - "LICENSE" - ], - "homepage": "https://github.com/blakeembrey/array-flatten", - "keywords": [ - "array", - "flatten", - "arguments", - "depth" - ], - "license": "MIT", - "main": "array-flatten.js", - "name": "array-flatten", - "repository": { - "type": "git", - "url": "git://github.com/blakeembrey/array-flatten.git" - }, - "scripts": { - "test": "istanbul cover _mocha -- -R spec" - }, - "version": "1.1.1" -} diff --git a/Languages/APIs/movie-rating/node_modules/asn1/LICENSE b/Languages/APIs/movie-rating/node_modules/asn1/LICENSE deleted file mode 100644 index 9b5dcdb7f..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Mark Cavage, All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE diff --git a/Languages/APIs/movie-rating/node_modules/asn1/README.md b/Languages/APIs/movie-rating/node_modules/asn1/README.md deleted file mode 100644 index 2208210a3..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/README.md +++ /dev/null @@ -1,50 +0,0 @@ -node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. -Currently BER encoding is supported; at some point I'll likely have to do DER. - -## Usage - -Mostly, if you're *actually* needing to read and write ASN.1, you probably don't -need this readme to explain what and why. If you have no idea what ASN.1 is, -see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -The source is pretty much self-explanatory, and has read/write methods for the -common types out there. - -### Decoding - -The following reads an ASN.1 sequence with a boolean. - - var Ber = require('asn1').Ber; - - var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff])); - - reader.readSequence(); - console.log('Sequence len: ' + reader.length); - if (reader.peek() === Ber.Boolean) - console.log(reader.readBoolean()); - -### Encoding - -The following generates the same payload as above. - - var Ber = require('asn1').Ber; - - var writer = new Ber.Writer(); - - writer.startSequence(); - writer.writeBoolean(true); - writer.endSequence(); - - console.log(writer.buffer); - -## Installation - - npm install asn1 - -## License - -MIT. - -## Bugs - -See . diff --git a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/errors.js b/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/errors.js deleted file mode 100644 index 4557b8aea..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/errors.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - - -module.exports = { - - newInvalidAsn1Error: function (msg) { - var e = new Error(); - e.name = 'InvalidAsn1Error'; - e.message = msg || ''; - return e; - } - -}; diff --git a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/index.js b/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/index.js deleted file mode 100644 index 387d1326f..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -var errors = require('./errors'); -var types = require('./types'); - -var Reader = require('./reader'); -var Writer = require('./writer'); - - -// --- Exports - -module.exports = { - - Reader: Reader, - - Writer: Writer - -}; - -for (var t in types) { - if (types.hasOwnProperty(t)) - module.exports[t] = types[t]; -} -for (var e in errors) { - if (errors.hasOwnProperty(e)) - module.exports[e] = errors[e]; -} diff --git a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/reader.js b/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/reader.js deleted file mode 100644 index 8a7e4ca01..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/reader.js +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -var assert = require('assert'); -var Buffer = require('safer-buffer').Buffer; - -var ASN1 = require('./types'); -var errors = require('./errors'); - - -// --- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - - - -// --- API - -function Reader(data) { - if (!data || !Buffer.isBuffer(data)) - throw new TypeError('data must be a node Buffer'); - - this._buf = data; - this._size = data.length; - - // These hold the "current" state - this._len = 0; - this._offset = 0; -} - -Object.defineProperty(Reader.prototype, 'length', { - enumerable: true, - get: function () { return (this._len); } -}); - -Object.defineProperty(Reader.prototype, 'offset', { - enumerable: true, - get: function () { return (this._offset); } -}); - -Object.defineProperty(Reader.prototype, 'remain', { - get: function () { return (this._size - this._offset); } -}); - -Object.defineProperty(Reader.prototype, 'buffer', { - get: function () { return (this._buf.slice(this._offset)); } -}); - - -/** - * Reads a single byte and advances offset; you can pass in `true` to make this - * a "peek" operation (i.e., get the byte, but don't advance the offset). - * - * @param {Boolean} peek true means don't move offset. - * @return {Number} the next byte, null if not enough data. - */ -Reader.prototype.readByte = function (peek) { - if (this._size - this._offset < 1) - return null; - - var b = this._buf[this._offset] & 0xff; - - if (!peek) - this._offset += 1; - - return b; -}; - - -Reader.prototype.peek = function () { - return this.readByte(true); -}; - - -/** - * Reads a (potentially) variable length off the BER buffer. This call is - * not really meant to be called directly, as callers have to manipulate - * the internal buffer afterwards. - * - * As a result of this call, you can call `Reader.length`, until the - * next thing called that does a readLength. - * - * @return {Number} the amount of offset to advance the buffer. - * @throws {InvalidAsn1Error} on bad ASN.1 - */ -Reader.prototype.readLength = function (offset) { - if (offset === undefined) - offset = this._offset; - - if (offset >= this._size) - return null; - - var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; - - if ((lenB & 0x80) === 0x80) { - lenB &= 0x7f; - - if (lenB === 0) - throw newInvalidAsn1Error('Indefinite length not supported'); - - if (lenB > 4) - throw newInvalidAsn1Error('encoding too long'); - - if (this._size - offset < lenB) - return null; - - this._len = 0; - for (var i = 0; i < lenB; i++) - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); - - } else { - // Wasn't a variable length - this._len = lenB; - } - - return offset; -}; - - -/** - * Parses the next sequence in this BER buffer. - * - * To get the length of the sequence, call `Reader.length`. - * - * @return {Number} the sequence's tag. - */ -Reader.prototype.readSequence = function (tag) { - var seq = this.peek(); - if (seq === null) - return null; - if (tag !== undefined && tag !== seq) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + seq.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - this._offset = o; - return seq; -}; - - -Reader.prototype.readInt = function () { - return this._readTag(ASN1.Integer); -}; - - -Reader.prototype.readBoolean = function () { - return (this._readTag(ASN1.Boolean) === 0 ? false : true); -}; - - -Reader.prototype.readEnumeration = function () { - return this._readTag(ASN1.Enumeration); -}; - - -Reader.prototype.readString = function (tag, retbuf) { - if (!tag) - tag = ASN1.OctetString; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - if (this.length === 0) - return retbuf ? Buffer.alloc(0) : ''; - - var str = this._buf.slice(this._offset, this._offset + this.length); - this._offset += this.length; - - return retbuf ? str : str.toString('utf8'); -}; - -Reader.prototype.readOID = function (tag) { - if (!tag) - tag = ASN1.OID; - - var b = this.readString(tag, true); - if (b === null) - return null; - - var values = []; - var value = 0; - - for (var i = 0; i < b.length; i++) { - var byte = b[i] & 0xff; - - value <<= 7; - value += byte & 0x7f; - if ((byte & 0x80) === 0) { - values.push(value); - value = 0; - } - } - - value = values.shift(); - values.unshift(value % 40); - values.unshift((value / 40) >> 0); - - return values.join('.'); -}; - - -Reader.prototype._readTag = function (tag) { - assert.ok(tag !== undefined); - - var b = this.peek(); - - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > 4) - throw newInvalidAsn1Error('Integer too long: ' + this.length); - - if (this.length > this._size - o) - return null; - this._offset = o; - - var fb = this._buf[this._offset]; - var value = 0; - - for (var i = 0; i < this.length; i++) { - value <<= 8; - value |= (this._buf[this._offset++] & 0xff); - } - - if ((fb & 0x80) === 0x80 && i !== 4) - value -= (1 << (i * 8)); - - return value >> 0; -}; - - - -// --- Exported API - -module.exports = Reader; diff --git a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/types.js b/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/types.js deleted file mode 100644 index 8aea00013..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/types.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - - -module.exports = { - EOC: 0, - Boolean: 1, - Integer: 2, - BitString: 3, - OctetString: 4, - Null: 5, - OID: 6, - ObjectDescriptor: 7, - External: 8, - Real: 9, // float - Enumeration: 10, - PDV: 11, - Utf8String: 12, - RelativeOID: 13, - Sequence: 16, - Set: 17, - NumericString: 18, - PrintableString: 19, - T61String: 20, - VideotexString: 21, - IA5String: 22, - UTCTime: 23, - GeneralizedTime: 24, - GraphicString: 25, - VisibleString: 26, - GeneralString: 28, - UniversalString: 29, - CharacterString: 30, - BMPString: 31, - Constructor: 32, - Context: 128 -}; diff --git a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/writer.js b/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/writer.js deleted file mode 100644 index 3515acf79..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/lib/ber/writer.js +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -var assert = require('assert'); -var Buffer = require('safer-buffer').Buffer; -var ASN1 = require('./types'); -var errors = require('./errors'); - - -// --- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - -var DEFAULT_OPTS = { - size: 1024, - growthFactor: 8 -}; - - -// --- Helpers - -function merge(from, to) { - assert.ok(from); - assert.equal(typeof (from), 'object'); - assert.ok(to); - assert.equal(typeof (to), 'object'); - - var keys = Object.getOwnPropertyNames(from); - keys.forEach(function (key) { - if (to[key]) - return; - - var value = Object.getOwnPropertyDescriptor(from, key); - Object.defineProperty(to, key, value); - }); - - return to; -} - - - -// --- API - -function Writer(options) { - options = merge(DEFAULT_OPTS, options || {}); - - this._buf = Buffer.alloc(options.size || 1024); - this._size = this._buf.length; - this._offset = 0; - this._options = options; - - // A list of offsets in the buffer where we need to insert - // sequence tag/len pairs. - this._seq = []; -} - -Object.defineProperty(Writer.prototype, 'buffer', { - get: function () { - if (this._seq.length) - throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); - - return (this._buf.slice(0, this._offset)); - } -}); - -Writer.prototype.writeByte = function (b) { - if (typeof (b) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(1); - this._buf[this._offset++] = b; -}; - - -Writer.prototype.writeInt = function (i, tag) { - if (typeof (i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof (tag) !== 'number') - tag = ASN1.Integer; - - var sz = 4; - - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && - (sz > 1)) { - sz--; - i <<= 8; - } - - if (sz > 4) - throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); - - this._ensure(2 + sz); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = sz; - - while (sz-- > 0) { - this._buf[this._offset++] = ((i & 0xff000000) >>> 24); - i <<= 8; - } - -}; - - -Writer.prototype.writeNull = function () { - this.writeByte(ASN1.Null); - this.writeByte(0x00); -}; - - -Writer.prototype.writeEnumeration = function (i, tag) { - if (typeof (i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof (tag) !== 'number') - tag = ASN1.Enumeration; - - return this.writeInt(i, tag); -}; - - -Writer.prototype.writeBoolean = function (b, tag) { - if (typeof (b) !== 'boolean') - throw new TypeError('argument must be a Boolean'); - if (typeof (tag) !== 'number') - tag = ASN1.Boolean; - - this._ensure(3); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = 0x01; - this._buf[this._offset++] = b ? 0xff : 0x00; -}; - - -Writer.prototype.writeString = function (s, tag) { - if (typeof (s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); - if (typeof (tag) !== 'number') - tag = ASN1.OctetString; - - var len = Buffer.byteLength(s); - this.writeByte(tag); - this.writeLength(len); - if (len) { - this._ensure(len); - this._buf.write(s, this._offset); - this._offset += len; - } -}; - - -Writer.prototype.writeBuffer = function (buf, tag) { - if (typeof (tag) !== 'number') - throw new TypeError('tag must be a number'); - if (!Buffer.isBuffer(buf)) - throw new TypeError('argument must be a buffer'); - - this.writeByte(tag); - this.writeLength(buf.length); - this._ensure(buf.length); - buf.copy(this._buf, this._offset, 0, buf.length); - this._offset += buf.length; -}; - - -Writer.prototype.writeStringArray = function (strings) { - if ((!strings instanceof Array)) - throw new TypeError('argument must be an Array[String]'); - - var self = this; - strings.forEach(function (s) { - self.writeString(s); - }); -}; - -// This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function (s, tag) { - if (typeof (s) !== 'string') - throw new TypeError('argument must be a string'); - if (typeof (tag) !== 'number') - tag = ASN1.OID; - - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) - throw new Error('argument is not a valid OID string'); - - function encodeOctet(bytes, octet) { - if (octet < 128) { - bytes.push(octet); - } else if (octet < 16384) { - bytes.push((octet >>> 7) | 0x80); - bytes.push(octet & 0x7F); - } else if (octet < 2097152) { - bytes.push((octet >>> 14) | 0x80); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else if (octet < 268435456) { - bytes.push((octet >>> 21) | 0x80); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else { - bytes.push(((octet >>> 28) | 0x80) & 0xFF); - bytes.push(((octet >>> 21) | 0x80) & 0xFF); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } - } - - var tmp = s.split('.'); - var bytes = []; - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function (b) { - encodeOctet(bytes, parseInt(b, 10)); - }); - - var self = this; - this._ensure(2 + bytes.length); - this.writeByte(tag); - this.writeLength(bytes.length); - bytes.forEach(function (b) { - self.writeByte(b); - }); -}; - - -Writer.prototype.writeLength = function (len) { - if (typeof (len) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(4); - - if (len <= 0x7f) { - this._buf[this._offset++] = len; - } else if (len <= 0xff) { - this._buf[this._offset++] = 0x81; - this._buf[this._offset++] = len; - } else if (len <= 0xffff) { - this._buf[this._offset++] = 0x82; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else if (len <= 0xffffff) { - this._buf[this._offset++] = 0x83; - this._buf[this._offset++] = len >> 16; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else { - throw newInvalidAsn1Error('Length too long (> 4 bytes)'); - } -}; - -Writer.prototype.startSequence = function (tag) { - if (typeof (tag) !== 'number') - tag = ASN1.Sequence | ASN1.Constructor; - - this.writeByte(tag); - this._seq.push(this._offset); - this._ensure(3); - this._offset += 3; -}; - - -Writer.prototype.endSequence = function () { - var seq = this._seq.pop(); - var start = seq + 3; - var len = this._offset - start; - - if (len <= 0x7f) { - this._shift(start, len, -2); - this._buf[seq] = len; - } else if (len <= 0xff) { - this._shift(start, len, -1); - this._buf[seq] = 0x81; - this._buf[seq + 1] = len; - } else if (len <= 0xffff) { - this._buf[seq] = 0x82; - this._buf[seq + 1] = len >> 8; - this._buf[seq + 2] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[seq] = 0x83; - this._buf[seq + 1] = len >> 16; - this._buf[seq + 2] = len >> 8; - this._buf[seq + 3] = len; - } else { - throw newInvalidAsn1Error('Sequence too long'); - } -}; - - -Writer.prototype._shift = function (start, len, shift) { - assert.ok(start !== undefined); - assert.ok(len !== undefined); - assert.ok(shift); - - this._buf.copy(this._buf, start + shift, start, start + len); - this._offset += shift; -}; - -Writer.prototype._ensure = function (len) { - assert.ok(len); - - if (this._size - this._offset < len) { - var sz = this._size * this._options.growthFactor; - if (sz - this._offset < len) - sz += len; - - var buf = Buffer.alloc(sz); - - this._buf.copy(buf, 0, 0, this._offset); - this._buf = buf; - this._size = sz; - } -}; - - - -// --- Exported API - -module.exports = Writer; diff --git a/Languages/APIs/movie-rating/node_modules/asn1/lib/index.js b/Languages/APIs/movie-rating/node_modules/asn1/lib/index.js deleted file mode 100644 index ede3ab232..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = require('./ber/index'); - - - -// --- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; diff --git a/Languages/APIs/movie-rating/node_modules/asn1/package.json b/Languages/APIs/movie-rating/node_modules/asn1/package.json deleted file mode 100644 index 71265c9ae..000000000 --- a/Languages/APIs/movie-rating/node_modules/asn1/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "asn1@~0.2.3", - "_id": "asn1@0.2.4", - "_inBundle": false, - "_integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "_location": "/asn1", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "asn1@~0.2.3", - "name": "asn1", - "escapedName": "asn1", - "rawSpec": "~0.2.3", - "saveSpec": null, - "fetchSpec": "~0.2.3" - }, - "_requiredBy": [ - "/sshpk" - ], - "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "_shasum": "8d2475dfab553bb33e77b54e59e880bb8ce23136", - "_spec": "asn1@~0.2.3", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/sshpk", - "author": { - "name": "Joyent", - "url": "joyent.com" - }, - "bugs": { - "url": "https://github.com/joyent/node-asn1/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - { - "name": "David Gwynne", - "email": "loki@animata.net" - }, - { - "name": "Yunong Xiao", - "email": "yunong@joyent.com" - }, - { - "name": "Alex Wilson", - "email": "alex.wilson@joyent.com" - } - ], - "dependencies": { - "safer-buffer": "~2.1.0" - }, - "deprecated": false, - "description": "Contains parsers and serializers for ASN.1 (currently BER only)", - "devDependencies": { - "eslint": "2.13.1", - "eslint-plugin-joyent": "~1.3.0", - "faucet": "0.0.1", - "istanbul": "^0.3.6", - "tape": "^3.5.0" - }, - "homepage": "https://github.com/joyent/node-asn1#readme", - "license": "MIT", - "main": "lib/index.js", - "name": "asn1", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-asn1.git" - }, - "scripts": { - "test": "tape ./test/ber/*.test.js" - }, - "version": "0.2.4" -} diff --git a/Languages/APIs/movie-rating/node_modules/assert-plus/AUTHORS b/Languages/APIs/movie-rating/node_modules/assert-plus/AUTHORS deleted file mode 100644 index 1923524fe..000000000 --- a/Languages/APIs/movie-rating/node_modules/assert-plus/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -Dave Eddy -Fred Kuo -Lars-Magnus Skog -Mark Cavage -Patrick Mooney -Rob Gulewich diff --git a/Languages/APIs/movie-rating/node_modules/assert-plus/CHANGES.md b/Languages/APIs/movie-rating/node_modules/assert-plus/CHANGES.md deleted file mode 100644 index 57d92bfdb..000000000 --- a/Languages/APIs/movie-rating/node_modules/assert-plus/CHANGES.md +++ /dev/null @@ -1,14 +0,0 @@ -# assert-plus Changelog - -## 1.0.0 - -- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input -- Add assert.finite check. Previous assert.number callers should use this if - they expect Infinity inputs to throw. - -## 0.2.0 - -- Fix `assert.object(null)` so it throws -- Fix optional/arrayOf exports for non-type-of asserts -- Add optiona/arrayOf exports for Stream/Date/Regex/uuid -- Add basic unit test coverage diff --git a/Languages/APIs/movie-rating/node_modules/assert-plus/README.md b/Languages/APIs/movie-rating/node_modules/assert-plus/README.md deleted file mode 100644 index ec200d161..000000000 --- a/Languages/APIs/movie-rating/node_modules/assert-plus/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - -```javascript - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id'); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } -``` - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object. (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - -```javascript - function test(foo) { - assert.string(foo, 'foo'); - } -``` - -There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: - -```javascript - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } -``` - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - -```javascript - assert.optionalString(foo, 'foo'); -``` - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. Be advised: The standard functions re-exported from `assert` are -also disabled in assert-plus if NDEBUG is specified. Using them directly from -the `assert` module avoids this behavior. - -The complete list of APIs is: - -* assert.array -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.finite -* assert.object -* assert.string -* assert.stream -* assert.date -* assert.regexp -* assert.uuid -* assert.arrayOfArray -* assert.arrayOfBool -* assert.arrayOfBuffer -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfFinite -* assert.arrayOfObject -* assert.arrayOfString -* assert.arrayOfStream -* assert.arrayOfDate -* assert.arrayOfRegexp -* assert.arrayOfUuid -* assert.optionalArray -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalFinite -* assert.optionalObject -* assert.optionalString -* assert.optionalStream -* assert.optionalDate -* assert.optionalRegexp -* assert.optionalUuid -* assert.optionalArrayOfArray -* assert.optionalArrayOfBool -* assert.optionalArrayOfBuffer -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfFinite -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.optionalArrayOfStream -* assert.optionalArrayOfDate -* assert.optionalArrayOfRegexp -* assert.optionalArrayOfUuid -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -## Bugs - -See . diff --git a/Languages/APIs/movie-rating/node_modules/assert-plus/assert.js b/Languages/APIs/movie-rating/node_modules/assert-plus/assert.js deleted file mode 100644 index 26f944eec..000000000 --- a/Languages/APIs/movie-rating/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. -// Copyright 2015 Joyent, Inc. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - -///--- Globals - -/* JSSTYLED */ -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - - -///--- Internal - -function _capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function _toss(name, expected, oper, arg, actual) { - throw new assert.AssertionError({ - message: util.format('%s (%s) is required', name, expected), - actual: (actual === undefined) ? typeof (arg) : actual(arg), - expected: expected, - operator: oper || '===', - stackStartFunction: _toss.caller - }); -} - -function _getClass(arg) { - return (Object.prototype.toString.call(arg).slice(8, -1)); -} - -function noop() { - // Why even bother with asserts? -} - - -///--- Exports - -var types = { - bool: { - check: function (arg) { return typeof (arg) === 'boolean'; } - }, - func: { - check: function (arg) { return typeof (arg) === 'function'; } - }, - string: { - check: function (arg) { return typeof (arg) === 'string'; } - }, - object: { - check: function (arg) { - return typeof (arg) === 'object' && arg !== null; - } - }, - number: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg); - } - }, - finite: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); - } - }, - buffer: { - check: function (arg) { return Buffer.isBuffer(arg); }, - operator: 'Buffer.isBuffer' - }, - array: { - check: function (arg) { return Array.isArray(arg); }, - operator: 'Array.isArray' - }, - stream: { - check: function (arg) { return arg instanceof Stream; }, - operator: 'instanceof', - actual: _getClass - }, - date: { - check: function (arg) { return arg instanceof Date; }, - operator: 'instanceof', - actual: _getClass - }, - regexp: { - check: function (arg) { return arg instanceof RegExp; }, - operator: 'instanceof', - actual: _getClass - }, - uuid: { - check: function (arg) { - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); - }, - operator: 'isUUID' - } -}; - -function _setExports(ndebug) { - var keys = Object.keys(types); - var out; - - /* re-export standard assert */ - if (process.env.NODE_NDEBUG) { - out = noop; - } else { - out = function (arg, msg) { - if (!arg) { - _toss(msg, 'true', arg); - } - }; - } - - /* standard checks */ - keys.forEach(function (k) { - if (ndebug) { - out[k] = noop; - return; - } - var type = types[k]; - out[k] = function (arg, msg) { - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* optional checks */ - keys.forEach(function (k) { - var name = 'optional' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* arrayOf checks */ - keys.forEach(function (k) { - var name = 'arrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* optionalArrayOf checks */ - keys.forEach(function (k) { - var name = 'optionalArrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* re-export built-in assertions */ - Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - out[k] = assert[k]; - return; - } - if (ndebug) { - out[k] = noop; - return; - } - out[k] = assert[k]; - }); - - /* export ourselves (for unit tests _only_) */ - out._setExports = _setExports; - - return out; -} - -module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/Languages/APIs/movie-rating/node_modules/assert-plus/package.json b/Languages/APIs/movie-rating/node_modules/assert-plus/package.json deleted file mode 100644 index 7af559b84..000000000 --- a/Languages/APIs/movie-rating/node_modules/assert-plus/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "assert-plus@^1.0.0", - "_id": "assert-plus@1.0.0", - "_inBundle": false, - "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "_location": "/assert-plus", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "assert-plus@^1.0.0", - "name": "assert-plus", - "escapedName": "assert-plus", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/dashdash", - "/getpass", - "/http-signature", - "/jsprim", - "/sshpk", - "/verror" - ], - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", - "_spec": "assert-plus@^1.0.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/http-signature", - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "bugs": { - "url": "https://github.com/mcavage/node-assert-plus/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dave Eddy", - "email": "dave@daveeddy.com" - }, - { - "name": "Fred Kuo", - "email": "fred.kuo@joyent.com" - }, - { - "name": "Lars-Magnus Skog", - "email": "ralphtheninja@riseup.net" - }, - { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - { - "name": "Patrick Mooney", - "email": "pmooney@pfmooney.com" - }, - { - "name": "Rob Gulewich", - "email": "robert.gulewich@joyent.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Extra assertions on top of node's assert module", - "devDependencies": { - "faucet": "0.0.1", - "tape": "4.2.2" - }, - "engines": { - "node": ">=0.8" - }, - "homepage": "https://github.com/mcavage/node-assert-plus#readme", - "license": "MIT", - "main": "./assert.js", - "name": "assert-plus", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/mcavage/node-assert-plus.git" - }, - "scripts": { - "test": "tape tests/*.js | ./node_modules/.bin/faucet" - }, - "version": "1.0.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/LICENSE b/Languages/APIs/movie-rating/node_modules/asynckit/LICENSE deleted file mode 100644 index c9eca5dd9..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Alex Indigo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/README.md b/Languages/APIs/movie-rating/node_modules/asynckit/README.md deleted file mode 100644 index ddcc7e6b9..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) - -Minimal async jobs utility library, with streams support. - -[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) -[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) -[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) - -[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) -[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) -[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) - - - -AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. -Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. - -It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. - -| compression | size | -| :----------------- | -------: | -| asynckit.js | 12.34 kB | -| asynckit.min.js | 4.11 kB | -| asynckit.min.js.gz | 1.47 kB | - - -## Install - -```sh -$ npm install --save asynckit -``` - -## Examples - -### Parallel Jobs - -Runs iterator over provided array in parallel. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will terminate rest of the active jobs (if abort function is provided) -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var parallel = require('asynckit').parallel - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , target = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// async job accepts one element from the array -// and a callback function -function asyncJob(item, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var parallel = require('asynckit/parallel') - , assert = require('assert') - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] - , target = [] - , keys = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); - assert.deepEqual(keys, expectedKeys); -}); - -// supports full value, key, callback (shortcut) interface -function asyncJob(item, key, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - keys.push(key); - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). - -### Serial Jobs - -Runs iterator over provided array sequentially. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will not proceed to the rest of the items in the list -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var serial = require('asynckit/serial') - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// extended interface (item, key, callback) -// also supported for arrays -function asyncJob(item, key, cb) -{ - target.push(key); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var serial = require('asynckit').serial - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , target = [] - ; - - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// shortcut interface (item, callback) -// works for object as well as for the arrays -function asyncJob(item, cb) -{ - target.push(item); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). - -_Note: Since _object_ is an _unordered_ collection of properties, -it may produce unexpected results with sequential iterations. -Whenever order of the jobs' execution is important please use `serialOrdered` method._ - -### Ordered Serial Iterations - -TBD - -For example [compare-property](compare-property) package. - -### Streaming interface - -TBD - -## Want to Know More? - -More examples can be found in [test folder](test/). - -Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. - -## License - -AsyncKit is licensed under the MIT license. diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/bench.js b/Languages/APIs/movie-rating/node_modules/asynckit/bench.js deleted file mode 100644 index c612f1a55..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/bench.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-console: "off" */ - -var asynckit = require('./') - , async = require('async') - , assert = require('assert') - , expected = 0 - ; - -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -var source = []; -for (var z = 1; z < 100; z++) -{ - source.push(z); - expected += z; -} - -suite -// add tests - -.add('async.map', function(deferred) -{ - var total = 0; - - async.map(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -.add('asynckit.parallel', function(deferred) -{ - var total = 0; - - asynckit.parallel(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -// add listeners -.on('cycle', function(ev) -{ - console.log(String(ev.target)); -}) -.on('complete', function() -{ - console.log('Fastest is ' + this.filter('fastest').map('name')); -}) -// run async -.run({ 'async': true }); diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/index.js b/Languages/APIs/movie-rating/node_modules/asynckit/index.js deleted file mode 100644 index 455f9454e..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = -{ - parallel : require('./parallel.js'), - serial : require('./serial.js'), - serialOrdered : require('./serialOrdered.js') -}; diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/abort.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/abort.js deleted file mode 100644 index 114367e5f..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/abort.js +++ /dev/null @@ -1,29 +0,0 @@ -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/async.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/async.js deleted file mode 100644 index 7f1288a4c..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/async.js +++ /dev/null @@ -1,34 +0,0 @@ -var defer = require('./defer.js'); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/defer.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/defer.js deleted file mode 100644 index b67110c7a..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/iterate.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/iterate.js deleted file mode 100644 index 5d2839a59..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/iterate.js +++ /dev/null @@ -1,75 +0,0 @@ -var async = require('./async.js') - , abort = require('./abort.js') - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_asynckit.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_asynckit.js deleted file mode 100644 index 78ad240f0..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_asynckit.js +++ /dev/null @@ -1,91 +0,0 @@ -var streamify = require('./streamify.js') - , defer = require('./defer.js') - ; - -// API -module.exports = ReadableAsyncKit; - -/** - * Base constructor for all streams - * used to hold properties/methods - */ -function ReadableAsyncKit() -{ - ReadableAsyncKit.super_.apply(this, arguments); - - // list of active jobs - this.jobs = {}; - - // add stream methods - this.destroy = destroy; - this._start = _start; - this._read = _read; -} - -/** - * Destroys readable stream, - * by aborting outstanding jobs - * - * @returns {void} - */ -function destroy() -{ - if (this.destroyed) - { - return; - } - - this.destroyed = true; - - if (typeof this.terminator == 'function') - { - this.terminator(); - } -} - -/** - * Starts provided jobs in async manner - * - * @private - */ -function _start() -{ - // first argument – runner function - var runner = arguments[0] - // take away first argument - , args = Array.prototype.slice.call(arguments, 1) - // second argument - input data - , input = args[0] - // last argument - result callback - , endCb = streamify.callback.call(this, args[args.length - 1]) - ; - - args[args.length - 1] = endCb; - // third argument - iterator - args[1] = streamify.iterator.call(this, args[1]); - - // allow time for proper setup - defer(function() - { - if (!this.destroyed) - { - this.terminator = runner.apply(null, args); - } - else - { - endCb(null, Array.isArray(input) ? [] : {}); - } - }.bind(this)); -} - - -/** - * Implement _read to comply with Readable streams - * Doesn't really make sense for flowing object mode - * - * @private - */ -function _read() -{ - -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_parallel.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_parallel.js deleted file mode 100644 index 5d2929f7a..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_parallel.js +++ /dev/null @@ -1,25 +0,0 @@ -var parallel = require('../parallel.js'); - -// API -module.exports = ReadableParallel; - -/** - * Streaming wrapper to `asynckit.parallel` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableParallel(list, iterator, callback) -{ - if (!(this instanceof ReadableParallel)) - { - return new ReadableParallel(list, iterator, callback); - } - - // turn on object mode - ReadableParallel.super_.call(this, {objectMode: true}); - - this._start(parallel, list, iterator, callback); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial.js deleted file mode 100644 index 782269820..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial.js +++ /dev/null @@ -1,25 +0,0 @@ -var serial = require('../serial.js'); - -// API -module.exports = ReadableSerial; - -/** - * Streaming wrapper to `asynckit.serial` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerial(list, iterator, callback) -{ - if (!(this instanceof ReadableSerial)) - { - return new ReadableSerial(list, iterator, callback); - } - - // turn on object mode - ReadableSerial.super_.call(this, {objectMode: true}); - - this._start(serial, list, iterator, callback); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial_ordered.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial_ordered.js deleted file mode 100644 index 3de89c472..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/readable_serial_ordered.js +++ /dev/null @@ -1,29 +0,0 @@ -var serialOrdered = require('../serialOrdered.js'); - -// API -module.exports = ReadableSerialOrdered; -// expose sort helpers -module.exports.ascending = serialOrdered.ascending; -module.exports.descending = serialOrdered.descending; - -/** - * Streaming wrapper to `asynckit.serialOrdered` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerialOrdered(list, iterator, sortMethod, callback) -{ - if (!(this instanceof ReadableSerialOrdered)) - { - return new ReadableSerialOrdered(list, iterator, sortMethod, callback); - } - - // turn on object mode - ReadableSerialOrdered.super_.call(this, {objectMode: true}); - - this._start(serialOrdered, list, iterator, sortMethod, callback); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/state.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/state.js deleted file mode 100644 index cbea7ad8f..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/state.js +++ /dev/null @@ -1,37 +0,0 @@ -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/streamify.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/streamify.js deleted file mode 100644 index f56a1c92b..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/streamify.js +++ /dev/null @@ -1,141 +0,0 @@ -var async = require('./async.js'); - -// API -module.exports = { - iterator: wrapIterator, - callback: wrapCallback -}; - -/** - * Wraps iterators with long signature - * - * @this ReadableAsyncKit# - * @param {function} iterator - function to wrap - * @returns {function} - wrapped function - */ -function wrapIterator(iterator) -{ - var stream = this; - - return function(item, key, cb) - { - var aborter - , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) - ; - - stream.jobs[key] = wrappedCb; - - // it's either shortcut (item, cb) - if (iterator.length == 2) - { - aborter = iterator(item, wrappedCb); - } - // or long format (item, key, cb) - else - { - aborter = iterator(item, key, wrappedCb); - } - - return aborter; - }; -} - -/** - * Wraps provided callback function - * allowing to execute snitch function before - * real callback - * - * @this ReadableAsyncKit# - * @param {function} callback - function to wrap - * @returns {function} - wrapped function - */ -function wrapCallback(callback) -{ - var stream = this; - - var wrapped = function(error, result) - { - return finisher.call(stream, error, result, callback); - }; - - return wrapped; -} - -/** - * Wraps provided iterator callback function - * makes sure snitch only called once, - * but passes secondary calls to the original callback - * - * @this ReadableAsyncKit# - * @param {function} callback - callback to wrap - * @param {number|string} key - iteration key - * @returns {function} wrapped callback - */ -function wrapIteratorCallback(callback, key) -{ - var stream = this; - - return function(error, output) - { - // don't repeat yourself - if (!(key in stream.jobs)) - { - callback(error, output); - return; - } - - // clean up jobs - delete stream.jobs[key]; - - return streamer.call(stream, error, {key: key, value: output}, callback); - }; -} - -/** - * Stream wrapper for iterator callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects iterator results - */ -function streamer(error, output, callback) -{ - if (error && !this.error) - { - this.error = error; - this.pause(); - this.emit('error', error); - // send back value only, as expected - callback(error, output && output.value); - return; - } - - // stream stuff - this.push(output); - - // back to original track - // send back value only, as expected - callback(error, output && output.value); -} - -/** - * Stream wrapper for finishing callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects final results - */ -function finisher(error, output, callback) -{ - // signal end of the stream - // only for successfully finished streams - if (!error) - { - this.push(null); - } - - // back to original track - callback(error, output); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/lib/terminator.js b/Languages/APIs/movie-rating/node_modules/asynckit/lib/terminator.js deleted file mode 100644 index d6eb99219..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/lib/terminator.js +++ /dev/null @@ -1,29 +0,0 @@ -var abort = require('./abort.js') - , async = require('./async.js') - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/package.json b/Languages/APIs/movie-rating/node_modules/asynckit/package.json deleted file mode 100644 index 13842f6bc..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_from": "asynckit@^0.4.0", - "_id": "asynckit@0.4.0", - "_inBundle": false, - "_integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "_location": "/asynckit", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "asynckit@^0.4.0", - "name": "asynckit", - "escapedName": "asynckit", - "rawSpec": "^0.4.0", - "saveSpec": null, - "fetchSpec": "^0.4.0" - }, - "_requiredBy": [ - "/form-data" - ], - "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", - "_spec": "asynckit@^0.4.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/form-data", - "author": { - "name": "Alex Indigo", - "email": "iam@alexindigo.com" - }, - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Minimal async jobs utility library, with streams support", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "homepage": "https://github.com/alexindigo/asynckit#readme", - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "license": "MIT", - "main": "index.js", - "name": "asynckit", - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "scripts": { - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "clean": "rimraf coverage", - "debug": "tape test/test-*.js", - "lint": "eslint *.js lib/*.js test/*.js", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js" - }, - "version": "0.4.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/parallel.js b/Languages/APIs/movie-rating/node_modules/asynckit/parallel.js deleted file mode 100644 index 3c50344d8..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/parallel.js +++ /dev/null @@ -1,43 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/serial.js b/Languages/APIs/movie-rating/node_modules/asynckit/serial.js deleted file mode 100644 index 6cd949a67..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/serial.js +++ /dev/null @@ -1,17 +0,0 @@ -var serialOrdered = require('./serialOrdered.js'); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/serialOrdered.js b/Languages/APIs/movie-rating/node_modules/asynckit/serialOrdered.js deleted file mode 100644 index 607eafea5..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/serialOrdered.js +++ /dev/null @@ -1,75 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} diff --git a/Languages/APIs/movie-rating/node_modules/asynckit/stream.js b/Languages/APIs/movie-rating/node_modules/asynckit/stream.js deleted file mode 100644 index d43465f90..000000000 --- a/Languages/APIs/movie-rating/node_modules/asynckit/stream.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('util').inherits - , Readable = require('stream').Readable - , ReadableAsyncKit = require('./lib/readable_asynckit.js') - , ReadableParallel = require('./lib/readable_parallel.js') - , ReadableSerial = require('./lib/readable_serial.js') - , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') - ; - -// API -module.exports = -{ - parallel : ReadableParallel, - serial : ReadableSerial, - serialOrdered : ReadableSerialOrdered, -}; - -inherits(ReadableAsyncKit, Readable); - -inherits(ReadableParallel, ReadableAsyncKit); -inherits(ReadableSerial, ReadableAsyncKit); -inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/Languages/APIs/movie-rating/node_modules/aws-sign2/LICENSE b/Languages/APIs/movie-rating/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0c..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/Languages/APIs/movie-rating/node_modules/aws-sign2/README.md b/Languages/APIs/movie-rating/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0a..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/Languages/APIs/movie-rating/node_modules/aws-sign2/index.js b/Languages/APIs/movie-rating/node_modules/aws-sign2/index.js deleted file mode 100644 index fb35f6db0..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,212 +0,0 @@ - -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.stringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/Languages/APIs/movie-rating/node_modules/aws-sign2/package.json b/Languages/APIs/movie-rating/node_modules/aws-sign2/package.json deleted file mode 100644 index 6f4271b38..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_from": "aws-sign2@~0.7.0", - "_id": "aws-sign2@0.7.0", - "_inBundle": false, - "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "_location": "/aws-sign2", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "aws-sign2@~0.7.0", - "name": "aws-sign2", - "escapedName": "aws-sign2", - "rawSpec": "~0.7.0", - "saveSpec": null, - "fetchSpec": "~0.7.0" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "_shasum": "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8", - "_spec": "aws-sign2@~0.7.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/request", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "bugs": { - "url": "https://github.com/mikeal/aws-sign/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "devDependencies": {}, - "engines": { - "node": "*" - }, - "homepage": "https://github.com/mikeal/aws-sign#readme", - "license": "Apache-2.0", - "main": "index.js", - "name": "aws-sign2", - "optionalDependencies": {}, - "repository": { - "url": "git+https://github.com/mikeal/aws-sign.git" - }, - "version": "0.7.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/aws4/.travis.yml b/Languages/APIs/movie-rating/node_modules/aws4/.travis.yml deleted file mode 100644 index 61d063404..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws4/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4.2" diff --git a/Languages/APIs/movie-rating/node_modules/aws4/LICENSE b/Languages/APIs/movie-rating/node_modules/aws4/LICENSE deleted file mode 100644 index 4f321e599..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws4/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2013 Michael Hart (michael.hart.au@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/aws4/README.md b/Languages/APIs/movie-rating/node_modules/aws4/README.md deleted file mode 100644 index 6b002d02f..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws4/README.md +++ /dev/null @@ -1,523 +0,0 @@ -aws4 ----- - -[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4) - -A small utility to sign vanilla node.js http(s) request options using Amazon's -[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html). - -Can also be used [in the browser](./browser). - -This signature is supported by nearly all Amazon services, including -[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/), -[EC2](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/), -[DynamoDB](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html), -[Kinesis](http://docs.aws.amazon.com/kinesis/latest/APIReference/), -[Lambda](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html), -[SQS](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/), -[SNS](http://docs.aws.amazon.com/sns/latest/api/), -[IAM](http://docs.aws.amazon.com/IAM/latest/APIReference/), -[STS](http://docs.aws.amazon.com/STS/latest/APIReference/), -[RDS](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/), -[CloudWatch](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/), -[CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/), -[CodeDeploy](http://docs.aws.amazon.com/codedeploy/latest/APIReference/), -[CloudFront](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/), -[CloudTrail](http://docs.aws.amazon.com/awscloudtrail/latest/APIReference/), -[ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/), -[EMR](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/), -[Glacier](http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html), -[CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/APIReq.html), -[Elastic Load Balancing](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/), -[Elastic Transcoder](http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html), -[CloudFormation](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/), -[Elastic Beanstalk](http://docs.aws.amazon.com/elasticbeanstalk/latest/api/), -[Storage Gateway](http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html), -[Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/APIReference/), -[Direct Connect](http://docs.aws.amazon.com/directconnect/latest/APIReference/), -[Redshift](http://docs.aws.amazon.com/redshift/latest/APIReference/), -[OpsWorks](http://docs.aws.amazon.com/opsworks/latest/APIReference/), -[SES](http://docs.aws.amazon.com/ses/latest/APIReference/), -[SWF](http://docs.aws.amazon.com/amazonswf/latest/apireference/), -[AutoScaling](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/), -[Mobile Analytics](http://docs.aws.amazon.com/mobileanalytics/latest/ug/server-reference.html), -[Cognito Identity](http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/), -[Cognito Sync](http://docs.aws.amazon.com/cognitosync/latest/APIReference/), -[Container Service](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/), -[AppStream](http://docs.aws.amazon.com/appstream/latest/developerguide/appstream-api-rest.html), -[Key Management Service](http://docs.aws.amazon.com/kms/latest/APIReference/), -[Config](http://docs.aws.amazon.com/config/latest/APIReference/), -[CloudHSM](http://docs.aws.amazon.com/cloudhsm/latest/dg/api-ref.html), -[Route53](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rest.html) and -[Route53 Domains](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rpc.html). - -Indeed, the only AWS services that *don't* support v4 as of 2014-12-30 are -[Import/Export](http://docs.aws.amazon.com/AWSImportExport/latest/DG/api-reference.html) and -[SimpleDB](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) -(they only support [AWS Signature Version 2](https://github.com/mhart/aws2)). - -It also provides defaults for a number of core AWS headers and -request parameters, making it very easy to query AWS services, or -build out a fully-featured AWS library. - -Example -------- - -```javascript -var http = require('http'), - https = require('https'), - aws4 = require('aws4') - -// given an options object you could pass to http.request -var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} - -// alternatively (as aws4 can infer the host): -opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} - -// alternatively (as us-east-1 is default): -opts = {service: 'sqs', path: '/?Action=ListQueues'} - -aws4.sign(opts) // assumes AWS credentials are available in process.env - -console.log(opts) -/* -{ - host: 'sqs.us-east-1.amazonaws.com', - path: '/?Action=ListQueues', - headers: { - Host: 'sqs.us-east-1.amazonaws.com', - 'X-Amz-Date': '20121226T061030Z', - Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' - } -} -*/ - -// we can now use this to query AWS using the standard node.js http API -http.request(opts, function(res) { res.pipe(process.stdout) }).end() -/* - - -... -*/ -``` - -More options ------------- - -```javascript -// you can also pass AWS credentials in explicitly (otherwise taken from process.env) -aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) - -// can also add the signature to query strings -aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) - -// create a utility function to pipe to stdout (with https this time) -function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } - -// aws4 can infer the HTTP method if a body is passed in -// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' -request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) -/* - -... -*/ - -// can specify any custom option or header as per usual -request(aws4.sign({ - service: 'dynamodb', - region: 'ap-southeast-2', - method: 'POST', - path: '/', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'DynamoDB_20120810.ListTables' - }, - body: '{}' -})) -/* -{"TableNames":[]} -... -*/ - -// works with all other services that support Signature Version 4 - -request(aws4.sign({service: 's3', path: '/', signQuery: true})) -/* - -... -*/ - -request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) -/* - -... -*/ - -request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) -/* - -... -*/ - -request(aws4.sign({service: 'appstream', path: '/applications'})) -/* -{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... -... -*/ - -request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) -/* -{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} -... -*/ - -request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) -/* -{"NextPageToken":null,"Pipelines":[]} -... -*/ - -request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) -/* -{"Functions":[],"NextMarker":null} -... -*/ - -request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) -/* - -... -*/ - -request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) -/* -{"Marker":null,"VaultList":[]} -... -*/ - -request(aws4.sign({service: 'storagegateway', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' -}})) -/* -{"Gateways":[]} -... -*/ - -request(aws4.sign({service: 'datapipeline', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'DataPipeline.ListPipelines' -}})) -/* -{"hasMoreResults":false,"pipelineIdList":[]} -... -*/ - -request(aws4.sign({service: 'opsworks', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' -}})) -/* -{"Stacks":[]} -... -*/ - -request(aws4.sign({service: 'route53domains', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' -}})) -/* -{"Domains":[]} -... -*/ - -request(aws4.sign({service: 'kinesis', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Kinesis_20131202.ListStreams' -}})) -/* -{"HasMoreStreams":false,"StreamNames":[]} -... -*/ - -request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' -}})) -/* -{"trailList":[]} -... -*/ - -request(aws4.sign({service: 'logs', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' -}})) -/* -{"logGroups":[]} -... -*/ - -request(aws4.sign({service: 'codedeploy', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' -}})) -/* -{"applications":[]} -... -*/ - -request(aws4.sign({service: 'directconnect', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OvertureService.DescribeConnections' -}})) -/* -{"connections":[]} -... -*/ - -request(aws4.sign({service: 'kms', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'TrentService.ListKeys' -}})) -/* -{"Keys":[],"Truncated":false} -... -*/ - -request(aws4.sign({service: 'config', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' -}})) -/* -{"DeliveryChannels":[]} -... -*/ - -request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' -}})) -/* -{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} -... -*/ - -request(aws4.sign({ - service: 'swf', - body: '{"registrationStatus":"REGISTERED"}', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' - } -})) -/* -{"domainInfos":[]} -... -*/ - -request(aws4.sign({ - service: 'cognito-identity', - body: '{"MaxResults": 1}', - headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' - } -})) -/* -{"IdentityPools":[]} -... -*/ - -request(aws4.sign({ - service: 'mobileanalytics', - path: '/2014-06-05/events', - body: JSON.stringify({events:[{ - eventType: 'a', - timestamp: new Date().toISOString(), - session: {}, - }]}), - headers: { - 'Content-Type': 'application/json', - 'X-Amz-Client-Context': JSON.stringify({ - client: {client_id: 'a', app_title: 'a'}, - custom: {}, - env: {platform: 'a'}, - services: {}, - }), - } -})) -/* -(HTTP 202, empty response) -*/ - -// Generate CodeCommit Git access password -var signer = new aws4.RequestSigner({ - service: 'codecommit', - host: 'git-codecommit.us-east-1.amazonaws.com', - method: 'GIT', - path: '/v1/repos/MyAwesomeRepo', -}) -var password = signer.getDateTime() + 'Z' + signer.signature() -``` - -API ---- - -### aws4.sign(requestOptions, [credentials]) - -This calculates and populates the `Authorization` header of -`requestOptions`, and any other necessary AWS headers and/or request -options. Returns `requestOptions` as a convenience for chaining. - -`requestOptions` is an object holding the same options that the node.js -[http.request](http://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) -function takes. - -The following properties of `requestOptions` are used in the signing or -populated if they don't already exist: - -- `hostname` or `host` (will be determined from `service` and `region` if not given) -- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) -- `path` (will use `'/'` if not given) -- `body` (will use `''` if not given) -- `service` (will be calculated from `hostname` or `host` if not given) -- `region` (will be calculated from `hostname` or `host` or use `'us-east-1'` if not given) -- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) -- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` - if not given and there is a `body`) -- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) - -Your AWS credentials (which can be found in your -[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) -can be specified in one of two ways: - -- As the second argument, like this: - -```javascript -aws4.sign(requestOptions, { - secretAccessKey: "", - accessKeyId: "", - sessionToken: "" -}) -``` - -- From `process.env`, such as this: - -``` -export AWS_SECRET_ACCESS_KEY="" -export AWS_ACCESS_KEY_ID="" -export AWS_SESSION_TOKEN="" -``` - -(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) - -The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing -with [IAM STS temporary credentials](http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html). - -Installation ------------- - -With [npm](http://npmjs.org/) do: - -``` -npm install aws4 -``` - -Can also be used [in the browser](./browser). - -Thanks ------- - -Thanks to [@jed](https://github.com/jed) for his -[dynamo-client](https://github.com/jed/dynamo-client) lib where I first -committed and subsequently extracted this code. - -Also thanks to the -[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving -me a start on implementing the v4 signature. - diff --git a/Languages/APIs/movie-rating/node_modules/aws4/aws4.js b/Languages/APIs/movie-rating/node_modules/aws4/aws4.js deleted file mode 100644 index 124cd7ac4..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws4/aws4.js +++ /dev/null @@ -1,332 +0,0 @@ -var aws4 = exports, - url = require('url'), - querystring = require('querystring'), - crypto = require('crypto'), - lru = require('./lru'), - credentialsCache = lru(1000) - -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html - -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} - -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) -} - -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = (request.headers || {}), - hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() - - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host - - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' -} - -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) - var hostParts = (match || []).slice(1, 3) - - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es') - hostParts = hostParts.reverse() - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : - (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, - service = this.service === 'ses' ? 'email' : this.service - return service + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash - - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } - - if (query) { - queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { - if (!key) return obj - obj[key] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key].slice().sort()) - return obj - }, {}))) - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = decodeURIComponent(piece) - path.push(encodeRfc3986(encodeURIComponent(piece))) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .sort() - .join(';') -} - -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} - -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} - -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/', - queryIx = path.indexOf('?'), - query = null - - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } - - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { - path = path.split('/').map(function(piece) { - return encodeURIComponent(decodeURIComponent(piece)) - }).join('/') - } - - this.parsedPath = { - path: path, - query: query, - } -} - -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query - - if (!query) return path - - // Services don't support empty query string keys - if (query[''] != null) delete query[''] - - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} - -aws4.RequestSigner = RequestSigner - -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} diff --git a/Languages/APIs/movie-rating/node_modules/aws4/lru.js b/Languages/APIs/movie-rating/node_modules/aws4/lru.js deleted file mode 100644 index 333f66a44..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws4/lru.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports = function(size) { - return new LruCache(size) -} - -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} - -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} - -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true -} - -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} - -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } -} - - -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null -} - -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) - - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } -} - -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} - -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } -} - - -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null -} diff --git a/Languages/APIs/movie-rating/node_modules/aws4/package.json b/Languages/APIs/movie-rating/node_modules/aws4/package.json deleted file mode 100644 index 4f1ebb47d..000000000 --- a/Languages/APIs/movie-rating/node_modules/aws4/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_from": "aws4@^1.8.0", - "_id": "aws4@1.8.0", - "_inBundle": false, - "_integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "_location": "/aws4", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "aws4@^1.8.0", - "name": "aws4", - "escapedName": "aws4", - "rawSpec": "^1.8.0", - "saveSpec": null, - "fetchSpec": "^1.8.0" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "_shasum": "f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f", - "_spec": "aws4@^1.8.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/request", - "author": { - "name": "Michael Hart", - "email": "michael.hart.au@gmail.com", - "url": "http://github.com/mhart" - }, - "bugs": { - "url": "https://github.com/mhart/aws4/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Signs and prepares requests using AWS Signature Version 4", - "devDependencies": { - "mocha": "^2.4.5", - "should": "^8.2.2" - }, - "homepage": "https://github.com/mhart/aws4#readme", - "keywords": [ - "amazon", - "aws", - "signature", - "s3", - "ec2", - "autoscaling", - "cloudformation", - "elasticloadbalancing", - "elb", - "elasticbeanstalk", - "cloudsearch", - "dynamodb", - "kinesis", - "lambda", - "glacier", - "sqs", - "sns", - "iam", - "sts", - "ses", - "swf", - "storagegateway", - "datapipeline", - "directconnect", - "redshift", - "opsworks", - "rds", - "monitoring", - "cloudtrail", - "cloudfront", - "codedeploy", - "elasticache", - "elasticmapreduce", - "elastictranscoder", - "emr", - "cloudwatch", - "mobileanalytics", - "cognitoidentity", - "cognitosync", - "cognito", - "containerservice", - "ecs", - "appstream", - "keymanagementservice", - "kms", - "config", - "cloudhsm", - "route53", - "route53domains", - "logs" - ], - "license": "MIT", - "main": "aws4.js", - "name": "aws4", - "repository": { - "type": "git", - "url": "git+https://github.com/mhart/aws4.git" - }, - "scripts": { - "test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list" - }, - "version": "1.8.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/CONTRIBUTING.md deleted file mode 100644 index 401d34ed5..000000000 --- a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/LICENSE b/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/LICENSE deleted file mode 100644 index fc58d2ab1..000000000 --- a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/LICENSE +++ /dev/null @@ -1,66 +0,0 @@ -The Blowfish portions are under the following license: - -Blowfish block cipher for OpenBSD -Copyright 1997 Niels Provos -All rights reserved. - -Implementation advice by David Mazieres . - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The bcrypt_pbkdf portions are under the following license: - -Copyright (c) 2013 Ted Unangst - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - -Performance improvements (Javascript-specific): - -Copyright 2016, Joyent Inc -Author: Alex Wilson - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/README.md b/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/README.md deleted file mode 100644 index 7551f335c..000000000 --- a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/README.md +++ /dev/null @@ -1,45 +0,0 @@ -Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified -version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), -with some minor performance improvements. The code is copied verbatim (and -un-styled) from Devi's work. - -This product includes software developed by Niels Provos. - -## API - -### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` - -Derive a cryptographic key of arbitrary length from a given password and salt, -using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and -SHA-512. - -See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for -further information. - -Parameters: - - * `pass`, a Uint8Array of length `passlen` - * `passlen`, an integer Number - * `salt`, a Uint8Array of length `saltlen` - * `saltlen`, an integer Number - * `key`, a Uint8Array of length `keylen`, will be filled with output - * `keylen`, an integer Number - * `rounds`, an integer Number, number of rounds of the PBKDF to run - -### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` - -Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as -part of the inner round function in the PBKDF. - -Parameters: - - * `sha2pass`, a Uint8Array of length 64 - * `sha2salt`, a Uint8Array of length 64 - * `out`, a Uint8Array of length 32, will be filled with output - -## License - -This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`. -As a result, it retains the original copyright and license. The two files are -under slightly different (but compatible) licenses, and are here combined in -one file. For each of the full license texts see `LICENSE`. diff --git a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/index.js b/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/index.js deleted file mode 100644 index b1b5ad4b7..000000000 --- a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/index.js +++ /dev/null @@ -1,556 +0,0 @@ -'use strict'; - -var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; - -/* - * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a - * result, it retains the original copyright and license. The two files are - * under slightly different (but compatible) licenses, and are here combined in - * one file. - * - * Credit for the actual porting work goes to: - * Devi Mandiri - */ - -/* - * The Blowfish portions are under the following license: - * - * Blowfish block cipher for OpenBSD - * Copyright 1997 Niels Provos - * All rights reserved. - * - * Implementation advice by David Mazieres . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * The bcrypt_pbkdf portions are under the following license: - * - * Copyright (c) 2013 Ted Unangst - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Performance improvements (Javascript-specific): - * - * Copyright 2016, Joyent Inc - * Author: Alex Wilson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Ported from OpenBSD bcrypt_pbkdf.c v1.9 - -var BLF_J = 0; - -var Blowfish = function() { - this.S = [ - new Uint32Array([ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), - new Uint32Array([ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), - new Uint32Array([ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), - new Uint32Array([ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) - ]; - this.P = new Uint32Array([ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, - 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, - 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, - 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, - 0x9216d5d9, 0x8979fb1b]); -}; - -function F(S, x8, i) { - return (((S[0][x8[i+3]] + - S[1][x8[i+2]]) ^ - S[2][x8[i+1]]) + - S[3][x8[i]]); -}; - -Blowfish.prototype.encipher = function(x, x8) { - if (x8 === undefined) { - x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - } - x[0] ^= this.P[0]; - for (var i = 1; i < 16; i += 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[17]; - x[1] = t; -}; - -Blowfish.prototype.decipher = function(x) { - var x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - x[0] ^= this.P[17]; - for (var i = 16; i > 0; i -= 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[0]; - x[1] = t; -}; - -function stream2word(data, databytes){ - var i, temp = 0; - for (i = 0; i < 4; i++, BLF_J++) { - if (BLF_J >= databytes) BLF_J = 0; - temp = (temp << 8) | data[BLF_J]; - } - return temp; -}; - -Blowfish.prototype.expand0state = function(key, keybytes) { - var d = new Uint32Array(2), i, k; - var d8 = new Uint8Array(d.buffer); - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - BLF_J = 0; - - for (i = 0; i < 18; i += 2) { - this.encipher(d, d8); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - this.encipher(d, d8); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } -}; - -Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { - var d = new Uint32Array(2), i, k; - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - - for (i = 0, BLF_J = 0; i < 18; i += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } - BLF_J = 0; -}; - -Blowfish.prototype.enc = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.encipher(data.subarray(i*2)); - } -}; - -Blowfish.prototype.dec = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.decipher(data.subarray(i*2)); - } -}; - -var BCRYPT_BLOCKS = 8, - BCRYPT_HASHSIZE = 32; - -function bcrypt_hash(sha2pass, sha2salt, out) { - var state = new Blowfish(), - cdata = new Uint32Array(BCRYPT_BLOCKS), i, - ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, - 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, - 105,116,101]); //"OxychromaticBlowfishSwatDynamite" - - state.expandstate(sha2salt, 64, sha2pass, 64); - for (i = 0; i < 64; i++) { - state.expand0state(sha2salt, 64); - state.expand0state(sha2pass, 64); - } - - for (i = 0; i < BCRYPT_BLOCKS; i++) - cdata[i] = stream2word(ciphertext, ciphertext.byteLength); - for (i = 0; i < 64; i++) - state.enc(cdata, cdata.byteLength / 8); - - for (i = 0; i < BCRYPT_BLOCKS; i++) { - out[4*i+3] = cdata[i] >>> 24; - out[4*i+2] = cdata[i] >>> 16; - out[4*i+1] = cdata[i] >>> 8; - out[4*i+0] = cdata[i]; - } -}; - -function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { - var sha2pass = new Uint8Array(64), - sha2salt = new Uint8Array(64), - out = new Uint8Array(BCRYPT_HASHSIZE), - tmpout = new Uint8Array(BCRYPT_HASHSIZE), - countsalt = new Uint8Array(saltlen+4), - i, j, amt, stride, dest, count, - origkeylen = keylen; - - if (rounds < 1) - return -1; - if (passlen === 0 || saltlen === 0 || keylen === 0 || - keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) - return -1; - - stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); - amt = Math.floor((keylen + stride - 1) / stride); - - for (i = 0; i < saltlen; i++) - countsalt[i] = salt[i]; - - crypto_hash_sha512(sha2pass, pass, passlen); - - for (count = 1; keylen > 0; count++) { - countsalt[saltlen+0] = count >>> 24; - countsalt[saltlen+1] = count >>> 16; - countsalt[saltlen+2] = count >>> 8; - countsalt[saltlen+3] = count; - - crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (i = out.byteLength; i--;) - out[i] = tmpout[i]; - - for (i = 1; i < rounds; i++) { - crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (j = 0; j < out.byteLength; j++) - out[j] ^= tmpout[j]; - } - - amt = Math.min(amt, keylen); - for (i = 0; i < amt; i++) { - dest = i * stride + (count - 1); - if (dest >= origkeylen) - break; - key[dest] = out[i]; - } - keylen -= i; - } - - return 0; -}; - -module.exports = { - BLOCKS: BCRYPT_BLOCKS, - HASHSIZE: BCRYPT_HASHSIZE, - hash: bcrypt_hash, - pbkdf: bcrypt_pbkdf -}; diff --git a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/package.json b/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/package.json deleted file mode 100644 index 20797e06f..000000000 --- a/Languages/APIs/movie-rating/node_modules/bcrypt-pbkdf/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "_from": "bcrypt-pbkdf@^1.0.0", - "_id": "bcrypt-pbkdf@1.0.2", - "_inBundle": false, - "_integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "_location": "/bcrypt-pbkdf", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "bcrypt-pbkdf@^1.0.0", - "name": "bcrypt-pbkdf", - "escapedName": "bcrypt-pbkdf", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/sshpk" - ], - "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "_shasum": "a4301d389b6a43f9b67ff3ca11a3f6637e360e9e", - "_spec": "bcrypt-pbkdf@^1.0.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/sshpk", - "bugs": { - "url": "https://github.com/joyent/node-bcrypt-pbkdf/issues" - }, - "bundleDependencies": false, - "dependencies": { - "tweetnacl": "^0.14.3" - }, - "deprecated": false, - "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", - "devDependencies": {}, - "homepage": "https://github.com/joyent/node-bcrypt-pbkdf#readme", - "license": "BSD-3-Clause", - "main": "index.js", - "name": "bcrypt-pbkdf", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-bcrypt-pbkdf.git" - }, - "version": "1.0.2" -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/HISTORY.md b/Languages/APIs/movie-rating/node_modules/body-parser/HISTORY.md deleted file mode 100644 index a1d3fbfbb..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/HISTORY.md +++ /dev/null @@ -1,609 +0,0 @@ -1.19.0 / 2019-04-25 -=================== - - * deps: bytes@3.1.0 - - Add petabyte (`pb`) support - * deps: http-errors@1.7.2 - - Set constructor name when possible - - deps: setprototypeof@1.1.1 - - deps: statuses@'>= 1.5.0 < 2' - * deps: iconv-lite@0.4.24 - - Added encoding MIK - * deps: qs@6.7.0 - - Fix parsing array brackets after index - * deps: raw-body@2.4.0 - - deps: bytes@3.1.0 - - deps: http-errors@1.7.2 - - deps: iconv-lite@0.4.24 - * deps: type-is@~1.6.17 - - deps: mime-types@~2.1.24 - - perf: prevent internal `throw` on invalid type - -1.18.3 / 2018-05-14 -=================== - - * Fix stack trace for strict json parse error - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: http-errors@~1.6.3 - - deps: depd@~1.1.2 - - deps: setprototypeof@1.1.0 - - deps: statuses@'>= 1.3.1 < 2' - * deps: iconv-lite@0.4.23 - - Fix loading encoding with year appended - - Fix deprecation warnings on Node.js 10+ - * deps: qs@6.5.2 - * deps: raw-body@2.3.3 - - deps: http-errors@1.6.3 - - deps: iconv-lite@0.4.23 - * deps: type-is@~1.6.16 - - deps: mime-types@~2.1.18 - -1.18.2 / 2017-09-22 -=================== - - * deps: debug@2.6.9 - * perf: remove argument reassignment - -1.18.1 / 2017-09-12 -=================== - - * deps: content-type@~1.0.4 - - perf: remove argument reassignment - - perf: skip parameter parsing when no parameters - * deps: iconv-lite@0.4.19 - - Fix ISO-8859-1 regression - - Update Windows-1255 - * deps: qs@6.5.1 - - Fix parsing & compacting very deep objects - * deps: raw-body@2.3.2 - - deps: iconv-lite@0.4.19 - -1.18.0 / 2017-09-08 -=================== - - * Fix JSON strict violation error to match native parse error - * Include the `body` property on verify errors - * Include the `type` property on all generated errors - * Use `http-errors` to set status code on errors - * deps: bytes@3.0.0 - * deps: debug@2.6.8 - * deps: depd@~1.1.1 - - Remove unnecessary `Buffer` loading - * deps: http-errors@~1.6.2 - - deps: depd@1.1.1 - * deps: iconv-lite@0.4.18 - - Add support for React Native - - Add a warning if not loaded as utf-8 - - Fix CESU-8 decoding in Node.js 8 - - Improve speed of ISO-8859-1 encoding - * deps: qs@6.5.0 - * deps: raw-body@2.3.1 - - Use `http-errors` for standard emitted errors - - deps: bytes@3.0.0 - - deps: iconv-lite@0.4.18 - - perf: skip buffer decoding on overage chunk - * perf: prevent internal `throw` when missing charset - -1.17.2 / 2017-05-17 -=================== - - * deps: debug@2.6.7 - - Fix `DEBUG_MAX_ARRAY_LENGTH` - - deps: ms@2.0.0 - * deps: type-is@~1.6.15 - - deps: mime-types@~2.1.15 - -1.17.1 / 2017-03-06 -=================== - - * deps: qs@6.4.0 - - Fix regression parsing keys starting with `[` - -1.17.0 / 2017-03-01 -=================== - - * deps: http-errors@~1.6.1 - - Make `message` property enumerable for `HttpError`s - - deps: setprototypeof@1.0.3 - * deps: qs@6.3.1 - - Fix compacting nested arrays - -1.16.1 / 2017-02-10 -=================== - - * deps: debug@2.6.1 - - Fix deprecation messages in WebStorm and other editors - - Undeprecate `DEBUG_FD` set to `1` or `2` - -1.16.0 / 2017-01-17 -=================== - - * deps: debug@2.6.0 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - * deps: http-errors@~1.5.1 - - deps: inherits@2.0.3 - - deps: setprototypeof@1.0.2 - - deps: statuses@'>= 1.3.1 < 2' - * deps: iconv-lite@0.4.15 - - Added encoding MS-31J - - Added encoding MS-932 - - Added encoding MS-936 - - Added encoding MS-949 - - Added encoding MS-950 - - Fix GBK/GB18030 handling of Euro character - * deps: qs@6.2.1 - - Fix array parsing from skipping empty values - * deps: raw-body@~2.2.0 - - deps: iconv-lite@0.4.15 - * deps: type-is@~1.6.14 - - deps: mime-types@~2.1.13 - -1.15.2 / 2016-06-19 -=================== - - * deps: bytes@2.4.0 - * deps: content-type@~1.0.2 - - perf: enable strict mode - * deps: http-errors@~1.5.0 - - Use `setprototypeof` module to replace `__proto__` setting - - deps: statuses@'>= 1.3.0 < 2' - - perf: enable strict mode - * deps: qs@6.2.0 - * deps: raw-body@~2.1.7 - - deps: bytes@2.4.0 - - perf: remove double-cleanup on happy path - * deps: type-is@~1.6.13 - - deps: mime-types@~2.1.11 - -1.15.1 / 2016-05-05 -=================== - - * deps: bytes@2.3.0 - - Drop partial bytes on all parsed units - - Fix parsing byte string that looks like hex - * deps: raw-body@~2.1.6 - - deps: bytes@2.3.0 - * deps: type-is@~1.6.12 - - deps: mime-types@~2.1.10 - -1.15.0 / 2016-02-10 -=================== - - * deps: http-errors@~1.4.0 - - Add `HttpError` export, for `err instanceof createError.HttpError` - - deps: inherits@2.0.1 - - deps: statuses@'>= 1.2.1 < 2' - * deps: qs@6.1.0 - * deps: type-is@~1.6.11 - - deps: mime-types@~2.1.9 - -1.14.2 / 2015-12-16 -=================== - - * deps: bytes@2.2.0 - * deps: iconv-lite@0.4.13 - * deps: qs@5.2.0 - * deps: raw-body@~2.1.5 - - deps: bytes@2.2.0 - - deps: iconv-lite@0.4.13 - * deps: type-is@~1.6.10 - - deps: mime-types@~2.1.8 - -1.14.1 / 2015-09-27 -=================== - - * Fix issue where invalid charset results in 400 when `verify` used - * deps: iconv-lite@0.4.12 - - Fix CESU-8 decoding in Node.js 4.x - * deps: raw-body@~2.1.4 - - Fix masking critical errors from `iconv-lite` - - deps: iconv-lite@0.4.12 - * deps: type-is@~1.6.9 - - deps: mime-types@~2.1.7 - -1.14.0 / 2015-09-16 -=================== - - * Fix JSON strict parse error to match syntax errors - * Provide static `require` analysis in `urlencoded` parser - * deps: depd@~1.1.0 - - Support web browser loading - * deps: qs@5.1.0 - * deps: raw-body@~2.1.3 - - Fix sync callback when attaching data listener causes sync read - * deps: type-is@~1.6.8 - - Fix type error when given invalid type to match against - - deps: mime-types@~2.1.6 - -1.13.3 / 2015-07-31 -=================== - - * deps: type-is@~1.6.6 - - deps: mime-types@~2.1.4 - -1.13.2 / 2015-07-05 -=================== - - * deps: iconv-lite@0.4.11 - * deps: qs@4.0.0 - - Fix dropping parameters like `hasOwnProperty` - - Fix user-visible incompatibilities from 3.1.0 - - Fix various parsing edge cases - * deps: raw-body@~2.1.2 - - Fix error stack traces to skip `makeError` - - deps: iconv-lite@0.4.11 - * deps: type-is@~1.6.4 - - deps: mime-types@~2.1.2 - - perf: enable strict mode - - perf: remove argument reassignment - -1.13.1 / 2015-06-16 -=================== - - * deps: qs@2.4.2 - - Downgraded from 3.1.0 because of user-visible incompatibilities - -1.13.0 / 2015-06-14 -=================== - - * Add `statusCode` property on `Error`s, in addition to `status` - * Change `type` default to `application/json` for JSON parser - * Change `type` default to `application/x-www-form-urlencoded` for urlencoded parser - * Provide static `require` analysis - * Use the `http-errors` module to generate errors - * deps: bytes@2.1.0 - - Slight optimizations - * deps: iconv-lite@0.4.10 - - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails - - Leading BOM is now removed when decoding - * deps: on-finished@~2.3.0 - - Add defined behavior for HTTP `CONNECT` requests - - Add defined behavior for HTTP `Upgrade` requests - - deps: ee-first@1.1.1 - * deps: qs@3.1.0 - - Fix dropping parameters like `hasOwnProperty` - - Fix various parsing edge cases - - Parsed object now has `null` prototype - * deps: raw-body@~2.1.1 - - Use `unpipe` module for unpiping requests - - deps: iconv-lite@0.4.10 - * deps: type-is@~1.6.3 - - deps: mime-types@~2.1.1 - - perf: reduce try block size - - perf: remove bitwise operations - * perf: enable strict mode - * perf: remove argument reassignment - * perf: remove delete call - -1.12.4 / 2015-05-10 -=================== - - * deps: debug@~2.2.0 - * deps: qs@2.4.2 - - Fix allowing parameters like `constructor` - * deps: on-finished@~2.2.1 - * deps: raw-body@~2.0.1 - - Fix a false-positive when unpiping in Node.js 0.8 - - deps: bytes@2.0.1 - * deps: type-is@~1.6.2 - - deps: mime-types@~2.0.11 - -1.12.3 / 2015-04-15 -=================== - - * Slight efficiency improvement when not debugging - * deps: depd@~1.0.1 - * deps: iconv-lite@0.4.8 - - Add encoding alias UNICODE-1-1-UTF-7 - * deps: raw-body@1.3.4 - - Fix hanging callback if request aborts during read - - deps: iconv-lite@0.4.8 - -1.12.2 / 2015-03-16 -=================== - - * deps: qs@2.4.1 - - Fix error when parameter `hasOwnProperty` is present - -1.12.1 / 2015-03-15 -=================== - - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - * deps: type-is@~1.6.1 - - deps: mime-types@~2.0.10 - -1.12.0 / 2015-02-13 -=================== - - * add `debug` messages - * accept a function for the `type` option - * use `content-type` to parse `Content-Type` headers - * deps: iconv-lite@0.4.7 - - Gracefully support enumerables on `Object.prototype` - * deps: raw-body@1.3.3 - - deps: iconv-lite@0.4.7 - * deps: type-is@~1.6.0 - - fix argument reassignment - - fix false-positives in `hasBody` `Transfer-Encoding` check - - support wildcard for both type and subtype (`*/*`) - - deps: mime-types@~2.0.9 - -1.11.0 / 2015-01-30 -=================== - - * make internal `extended: true` depth limit infinity - * deps: type-is@~1.5.6 - - deps: mime-types@~2.0.8 - -1.10.2 / 2015-01-20 -=================== - - * deps: iconv-lite@0.4.6 - - Fix rare aliases of single-byte encodings - * deps: raw-body@1.3.2 - - deps: iconv-lite@0.4.6 - -1.10.1 / 2015-01-01 -=================== - - * deps: on-finished@~2.2.0 - * deps: type-is@~1.5.5 - - deps: mime-types@~2.0.7 - -1.10.0 / 2014-12-02 -=================== - - * make internal `extended: true` array limit dynamic - -1.9.3 / 2014-11-21 -================== - - * deps: iconv-lite@0.4.5 - - Fix Windows-31J and X-SJIS encoding support - * deps: qs@2.3.3 - - Fix `arrayLimit` behavior - * deps: raw-body@1.3.1 - - deps: iconv-lite@0.4.5 - * deps: type-is@~1.5.3 - - deps: mime-types@~2.0.3 - -1.9.2 / 2014-10-27 -================== - - * deps: qs@2.3.2 - - Fix parsing of mixed objects and values - -1.9.1 / 2014-10-22 -================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - * deps: qs@2.3.0 - - Fix parsing of mixed implicit and explicit arrays - * deps: type-is@~1.5.2 - - deps: mime-types@~2.0.2 - -1.9.0 / 2014-09-24 -================== - - * include the charset in "unsupported charset" error message - * include the encoding in "unsupported content encoding" error message - * deps: depd@~1.0.0 - -1.8.4 / 2014-09-23 -================== - - * fix content encoding to be case-insensitive - -1.8.3 / 2014-09-19 -================== - - * deps: qs@2.2.4 - - Fix issue with object keys starting with numbers truncated - -1.8.2 / 2014-09-15 -================== - - * deps: depd@0.4.5 - -1.8.1 / 2014-09-07 -================== - - * deps: media-typer@0.3.0 - * deps: type-is@~1.5.1 - -1.8.0 / 2014-09-05 -================== - - * make empty-body-handling consistent between chunked requests - - empty `json` produces `{}` - - empty `raw` produces `new Buffer(0)` - - empty `text` produces `''` - - empty `urlencoded` produces `{}` - * deps: qs@2.2.3 - - Fix issue where first empty value in array is discarded - * deps: type-is@~1.5.0 - - fix `hasbody` to be true for `content-length: 0` - -1.7.0 / 2014-09-01 -================== - - * add `parameterLimit` option to `urlencoded` parser - * change `urlencoded` extended array limit to 100 - * respond with 413 when over `parameterLimit` in `urlencoded` - -1.6.7 / 2014-08-29 -================== - - * deps: qs@2.2.2 - - Remove unnecessary cloning - -1.6.6 / 2014-08-27 -================== - - * deps: qs@2.2.0 - - Array parsing fix - - Performance improvements - -1.6.5 / 2014-08-16 -================== - - * deps: on-finished@2.1.0 - -1.6.4 / 2014-08-14 -================== - - * deps: qs@1.2.2 - -1.6.3 / 2014-08-10 -================== - - * deps: qs@1.2.1 - -1.6.2 / 2014-08-07 -================== - - * deps: qs@1.2.0 - - Fix parsing array of objects - -1.6.1 / 2014-08-06 -================== - - * deps: qs@1.1.0 - - Accept urlencoded square brackets - - Accept empty values in implicit array notation - -1.6.0 / 2014-08-05 -================== - - * deps: qs@1.0.2 - - Complete rewrite - - Limits array length to 20 - - Limits object depth to 5 - - Limits parameters to 1,000 - -1.5.2 / 2014-07-27 -================== - - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - -1.5.1 / 2014-07-26 -================== - - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - -1.5.0 / 2014-07-20 -================== - - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - * deps: iconv-lite@0.4.4 - - Added encoding UTF-7 - * deps: raw-body@1.3.0 - - deps: iconv-lite@0.4.4 - - Added encoding UTF-7 - - Fix `Cannot switch to old mode now` error on Node.js 0.10+ - * deps: type-is@~1.3.2 - -1.4.3 / 2014-06-19 -================== - - * deps: type-is@1.3.1 - - fix global variable leak - -1.4.2 / 2014-06-19 -================== - - * deps: type-is@1.3.0 - - improve type parsing - -1.4.1 / 2014-06-19 -================== - - * fix urlencoded extended deprecation message - -1.4.0 / 2014-06-19 -================== - - * add `text` parser - * add `raw` parser - * check accepted charset in content-type (accepts utf-8) - * check accepted encoding in content-encoding (accepts identity) - * deprecate `bodyParser()` middleware; use `.json()` and `.urlencoded()` as needed - * deprecate `urlencoded()` without provided `extended` option - * lazy-load urlencoded parsers - * parsers split into files for reduced mem usage - * support gzip and deflate bodies - - set `inflate: false` to turn off - * deps: raw-body@1.2.2 - - Support all encodings from `iconv-lite` - -1.3.1 / 2014-06-11 -================== - - * deps: type-is@1.2.1 - - Switch dependency from mime to mime-types@1.0.0 - -1.3.0 / 2014-05-31 -================== - - * add `extended` option to urlencoded parser - -1.2.2 / 2014-05-27 -================== - - * deps: raw-body@1.1.6 - - assert stream encoding on node.js 0.8 - - assert stream encoding on node.js < 0.10.6 - - deps: bytes@1 - -1.2.1 / 2014-05-26 -================== - - * invoke `next(err)` after request fully read - - prevents hung responses and socket hang ups - -1.2.0 / 2014-05-11 -================== - - * add `verify` option - * deps: type-is@1.2.0 - - support suffix matching - -1.1.2 / 2014-05-11 -================== - - * improve json parser speed - -1.1.1 / 2014-05-11 -================== - - * fix repeated limit parsing with every request - -1.1.0 / 2014-05-10 -================== - - * add `type` option - * deps: pin for safety and consistency - -1.0.2 / 2014-04-14 -================== - - * use `type-is` module - -1.0.1 / 2014-03-20 -================== - - * lower default limits to 100kb diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/LICENSE b/Languages/APIs/movie-rating/node_modules/body-parser/LICENSE deleted file mode 100644 index 386b7b694..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/README.md b/Languages/APIs/movie-rating/node_modules/body-parser/README.md deleted file mode 100644 index aba6297a8..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/README.md +++ /dev/null @@ -1,443 +0,0 @@ -# body-parser - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Node.js body parsing middleware. - -Parse incoming request bodies in a middleware before your handlers, available -under the `req.body` property. - -**Note** As `req.body`'s shape is based on user-controlled input, all -properties and values in this object are untrusted and should be validated -before trusting. For example, `req.body.foo.toString()` may fail in multiple -ways, for example the `foo` property may not be there or may not be a string, -and `toString` may not be a function and instead a string or other user input. - -[Learn about the anatomy of an HTTP transaction in Node.js](https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/). - -_This does not handle multipart bodies_, due to their complex and typically -large nature. For multipart bodies, you may be interested in the following -modules: - - * [busboy](https://www.npmjs.org/package/busboy#readme) and - [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme) - * [multiparty](https://www.npmjs.org/package/multiparty#readme) and - [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme) - * [formidable](https://www.npmjs.org/package/formidable#readme) - * [multer](https://www.npmjs.org/package/multer#readme) - -This module provides the following parsers: - - * [JSON body parser](#bodyparserjsonoptions) - * [Raw body parser](#bodyparserrawoptions) - * [Text body parser](#bodyparsertextoptions) - * [URL-encoded form body parser](#bodyparserurlencodedoptions) - -Other body parsers you might be interested in: - -- [body](https://www.npmjs.org/package/body#readme) -- [co-body](https://www.npmjs.org/package/co-body#readme) - -## Installation - -```sh -$ npm install body-parser -``` - -## API - - - -```js -var bodyParser = require('body-parser') -``` - -The `bodyParser` object exposes various factories to create middlewares. All -middlewares will populate the `req.body` property with the parsed body when -the `Content-Type` request header matches the `type` option, or an empty -object (`{}`) if there was no body to parse, the `Content-Type` was not matched, -or an error occurred. - -The various errors returned by this module are described in the -[errors section](#errors). - -### bodyParser.json([options]) - -Returns middleware that only parses `json` and only looks at requests where -the `Content-Type` header matches the `type` option. This parser accepts any -Unicode encoding of the body and supports automatic inflation of `gzip` and -`deflate` encodings. - -A new `body` object containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). - -#### Options - -The `json` function takes an optional `options` object that may contain any of -the following keys: - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### reviver - -The `reviver` option is passed directly to `JSON.parse` as the second -argument. You can find more information on this argument -[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter). - -##### strict - -When set to `true`, will only accept arrays and objects; when `false` will -accept anything `JSON.parse` accepts. Defaults to `true`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. If not a -function, `type` option is passed directly to the -[type-is](https://www.npmjs.org/package/type-is#readme) library and this can -be an extension name (like `json`), a mime type (like `application/json`), or -a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type` -option is called as `fn(req)` and the request is parsed if it returns a truthy -value. Defaults to `application/json`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -### bodyParser.raw([options]) - -Returns middleware that parses all bodies as a `Buffer` and only looks at -requests where the `Content-Type` header matches the `type` option. This -parser supports automatic inflation of `gzip` and `deflate` encodings. - -A new `body` object containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). This will be a `Buffer` object -of the body. - -#### Options - -The `raw` function takes an optional `options` object that may contain any of -the following keys: - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. -If not a function, `type` option is passed directly to the -[type-is](https://www.npmjs.org/package/type-is#readme) library and this -can be an extension name (like `bin`), a mime type (like -`application/octet-stream`), or a mime type with a wildcard (like `*/*` or -`application/*`). If a function, the `type` option is called as `fn(req)` -and the request is parsed if it returns a truthy value. Defaults to -`application/octet-stream`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -### bodyParser.text([options]) - -Returns middleware that parses all bodies as a string and only looks at -requests where the `Content-Type` header matches the `type` option. This -parser supports automatic inflation of `gzip` and `deflate` encodings. - -A new `body` string containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). This will be a string of the -body. - -#### Options - -The `text` function takes an optional `options` object that may contain any of -the following keys: - -##### defaultCharset - -Specify the default character set for the text content if the charset is not -specified in the `Content-Type` header of the request. Defaults to `utf-8`. - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. If not -a function, `type` option is passed directly to the -[type-is](https://www.npmjs.org/package/type-is#readme) library and this can -be an extension name (like `txt`), a mime type (like `text/plain`), or a mime -type with a wildcard (like `*/*` or `text/*`). If a function, the `type` -option is called as `fn(req)` and the request is parsed if it returns a -truthy value. Defaults to `text/plain`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -### bodyParser.urlencoded([options]) - -Returns middleware that only parses `urlencoded` bodies and only looks at -requests where the `Content-Type` header matches the `type` option. This -parser accepts only UTF-8 encoding of the body and supports automatic -inflation of `gzip` and `deflate` encodings. - -A new `body` object containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). This object will contain -key-value pairs, where the value can be a string or array (when `extended` is -`false`), or any type (when `extended` is `true`). - -#### Options - -The `urlencoded` function takes an optional `options` object that may contain -any of the following keys: - -##### extended - -The `extended` option allows to choose between parsing the URL-encoded data -with the `querystring` library (when `false`) or the `qs` library (when -`true`). The "extended" syntax allows for rich objects and arrays to be -encoded into the URL-encoded format, allowing for a JSON-like experience -with URL-encoded. For more information, please -[see the qs library](https://www.npmjs.org/package/qs#readme). - -Defaults to `true`, but using the default has been deprecated. Please -research into the difference between `qs` and `querystring` and choose the -appropriate setting. - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### parameterLimit - -The `parameterLimit` option controls the maximum number of parameters that -are allowed in the URL-encoded data. If a request contains more parameters -than this value, a 413 will be returned to the client. Defaults to `1000`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. If not -a function, `type` option is passed directly to the -[type-is](https://www.npmjs.org/package/type-is#readme) library and this can -be an extension name (like `urlencoded`), a mime type (like -`application/x-www-form-urlencoded`), or a mime type with a wildcard (like -`*/x-www-form-urlencoded`). If a function, the `type` option is called as -`fn(req)` and the request is parsed if it returns a truthy value. Defaults -to `application/x-www-form-urlencoded`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -## Errors - -The middlewares provided by this module create errors depending on the error -condition during parsing. The errors will typically have a `status`/`statusCode` -property that contains the suggested HTTP response code, an `expose` property -to determine if the `message` property should be displayed to the client, a -`type` property to determine the type of error without matching against the -`message`, and a `body` property containing the read body, if available. - -The following are the common errors emitted, though any error can come through -for various reasons. - -### content encoding unsupported - -This error will occur when the request had a `Content-Encoding` header that -contained an encoding but the "inflation" option was set to `false`. The -`status` property is set to `415`, the `type` property is set to -`'encoding.unsupported'`, and the `charset` property will be set to the -encoding that is unsupported. - -### request aborted - -This error will occur when the request is aborted by the client before reading -the body has finished. The `received` property will be set to the number of -bytes received before the request was aborted and the `expected` property is -set to the number of expected bytes. The `status` property is set to `400` -and `type` property is set to `'request.aborted'`. - -### request entity too large - -This error will occur when the request body's size is larger than the "limit" -option. The `limit` property will be set to the byte limit and the `length` -property will be set to the request body's length. The `status` property is -set to `413` and the `type` property is set to `'entity.too.large'`. - -### request size did not match content length - -This error will occur when the request's length did not match the length from -the `Content-Length` header. This typically occurs when the request is malformed, -typically when the `Content-Length` header was calculated based on characters -instead of bytes. The `status` property is set to `400` and the `type` property -is set to `'request.size.invalid'`. - -### stream encoding should not be set - -This error will occur when something called the `req.setEncoding` method prior -to this middleware. This module operates directly on bytes only and you cannot -call `req.setEncoding` when using this module. The `status` property is set to -`500` and the `type` property is set to `'stream.encoding.set'`. - -### too many parameters - -This error will occur when the content of the request exceeds the configured -`parameterLimit` for the `urlencoded` parser. The `status` property is set to -`413` and the `type` property is set to `'parameters.too.many'`. - -### unsupported charset "BOGUS" - -This error will occur when the request had a charset parameter in the -`Content-Type` header, but the `iconv-lite` module does not support it OR the -parser does not support it. The charset is contained in the message as well -as in the `charset` property. The `status` property is set to `415`, the -`type` property is set to `'charset.unsupported'`, and the `charset` property -is set to the charset that is unsupported. - -### unsupported content encoding "bogus" - -This error will occur when the request had a `Content-Encoding` header that -contained an unsupported encoding. The encoding is contained in the message -as well as in the `encoding` property. The `status` property is set to `415`, -the `type` property is set to `'encoding.unsupported'`, and the `encoding` -property is set to the encoding that is unsupported. - -## Examples - -### Express/Connect top-level generic - -This example demonstrates adding a generic JSON and URL-encoded parser as a -top-level middleware, which will parse the bodies of all incoming requests. -This is the simplest setup. - -```js -var express = require('express') -var bodyParser = require('body-parser') - -var app = express() - -// parse application/x-www-form-urlencoded -app.use(bodyParser.urlencoded({ extended: false })) - -// parse application/json -app.use(bodyParser.json()) - -app.use(function (req, res) { - res.setHeader('Content-Type', 'text/plain') - res.write('you posted:\n') - res.end(JSON.stringify(req.body, null, 2)) -}) -``` - -### Express route-specific - -This example demonstrates adding body parsers specifically to the routes that -need them. In general, this is the most recommended way to use body-parser with -Express. - -```js -var express = require('express') -var bodyParser = require('body-parser') - -var app = express() - -// create application/json parser -var jsonParser = bodyParser.json() - -// create application/x-www-form-urlencoded parser -var urlencodedParser = bodyParser.urlencoded({ extended: false }) - -// POST /login gets urlencoded bodies -app.post('/login', urlencodedParser, function (req, res) { - res.send('welcome, ' + req.body.username) -}) - -// POST /api/users gets JSON bodies -app.post('/api/users', jsonParser, function (req, res) { - // create user in req.body -}) -``` - -### Change accepted type for parsers - -All the parsers accept a `type` option which allows you to change the -`Content-Type` that the middleware will parse. - -```js -var express = require('express') -var bodyParser = require('body-parser') - -var app = express() - -// parse various different custom JSON types as JSON -app.use(bodyParser.json({ type: 'application/*+json' })) - -// parse some custom thing into a Buffer -app.use(bodyParser.raw({ type: 'application/vnd.custom-type' })) - -// parse an HTML body into a string -app.use(bodyParser.text({ type: 'text/html' })) -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/body-parser.svg -[npm-url]: https://npmjs.org/package/body-parser -[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg -[travis-url]: https://travis-ci.org/expressjs/body-parser -[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg -[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master -[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg -[downloads-url]: https://npmjs.org/package/body-parser diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/index.js b/Languages/APIs/movie-rating/node_modules/body-parser/index.js deleted file mode 100644 index 93c3a1fff..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/index.js +++ /dev/null @@ -1,157 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var deprecate = require('depd')('body-parser') - -/** - * Cache of loaded parsers. - * @private - */ - -var parsers = Object.create(null) - -/** - * @typedef Parsers - * @type {function} - * @property {function} json - * @property {function} raw - * @property {function} text - * @property {function} urlencoded - */ - -/** - * Module exports. - * @type {Parsers} - */ - -exports = module.exports = deprecate.function(bodyParser, - 'bodyParser: use individual json/urlencoded middlewares') - -/** - * JSON parser. - * @public - */ - -Object.defineProperty(exports, 'json', { - configurable: true, - enumerable: true, - get: createParserGetter('json') -}) - -/** - * Raw parser. - * @public - */ - -Object.defineProperty(exports, 'raw', { - configurable: true, - enumerable: true, - get: createParserGetter('raw') -}) - -/** - * Text parser. - * @public - */ - -Object.defineProperty(exports, 'text', { - configurable: true, - enumerable: true, - get: createParserGetter('text') -}) - -/** - * URL-encoded parser. - * @public - */ - -Object.defineProperty(exports, 'urlencoded', { - configurable: true, - enumerable: true, - get: createParserGetter('urlencoded') -}) - -/** - * Create a middleware to parse json and urlencoded bodies. - * - * @param {object} [options] - * @return {function} - * @deprecated - * @public - */ - -function bodyParser (options) { - var opts = {} - - // exclude type option - if (options) { - for (var prop in options) { - if (prop !== 'type') { - opts[prop] = options[prop] - } - } - } - - var _urlencoded = exports.urlencoded(opts) - var _json = exports.json(opts) - - return function bodyParser (req, res, next) { - _json(req, res, function (err) { - if (err) return next(err) - _urlencoded(req, res, next) - }) - } -} - -/** - * Create a getter for loading a parser. - * @private - */ - -function createParserGetter (name) { - return function get () { - return loadParser(name) - } -} - -/** - * Load a parser module. - * @private - */ - -function loadParser (parserName) { - var parser = parsers[parserName] - - if (parser !== undefined) { - return parser - } - - // this uses a switch for static require analysis - switch (parserName) { - case 'json': - parser = require('./lib/types/json') - break - case 'raw': - parser = require('./lib/types/raw') - break - case 'text': - parser = require('./lib/types/text') - break - case 'urlencoded': - parser = require('./lib/types/urlencoded') - break - } - - // store to prevent invoking require() - return (parsers[parserName] = parser) -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/lib/read.js b/Languages/APIs/movie-rating/node_modules/body-parser/lib/read.js deleted file mode 100644 index c10260958..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/lib/read.js +++ /dev/null @@ -1,181 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var createError = require('http-errors') -var getBody = require('raw-body') -var iconv = require('iconv-lite') -var onFinished = require('on-finished') -var zlib = require('zlib') - -/** - * Module exports. - */ - -module.exports = read - -/** - * Read a request into a buffer and parse. - * - * @param {object} req - * @param {object} res - * @param {function} next - * @param {function} parse - * @param {function} debug - * @param {object} options - * @private - */ - -function read (req, res, next, parse, debug, options) { - var length - var opts = options - var stream - - // flag as parsed - req._body = true - - // read options - var encoding = opts.encoding !== null - ? opts.encoding - : null - var verify = opts.verify - - try { - // get the content stream - stream = contentstream(req, debug, opts.inflate) - length = stream.length - stream.length = undefined - } catch (err) { - return next(err) - } - - // set raw-body options - opts.length = length - opts.encoding = verify - ? null - : encoding - - // assert charset is supported - if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) { - return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding.toLowerCase(), - type: 'charset.unsupported' - })) - } - - // read body - debug('read body') - getBody(stream, opts, function (error, body) { - if (error) { - var _error - - if (error.type === 'encoding.unsupported') { - // echo back charset - _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding.toLowerCase(), - type: 'charset.unsupported' - }) - } else { - // set status code on error - _error = createError(400, error) - } - - // read off entire request - stream.resume() - onFinished(req, function onfinished () { - next(createError(400, _error)) - }) - return - } - - // verify - if (verify) { - try { - debug('verify body') - verify(req, res, body, encoding) - } catch (err) { - next(createError(403, err, { - body: body, - type: err.type || 'entity.verify.failed' - })) - return - } - } - - // parse - var str = body - try { - debug('parse body') - str = typeof body !== 'string' && encoding !== null - ? iconv.decode(body, encoding) - : body - req.body = parse(str) - } catch (err) { - next(createError(400, err, { - body: str, - type: err.type || 'entity.parse.failed' - })) - return - } - - next() - }) -} - -/** - * Get the content stream of the request. - * - * @param {object} req - * @param {function} debug - * @param {boolean} [inflate=true] - * @return {object} - * @api private - */ - -function contentstream (req, debug, inflate) { - var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase() - var length = req.headers['content-length'] - var stream - - debug('content-encoding "%s"', encoding) - - if (inflate === false && encoding !== 'identity') { - throw createError(415, 'content encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } - - switch (encoding) { - case 'deflate': - stream = zlib.createInflate() - debug('inflate body') - req.pipe(stream) - break - case 'gzip': - stream = zlib.createGunzip() - debug('gunzip body') - req.pipe(stream) - break - case 'identity': - stream = req - stream.length = length - break - default: - throw createError(415, 'unsupported content encoding "' + encoding + '"', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } - - return stream -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/json.js b/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/json.js deleted file mode 100644 index 2971dc14d..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/json.js +++ /dev/null @@ -1,230 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var bytes = require('bytes') -var contentType = require('content-type') -var createError = require('http-errors') -var debug = require('debug')('body-parser:json') -var read = require('../read') -var typeis = require('type-is') - -/** - * Module exports. - */ - -module.exports = json - -/** - * RegExp to match the first non-space in a string. - * - * Allowed whitespace is defined in RFC 7159: - * - * ws = *( - * %x20 / ; Space - * %x09 / ; Horizontal tab - * %x0A / ; Line feed or New line - * %x0D ) ; Carriage return - */ - -var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex - -/** - * Create a middleware to parse JSON bodies. - * - * @param {object} [options] - * @return {function} - * @public - */ - -function json (options) { - var opts = options || {} - - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var inflate = opts.inflate !== false - var reviver = opts.reviver - var strict = opts.strict !== false - var type = opts.type || 'application/json' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (body) { - if (body.length === 0) { - // special-case empty json body, as it's a common client-side mistake - // TODO: maybe make this configurable or part of "strict" option - return {} - } - - if (strict) { - var first = firstchar(body) - - if (first !== '{' && first !== '[') { - debug('strict violation') - throw createStrictSyntaxError(body, first) - } - } - - try { - debug('parse json') - return JSON.parse(body, reviver) - } catch (e) { - throw normalizeJsonSyntaxError(e, { - message: e.message, - stack: e.stack - }) - } - } - - return function jsonParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return - } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return - } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return - } - - // assert charset per RFC 7159 sec 8.1 - var charset = getCharset(req) || 'utf-8' - if (charset.substr(0, 4) !== 'utf-') { - debug('invalid charset') - next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { - charset: charset, - type: 'charset.unsupported' - })) - return - } - - // read - read(req, res, next, parse, debug, { - encoding: charset, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Create strict violation syntax error matching native error. - * - * @param {string} str - * @param {string} char - * @return {Error} - * @private - */ - -function createStrictSyntaxError (str, char) { - var index = str.indexOf(char) - var partial = str.substring(0, index) + '#' - - try { - JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') - } catch (e) { - return normalizeJsonSyntaxError(e, { - message: e.message.replace('#', char), - stack: e.stack - }) - } -} - -/** - * Get the first non-whitespace character in a string. - * - * @param {string} str - * @return {function} - * @private - */ - -function firstchar (str) { - return FIRST_CHAR_REGEXP.exec(str)[1] -} - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - -/** - * Normalize a SyntaxError for JSON.parse. - * - * @param {SyntaxError} error - * @param {object} obj - * @return {SyntaxError} - */ - -function normalizeJsonSyntaxError (error, obj) { - var keys = Object.getOwnPropertyNames(error) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - if (key !== 'stack' && key !== 'message') { - delete error[key] - } - } - - // replace stack before message for Node.js 0.10 and below - error.stack = obj.stack.replace(error.message, obj.message) - error.message = obj.message - - return error -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/raw.js b/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/raw.js deleted file mode 100644 index f5d1b6747..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/raw.js +++ /dev/null @@ -1,101 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - */ - -var bytes = require('bytes') -var debug = require('debug')('body-parser:raw') -var read = require('../read') -var typeis = require('type-is') - -/** - * Module exports. - */ - -module.exports = raw - -/** - * Create a middleware to parse raw bodies. - * - * @param {object} [options] - * @return {function} - * @api public - */ - -function raw (options) { - var opts = options || {} - - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'application/octet-stream' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (buf) { - return buf - } - - return function rawParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return - } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return - } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return - } - - // read - read(req, res, next, parse, debug, { - encoding: null, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/text.js b/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/text.js deleted file mode 100644 index 083a00908..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/text.js +++ /dev/null @@ -1,121 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - */ - -var bytes = require('bytes') -var contentType = require('content-type') -var debug = require('debug')('body-parser:text') -var read = require('../read') -var typeis = require('type-is') - -/** - * Module exports. - */ - -module.exports = text - -/** - * Create a middleware to parse text bodies. - * - * @param {object} [options] - * @return {function} - * @api public - */ - -function text (options) { - var opts = options || {} - - var defaultCharset = opts.defaultCharset || 'utf-8' - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'text/plain' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (buf) { - return buf - } - - return function textParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return - } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return - } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return - } - - // get charset - var charset = getCharset(req) || defaultCharset - - // read - read(req, res, next, parse, debug, { - encoding: charset, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/urlencoded.js b/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/urlencoded.js deleted file mode 100644 index b2ca8f16d..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/lib/types/urlencoded.js +++ /dev/null @@ -1,284 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var bytes = require('bytes') -var contentType = require('content-type') -var createError = require('http-errors') -var debug = require('debug')('body-parser:urlencoded') -var deprecate = require('depd')('body-parser') -var read = require('../read') -var typeis = require('type-is') - -/** - * Module exports. - */ - -module.exports = urlencoded - -/** - * Cache of parser modules. - */ - -var parsers = Object.create(null) - -/** - * Create a middleware to parse urlencoded bodies. - * - * @param {object} [options] - * @return {function} - * @public - */ - -function urlencoded (options) { - var opts = options || {} - - // notice because option default will flip in next major - if (opts.extended === undefined) { - deprecate('undefined extended: provide extended option') - } - - var extended = opts.extended !== false - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'application/x-www-form-urlencoded' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate query parser - var queryparse = extended - ? extendedparser(opts) - : simpleparser(opts) - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (body) { - return body.length - ? queryparse(body) - : {} - } - - return function urlencodedParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return - } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return - } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return - } - - // assert charset - var charset = getCharset(req) || 'utf-8' - if (charset !== 'utf-8') { - debug('invalid charset') - next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { - charset: charset, - type: 'charset.unsupported' - })) - return - } - - // read - read(req, res, next, parse, debug, { - debug: debug, - encoding: charset, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Get the extended query parser. - * - * @param {object} options - */ - -function extendedparser (options) { - var parameterLimit = options.parameterLimit !== undefined - ? options.parameterLimit - : 1000 - var parse = parser('qs') - - if (isNaN(parameterLimit) || parameterLimit < 1) { - throw new TypeError('option parameterLimit must be a positive number') - } - - if (isFinite(parameterLimit)) { - parameterLimit = parameterLimit | 0 - } - - return function queryparse (body) { - var paramCount = parameterCount(body, parameterLimit) - - if (paramCount === undefined) { - debug('too many parameters') - throw createError(413, 'too many parameters', { - type: 'parameters.too.many' - }) - } - - var arrayLimit = Math.max(100, paramCount) - - debug('parse extended urlencoding') - return parse(body, { - allowPrototypes: true, - arrayLimit: arrayLimit, - depth: Infinity, - parameterLimit: parameterLimit - }) - } -} - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - -/** - * Count the number of parameters, stopping once limit reached - * - * @param {string} body - * @param {number} limit - * @api private - */ - -function parameterCount (body, limit) { - var count = 0 - var index = 0 - - while ((index = body.indexOf('&', index)) !== -1) { - count++ - index++ - - if (count === limit) { - return undefined - } - } - - return count -} - -/** - * Get parser for module name dynamically. - * - * @param {string} name - * @return {function} - * @api private - */ - -function parser (name) { - var mod = parsers[name] - - if (mod !== undefined) { - return mod.parse - } - - // this uses a switch for static require analysis - switch (name) { - case 'qs': - mod = require('qs') - break - case 'querystring': - mod = require('querystring') - break - } - - // store to prevent invoking require() - parsers[name] = mod - - return mod.parse -} - -/** - * Get the simple query parser. - * - * @param {object} options - */ - -function simpleparser (options) { - var parameterLimit = options.parameterLimit !== undefined - ? options.parameterLimit - : 1000 - var parse = parser('querystring') - - if (isNaN(parameterLimit) || parameterLimit < 1) { - throw new TypeError('option parameterLimit must be a positive number') - } - - if (isFinite(parameterLimit)) { - parameterLimit = parameterLimit | 0 - } - - return function queryparse (body) { - var paramCount = parameterCount(body, parameterLimit) - - if (paramCount === undefined) { - debug('too many parameters') - throw createError(413, 'too many parameters', { - type: 'parameters.too.many' - }) - } - - debug('parse urlencoding') - return parse(body, undefined, undefined, { maxKeys: parameterLimit }) - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/Languages/APIs/movie-rating/node_modules/body-parser/package.json b/Languages/APIs/movie-rating/node_modules/body-parser/package.json deleted file mode 100644 index 975ee6155..000000000 --- a/Languages/APIs/movie-rating/node_modules/body-parser/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_from": "body-parser@1.19.0", - "_id": "body-parser@1.19.0", - "_inBundle": false, - "_integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "_location": "/body-parser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "body-parser@1.19.0", - "name": "body-parser", - "escapedName": "body-parser", - "rawSpec": "1.19.0", - "saveSpec": null, - "fetchSpec": "1.19.0" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "_shasum": "96b2709e57c9c4e09a6fd66a8fd979844f69f08a", - "_spec": "body-parser@1.19.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "bugs": { - "url": "https://github.com/expressjs/body-parser/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "dependencies": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "deprecated": false, - "description": "Node.js body parsing middleware", - "devDependencies": { - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "istanbul": "0.4.5", - "methods": "1.1.2", - "mocha": "6.1.4", - "safe-buffer": "5.1.2", - "supertest": "4.0.2" - }, - "engines": { - "node": ">= 0.8" - }, - "files": [ - "lib/", - "LICENSE", - "HISTORY.md", - "index.js" - ], - "homepage": "https://github.com/expressjs/body-parser#readme", - "license": "MIT", - "name": "body-parser", - "repository": { - "type": "git", - "url": "git+https://github.com/expressjs/body-parser.git" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/" - }, - "version": "1.19.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/bytes/History.md b/Languages/APIs/movie-rating/node_modules/bytes/History.md deleted file mode 100644 index cf6a5bb9c..000000000 --- a/Languages/APIs/movie-rating/node_modules/bytes/History.md +++ /dev/null @@ -1,87 +0,0 @@ -3.1.0 / 2019-01-22 -================== - - * Add petabyte (`pb`) support - -3.0.0 / 2017-08-31 -================== - - * Change "kB" to "KB" in format output - * Remove support for Node.js 0.6 - * Remove support for ComponentJS - -2.5.0 / 2017-03-24 -================== - - * Add option "unit" - -2.4.0 / 2016-06-01 -================== - - * Add option "unitSeparator" - -2.3.0 / 2016-02-15 -================== - - * Drop partial bytes on all parsed units - * Fix non-finite numbers to `.format` to return `null` - * Fix parsing byte string that looks like hex - * perf: hoist regular expressions - -2.2.0 / 2015-11-13 -================== - - * add option "decimalPlaces" - * add option "fixedDecimals" - -2.1.0 / 2015-05-21 -================== - - * add `.format` export - * add `.parse` export - -2.0.2 / 2015-05-20 -================== - - * remove map recreation - * remove unnecessary object construction - -2.0.1 / 2015-05-07 -================== - - * fix browserify require - * remove node.extend dependency - -2.0.0 / 2015-04-12 -================== - - * add option "case" - * add option "thousandsSeparator" - * return "null" on invalid parse input - * support proper round-trip: bytes(bytes(num)) === num - * units no longer case sensitive when parsing - -1.0.0 / 2014-05-05 -================== - - * add negative support. fixes #6 - -0.3.0 / 2014-03-19 -================== - - * added terabyte support - -0.2.1 / 2013-04-01 -================== - - * add .component - -0.2.0 / 2012-10-28 -================== - - * bytes(200).should.eql('200b') - -0.1.0 / 2012-07-04 -================== - - * add bytes to string conversion [yields] diff --git a/Languages/APIs/movie-rating/node_modules/bytes/LICENSE b/Languages/APIs/movie-rating/node_modules/bytes/LICENSE deleted file mode 100644 index 63e95a963..000000000 --- a/Languages/APIs/movie-rating/node_modules/bytes/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015 Jed Watson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/bytes/Readme.md b/Languages/APIs/movie-rating/node_modules/bytes/Readme.md deleted file mode 100644 index 6ad1ec6e2..000000000 --- a/Languages/APIs/movie-rating/node_modules/bytes/Readme.md +++ /dev/null @@ -1,126 +0,0 @@ -# Bytes utility - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa. - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -$ npm install bytes -``` - -## Usage - -```js -var bytes = require('bytes'); -``` - -#### bytes.format(number value, [options]): string|null - -Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is - rounded. - -**Arguments** - -| Name | Type | Description | -|---------|----------|--------------------| -| value | `number` | Value in bytes | -| options | `Object` | Conversion options | - -**Options** - -| Property | Type | Description | -|-------------------|--------|-----------------------------------------------------------------------------------------| -| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. | -| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` | -| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `.`... Default value to `''`. | -| unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). | -| unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. | - -**Returns** - -| Name | Type | Description | -|---------|------------------|-------------------------------------------------| -| results | `string`|`null` | Return null upon error. String value otherwise. | - -**Example** - -```js -bytes(1024); -// output: '1KB' - -bytes(1000); -// output: '1000B' - -bytes(1000, {thousandsSeparator: ' '}); -// output: '1 000B' - -bytes(1024 * 1.7, {decimalPlaces: 0}); -// output: '2KB' - -bytes(1024, {unitSeparator: ' '}); -// output: '1 KB' - -``` - -#### bytes.parse(string|number value): number|null - -Parse the string value into an integer in bytes. If no unit is given, or `value` -is a number, it is assumed the value is in bytes. - -Supported units and abbreviations are as follows and are case-insensitive: - - * `b` for bytes - * `kb` for kilobytes - * `mb` for megabytes - * `gb` for gigabytes - * `tb` for terabytes - * `pb` for petabytes - -The units are in powers of two, not ten. This means 1kb = 1024b according to this parser. - -**Arguments** - -| Name | Type | Description | -|---------------|--------|--------------------| -| value | `string`|`number` | String to parse, or number in bytes. | - -**Returns** - -| Name | Type | Description | -|---------|-------------|-------------------------| -| results | `number`|`null` | Return null upon error. Value in bytes otherwise. | - -**Example** - -```js -bytes('1KB'); -// output: 1024 - -bytes('1024'); -// output: 1024 - -bytes(1024); -// output: 1KB -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master -[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master -[downloads-image]: https://badgen.net/npm/dm/bytes -[downloads-url]: https://npmjs.org/package/bytes -[npm-image]: https://badgen.net/npm/node/bytes -[npm-url]: https://npmjs.org/package/bytes -[travis-image]: https://badgen.net/travis/visionmedia/bytes.js/master -[travis-url]: https://travis-ci.org/visionmedia/bytes.js diff --git a/Languages/APIs/movie-rating/node_modules/bytes/index.js b/Languages/APIs/movie-rating/node_modules/bytes/index.js deleted file mode 100644 index 4975bfb0c..000000000 --- a/Languages/APIs/movie-rating/node_modules/bytes/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/*! - * bytes - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015 Jed Watson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = bytes; -module.exports.format = format; -module.exports.parse = parse; - -/** - * Module variables. - * @private - */ - -var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; - -var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; - -var map = { - b: 1, - kb: 1 << 10, - mb: 1 << 20, - gb: 1 << 30, - tb: Math.pow(1024, 4), - pb: Math.pow(1024, 5), -}; - -var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; - -/** - * Convert the given value in bytes into a string or parse to string to an integer in bytes. - * - * @param {string|number} value - * @param {{ - * case: [string], - * decimalPlaces: [number] - * fixedDecimals: [boolean] - * thousandsSeparator: [string] - * unitSeparator: [string] - * }} [options] bytes options. - * - * @returns {string|number|null} - */ - -function bytes(value, options) { - if (typeof value === 'string') { - return parse(value); - } - - if (typeof value === 'number') { - return format(value, options); - } - - return null; -} - -/** - * Format the given value in bytes into a string. - * - * If the value is negative, it is kept as such. If it is a float, - * it is rounded. - * - * @param {number} value - * @param {object} [options] - * @param {number} [options.decimalPlaces=2] - * @param {number} [options.fixedDecimals=false] - * @param {string} [options.thousandsSeparator=] - * @param {string} [options.unit=] - * @param {string} [options.unitSeparator=] - * - * @returns {string|null} - * @public - */ - -function format(value, options) { - if (!Number.isFinite(value)) { - return null; - } - - var mag = Math.abs(value); - var thousandsSeparator = (options && options.thousandsSeparator) || ''; - var unitSeparator = (options && options.unitSeparator) || ''; - var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2; - var fixedDecimals = Boolean(options && options.fixedDecimals); - var unit = (options && options.unit) || ''; - - if (!unit || !map[unit.toLowerCase()]) { - if (mag >= map.pb) { - unit = 'PB'; - } else if (mag >= map.tb) { - unit = 'TB'; - } else if (mag >= map.gb) { - unit = 'GB'; - } else if (mag >= map.mb) { - unit = 'MB'; - } else if (mag >= map.kb) { - unit = 'KB'; - } else { - unit = 'B'; - } - } - - var val = value / map[unit.toLowerCase()]; - var str = val.toFixed(decimalPlaces); - - if (!fixedDecimals) { - str = str.replace(formatDecimalsRegExp, '$1'); - } - - if (thousandsSeparator) { - str = str.replace(formatThousandsRegExp, thousandsSeparator); - } - - return str + unitSeparator + unit; -} - -/** - * Parse the string value into an integer in bytes. - * - * If no unit is given, it is assumed the value is in bytes. - * - * @param {number|string} val - * - * @returns {number|null} - * @public - */ - -function parse(val) { - if (typeof val === 'number' && !isNaN(val)) { - return val; - } - - if (typeof val !== 'string') { - return null; - } - - // Test if the string passed is valid - var results = parseRegExp.exec(val); - var floatValue; - var unit = 'b'; - - if (!results) { - // Nothing could be extracted from the given string - floatValue = parseInt(val, 10); - unit = 'b' - } else { - // Retrieve the value and the unit - floatValue = parseFloat(results[1]); - unit = results[4].toLowerCase(); - } - - return Math.floor(map[unit] * floatValue); -} diff --git a/Languages/APIs/movie-rating/node_modules/bytes/package.json b/Languages/APIs/movie-rating/node_modules/bytes/package.json deleted file mode 100644 index 301d0f25e..000000000 --- a/Languages/APIs/movie-rating/node_modules/bytes/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "bytes@3.1.0", - "_id": "bytes@3.1.0", - "_inBundle": false, - "_integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "_location": "/bytes", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "bytes@3.1.0", - "name": "bytes", - "escapedName": "bytes", - "rawSpec": "3.1.0", - "saveSpec": null, - "fetchSpec": "3.1.0" - }, - "_requiredBy": [ - "/body-parser", - "/raw-body" - ], - "_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "_shasum": "f6cf7933a360e0588fa9fde85651cdc7f805d1f6", - "_spec": "bytes@3.1.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/body-parser", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "bugs": { - "url": "https://github.com/visionmedia/bytes.js/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jed Watson", - "email": "jed.watson@me.com" - }, - { - "name": "Théo FIDRY", - "email": "theo.fidry@gmail.com" - } - ], - "deprecated": false, - "description": "Utility to parse a string bytes to bytes and vice-versa", - "devDependencies": { - "eslint": "5.12.1", - "mocha": "5.2.0", - "nyc": "13.1.0" - }, - "engines": { - "node": ">= 0.8" - }, - "files": [ - "History.md", - "LICENSE", - "Readme.md", - "index.js" - ], - "homepage": "https://github.com/visionmedia/bytes.js#readme", - "keywords": [ - "byte", - "bytes", - "utility", - "parse", - "parser", - "convert", - "converter" - ], - "license": "MIT", - "name": "bytes", - "repository": { - "type": "git", - "url": "git+https://github.com/visionmedia/bytes.js.git" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --check-leaks --reporter spec", - "test-ci": "nyc --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - }, - "version": "3.1.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/caseless/LICENSE b/Languages/APIs/movie-rating/node_modules/caseless/LICENSE deleted file mode 100644 index 61789f4a4..000000000 --- a/Languages/APIs/movie-rating/node_modules/caseless/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/Languages/APIs/movie-rating/node_modules/caseless/README.md b/Languages/APIs/movie-rating/node_modules/caseless/README.md deleted file mode 100644 index e5077a216..000000000 --- a/Languages/APIs/movie-rating/node_modules/caseless/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. - -This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. - -## Usage - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'asdf') -c.get('a-header') === 'asdf' -``` - -## has(key) - -Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. - -```javascript -c.has('a-header') === 'a-Header' -``` - -## set(key, value[, clobber=true]) - -Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. - -```javascript -c.set('a-Header', 'fdas') -c.set('a-HEADER', 'more', false) -c.get('a-header') === 'fdsa,more' -``` - -## swap(key) - -Swaps the casing of a header with the new one that is passed in. - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'fdas') -c.swap('a-HEADER') -c.has('a-header') === 'a-HEADER' -headers === {'a-HEADER': 'fdas'} -``` diff --git a/Languages/APIs/movie-rating/node_modules/caseless/index.js b/Languages/APIs/movie-rating/node_modules/caseless/index.js deleted file mode 100644 index b194734ee..000000000 --- a/Languages/APIs/movie-rating/node_modules/caseless/index.js +++ /dev/null @@ -1,67 +0,0 @@ -function Caseless (dict) { - this.dict = dict || {} -} -Caseless.prototype.set = function (name, value, clobber) { - if (typeof name === 'object') { - for (var i in name) { - this.set(i, name[i], value) - } - } else { - if (typeof clobber === 'undefined') clobber = true - var has = this.has(name) - - if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value - else this.dict[has || name] = value - return has - } -} -Caseless.prototype.has = function (name) { - var keys = Object.keys(this.dict) - , name = name.toLowerCase() - ; - for (var i=0;i - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/combined-stream/Readme.md b/Languages/APIs/movie-rating/node_modules/combined-stream/Readme.md deleted file mode 100644 index 9e367b5bc..000000000 --- a/Languages/APIs/movie-rating/node_modules/combined-stream/Readme.md +++ /dev/null @@ -1,138 +0,0 @@ -# combined-stream - -A stream that emits multiple other streams one after another. - -**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`. - -- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module. - -- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another. - -## Installation - -``` bash -npm install combined-stream -``` - -## Usage - -Here is a simple example that shows how you can use combined-stream to combine -two files into one: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -While the example above works great, it will pause all source streams until -they are needed. If you don't want that to happen, you can set `pauseStreams` -to `false`: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create({pauseStreams: false}); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -However, what if you don't have all the source streams yet, or you don't want -to allocate the resources (file descriptors, memory, etc.) for them right away? -Well, in that case you can simply provide a callback that supplies the stream -by calling a `next()` function: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(function(next) { - next(fs.createReadStream('file1.txt')); -}); -combinedStream.append(function(next) { - next(fs.createReadStream('file2.txt')); -}); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -## API - -### CombinedStream.create([options]) - -Returns a new combined stream object. Available options are: - -* `maxDataSize` -* `pauseStreams` - -The effect of those options is described below. - -### combinedStream.pauseStreams = `true` - -Whether to apply back pressure to the underlaying streams. If set to `false`, -the underlaying streams will never be paused. If set to `true`, the -underlaying streams will be paused right after being appended, as well as when -`delayedStream.pipe()` wants to throttle. - -### combinedStream.maxDataSize = `2 * 1024 * 1024` - -The maximum amount of bytes (or characters) to buffer for all source streams. -If this value is exceeded, `combinedStream` emits an `'error'` event. - -### combinedStream.dataSize = `0` - -The amount of bytes (or characters) currently buffered by `combinedStream`. - -### combinedStream.append(stream) - -Appends the given `stream` to the combinedStream object. If `pauseStreams` is -set to `true, this stream will also be paused right away. - -`streams` can also be a function that takes one parameter called `next`. `next` -is a function that must be invoked in order to provide the `next` stream, see -example above. - -Regardless of how the `stream` is appended, combined-stream always attaches an -`'error'` listener to it, so you don't have to do that manually. - -Special case: `stream` can also be a String or Buffer. - -### combinedStream.write(data) - -You should not call this, `combinedStream` takes care of piping the appended -streams into itself for you. - -### combinedStream.resume() - -Causes `combinedStream` to start drain the streams it manages. The function is -idempotent, and also emits a `'resume'` event each time which usually goes to -the stream that is currently being drained. - -### combinedStream.pause(); - -If `combinedStream.pauseStreams` is set to `false`, this does nothing. -Otherwise a `'pause'` event is emitted, this goes to the stream that is -currently being drained, so you can use it to apply back pressure. - -### combinedStream.end(); - -Sets `combinedStream.writable` to false, emits an `'end'` event, and removes -all streams from the queue. - -### combinedStream.destroy(); - -Same as `combinedStream.end()`, except it emits a `'close'` event instead of -`'end'`. - -## License - -combined-stream is licensed under the MIT license. diff --git a/Languages/APIs/movie-rating/node_modules/combined-stream/lib/combined_stream.js b/Languages/APIs/movie-rating/node_modules/combined-stream/lib/combined_stream.js deleted file mode 100644 index 125f097f3..000000000 --- a/Languages/APIs/movie-rating/node_modules/combined-stream/lib/combined_stream.js +++ /dev/null @@ -1,208 +0,0 @@ -var util = require('util'); -var Stream = require('stream').Stream; -var DelayedStream = require('delayed-stream'); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; diff --git a/Languages/APIs/movie-rating/node_modules/combined-stream/package.json b/Languages/APIs/movie-rating/node_modules/combined-stream/package.json deleted file mode 100644 index a2277d547..000000000 --- a/Languages/APIs/movie-rating/node_modules/combined-stream/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "combined-stream@~1.0.6", - "_id": "combined-stream@1.0.8", - "_inBundle": false, - "_integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "_location": "/combined-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "combined-stream@~1.0.6", - "name": "combined-stream", - "escapedName": "combined-stream", - "rawSpec": "~1.0.6", - "saveSpec": null, - "fetchSpec": "~1.0.6" - }, - "_requiredBy": [ - "/form-data", - "/request" - ], - "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "_shasum": "c3d45a8b34fd730631a110a8a2520682b31d5a7f", - "_spec": "combined-stream@~1.0.6", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/request", - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "bugs": { - "url": "https://github.com/felixge/node-combined-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "deprecated": false, - "description": "A stream that emits multiple other streams one after another.", - "devDependencies": { - "far": "~0.0.7" - }, - "engines": { - "node": ">= 0.8" - }, - "homepage": "https://github.com/felixge/node-combined-stream", - "license": "MIT", - "main": "./lib/combined_stream", - "name": "combined-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-combined-stream.git" - }, - "scripts": { - "test": "node test/run.js" - }, - "version": "1.0.8" -} diff --git a/Languages/APIs/movie-rating/node_modules/combined-stream/yarn.lock b/Languages/APIs/movie-rating/node_modules/combined-stream/yarn.lock deleted file mode 100644 index 7edf41840..000000000 --- a/Languages/APIs/movie-rating/node_modules/combined-stream/yarn.lock +++ /dev/null @@ -1,17 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -far@~0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" - dependencies: - oop "0.0.3" - -oop@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" diff --git a/Languages/APIs/movie-rating/node_modules/content-disposition/HISTORY.md b/Languages/APIs/movie-rating/node_modules/content-disposition/HISTORY.md deleted file mode 100644 index 63a3d08c7..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-disposition/HISTORY.md +++ /dev/null @@ -1,55 +0,0 @@ -0.5.3 / 2018-12-17 -================== - - * Use `safe-buffer` for improved Buffer API - -0.5.2 / 2016-12-08 -================== - - * Fix `parse` to accept any linear whitespace character - -0.5.1 / 2016-01-17 -================== - - * perf: enable strict mode - -0.5.0 / 2014-10-11 -================== - - * Add `parse` function - -0.4.0 / 2014-09-21 -================== - - * Expand non-Unicode `filename` to the full ISO-8859-1 charset - -0.3.0 / 2014-09-20 -================== - - * Add `fallback` option - * Add `type` option - -0.2.0 / 2014-09-19 -================== - - * Reduce ambiguity of file names with hex escape in buggy browsers - -0.1.2 / 2014-09-19 -================== - - * Fix periodic invalid Unicode filename header - -0.1.1 / 2014-09-19 -================== - - * Fix invalid characters appearing in `filename*` parameter - -0.1.0 / 2014-09-18 -================== - - * Make the `filename` argument optional - -0.0.0 / 2014-09-18 -================== - - * Initial release diff --git a/Languages/APIs/movie-rating/node_modules/content-disposition/LICENSE b/Languages/APIs/movie-rating/node_modules/content-disposition/LICENSE deleted file mode 100644 index 84441fbb5..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-disposition/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/content-disposition/README.md b/Languages/APIs/movie-rating/node_modules/content-disposition/README.md deleted file mode 100644 index eebef13d4..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-disposition/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# content-disposition - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create and parse HTTP `Content-Disposition` header - -## Installation - -```sh -$ npm install content-disposition -``` - -## API - - - -```js -var contentDisposition = require('content-disposition') -``` - -### contentDisposition(filename, options) - -Create an attachment `Content-Disposition` header value using the given file name, -if supplied. The `filename` is optional and if no file name is desired, but you -want to specify `options`, set `filename` to `undefined`. - - - -```js -res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf')) -``` - -**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this -header through a means different from `setHeader` in Node.js, you'll want to specify -the `'binary'` encoding in Node.js. - -#### Options - -`contentDisposition` accepts these properties in the options object. - -##### fallback - -If the `filename` option is outside ISO-8859-1, then the file name is actually -stored in a supplemental field for clients that support Unicode file names and -a ISO-8859-1 version of the file name is automatically generated. - -This specifies the ISO-8859-1 file name to override the automatic generation or -disables the generation all together, defaults to `true`. - - - A string will specify the ISO-8859-1 file name to use in place of automatic - generation. - - `false` will disable including a ISO-8859-1 file name and only include the - Unicode version (unless the file name is already ISO-8859-1). - - `true` will enable automatic generation if the file name is outside ISO-8859-1. - -If the `filename` option is ISO-8859-1 and this option is specified and has a -different value, then the `filename` option is encoded in the extended field -and this set as the fallback field, even though they are both ISO-8859-1. - -##### type - -Specifies the disposition type, defaults to `"attachment"`. This can also be -`"inline"`, or any other value (all values except inline are treated like -`attachment`, but can convey additional information if both parties agree to -it). The type is normalized to lower-case. - -### contentDisposition.parse(string) - - - -```js -var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') -``` - -Parse a `Content-Disposition` header string. This automatically handles extended -("Unicode") parameters by decoding them and providing them under the standard -parameter name. This will return an object with the following properties (examples -are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`): - - - `type`: The disposition type (always lower case). Example: `'attachment'` - - - `parameters`: An object of the parameters in the disposition (name of parameter - always lower case and extended versions replace non-extended versions). Example: - `{filename: "€ rates.txt"}` - -## Examples - -### Send a file for download - -```js -var contentDisposition = require('content-disposition') -var destroy = require('destroy') -var fs = require('fs') -var http = require('http') -var onFinished = require('on-finished') - -var filePath = '/path/to/public/plans.pdf' - -http.createServer(function onRequest (req, res) { - // set headers - res.setHeader('Content-Type', 'application/pdf') - res.setHeader('Content-Disposition', contentDisposition(filePath)) - - // send file - var stream = fs.createReadStream(filePath) - stream.pipe(res) - onFinished(res, function () { - destroy(stream) - }) -}) -``` - -## Testing - -```sh -$ npm test -``` - -## References - -- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616] -- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987] -- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266] -- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231] - -[rfc-2616]: https://tools.ietf.org/html/rfc2616 -[rfc-5987]: https://tools.ietf.org/html/rfc5987 -[rfc-6266]: https://tools.ietf.org/html/rfc6266 -[tc-2231]: http://greenbytes.de/tech/tc2231/ - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/content-disposition.svg -[npm-url]: https://npmjs.org/package/content-disposition -[node-version-image]: https://img.shields.io/node/v/content-disposition.svg -[node-version-url]: https://nodejs.org/en/download -[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg -[travis-url]: https://travis-ci.org/jshttp/content-disposition -[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg -[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master -[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg -[downloads-url]: https://npmjs.org/package/content-disposition diff --git a/Languages/APIs/movie-rating/node_modules/content-disposition/index.js b/Languages/APIs/movie-rating/node_modules/content-disposition/index.js deleted file mode 100644 index 3092a4dc3..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-disposition/index.js +++ /dev/null @@ -1,458 +0,0 @@ -/*! - * content-disposition - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = contentDisposition -module.exports.parse = parse - -/** - * Module dependencies. - * @private - */ - -var basename = require('path').basename -var Buffer = require('safe-buffer').Buffer - -/** - * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%") - * @private - */ - -var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex - -/** - * RegExp to match percent encoding escape. - * @private - */ - -var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/ -var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g - -/** - * RegExp to match non-latin1 characters. - * @private - */ - -var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g - -/** - * RegExp to match quoted-pair in RFC 2616 - * - * quoted-pair = "\" CHAR - * CHAR = - * @private - */ - -var QESC_REGEXP = /\\([\u0000-\u007f])/g // eslint-disable-line no-control-regex - -/** - * RegExp to match chars that must be quoted-pair in RFC 2616 - * @private - */ - -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp for various RFC 2616 grammar - * - * parameter = token "=" ( token | quoted-string ) - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) - * qdtext = > - * quoted-pair = "\" CHAR - * CHAR = - * TEXT = - * LWS = [CRLF] 1*( SP | HT ) - * CRLF = CR LF - * CR = - * LF = - * SP = - * HT = - * CTL = - * OCTET = - * @private - */ - -var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex -var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/ -var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/ - -/** - * RegExp for various RFC 5987 grammar - * - * ext-value = charset "'" [ language ] "'" value-chars - * charset = "UTF-8" / "ISO-8859-1" / mime-charset - * mime-charset = 1*mime-charsetc - * mime-charsetc = ALPHA / DIGIT - * / "!" / "#" / "$" / "%" / "&" - * / "+" / "-" / "^" / "_" / "`" - * / "{" / "}" / "~" - * language = ( 2*3ALPHA [ extlang ] ) - * / 4ALPHA - * / 5*8ALPHA - * extlang = *3( "-" 3ALPHA ) - * value-chars = *( pct-encoded / attr-char ) - * pct-encoded = "%" HEXDIG HEXDIG - * attr-char = ALPHA / DIGIT - * / "!" / "#" / "$" / "&" / "+" / "-" / "." - * / "^" / "_" / "`" / "|" / "~" - * @private - */ - -var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/ - -/** - * RegExp for various RFC 6266 grammar - * - * disposition-type = "inline" | "attachment" | disp-ext-type - * disp-ext-type = token - * disposition-parm = filename-parm | disp-ext-parm - * filename-parm = "filename" "=" value - * | "filename*" "=" ext-value - * disp-ext-parm = token "=" value - * | ext-token "=" ext-value - * ext-token = - * @private - */ - -var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex - -/** - * Create an attachment Content-Disposition header. - * - * @param {string} [filename] - * @param {object} [options] - * @param {string} [options.type=attachment] - * @param {string|boolean} [options.fallback=true] - * @return {string} - * @public - */ - -function contentDisposition (filename, options) { - var opts = options || {} - - // get type - var type = opts.type || 'attachment' - - // get parameters - var params = createparams(filename, opts.fallback) - - // format into string - return format(new ContentDisposition(type, params)) -} - -/** - * Create parameters object from filename and fallback. - * - * @param {string} [filename] - * @param {string|boolean} [fallback=true] - * @return {object} - * @private - */ - -function createparams (filename, fallback) { - if (filename === undefined) { - return - } - - var params = {} - - if (typeof filename !== 'string') { - throw new TypeError('filename must be a string') - } - - // fallback defaults to true - if (fallback === undefined) { - fallback = true - } - - if (typeof fallback !== 'string' && typeof fallback !== 'boolean') { - throw new TypeError('fallback must be a string or boolean') - } - - if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) { - throw new TypeError('fallback must be ISO-8859-1 string') - } - - // restrict to file base name - var name = basename(filename) - - // determine if name is suitable for quoted string - var isQuotedString = TEXT_REGEXP.test(name) - - // generate fallback name - var fallbackName = typeof fallback !== 'string' - ? fallback && getlatin1(name) - : basename(fallback) - var hasFallback = typeof fallbackName === 'string' && fallbackName !== name - - // set extended filename parameter - if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { - params['filename*'] = name - } - - // set filename parameter - if (isQuotedString || hasFallback) { - params.filename = hasFallback - ? fallbackName - : name - } - - return params -} - -/** - * Format object to Content-Disposition header. - * - * @param {object} obj - * @param {string} obj.type - * @param {object} [obj.parameters] - * @return {string} - * @private - */ - -function format (obj) { - var parameters = obj.parameters - var type = obj.type - - if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - // start with normalized type - var string = String(type).toLowerCase() - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - var val = param.substr(-1) === '*' - ? ustring(parameters[param]) - : qstring(parameters[param]) - - string += '; ' + param + '=' + val - } - } - - return string -} - -/** - * Decode a RFC 6987 field value (gracefully). - * - * @param {string} str - * @return {string} - * @private - */ - -function decodefield (str) { - var match = EXT_VALUE_REGEXP.exec(str) - - if (!match) { - throw new TypeError('invalid extended field value') - } - - var charset = match[1].toLowerCase() - var encoded = match[2] - var value - - // to binary string - var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode) - - switch (charset) { - case 'iso-8859-1': - value = getlatin1(binary) - break - case 'utf-8': - value = Buffer.from(binary, 'binary').toString('utf8') - break - default: - throw new TypeError('unsupported charset in extended field') - } - - return value -} - -/** - * Get ISO-8859-1 version of string. - * - * @param {string} val - * @return {string} - * @private - */ - -function getlatin1 (val) { - // simple Unicode -> ISO-8859-1 transformation - return String(val).replace(NON_LATIN1_REGEXP, '?') -} - -/** - * Parse Content-Disposition header string. - * - * @param {string} string - * @return {object} - * @public - */ - -function parse (string) { - if (!string || typeof string !== 'string') { - throw new TypeError('argument string is required') - } - - var match = DISPOSITION_TYPE_REGEXP.exec(string) - - if (!match) { - throw new TypeError('invalid type format') - } - - // normalize type - var index = match[0].length - var type = match[1].toLowerCase() - - var key - var names = [] - var params = {} - var value - - // calculate index to start at - index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';' - ? index - 1 - : index - - // match parameters - while ((match = PARAM_REGEXP.exec(string))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (names.indexOf(key) !== -1) { - throw new TypeError('invalid duplicate parameter') - } - - names.push(key) - - if (key.indexOf('*') + 1 === key.length) { - // decode extended value - key = key.slice(0, -1) - value = decodefield(value) - - // overwrite existing value - params[key] = value - continue - } - - if (typeof params[key] === 'string') { - continue - } - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .substr(1, value.length - 2) - .replace(QESC_REGEXP, '$1') - } - - params[key] = value - } - - if (index !== -1 && index !== string.length) { - throw new TypeError('invalid parameter format') - } - - return new ContentDisposition(type, params) -} - -/** - * Percent decode a single character. - * - * @param {string} str - * @param {string} hex - * @return {string} - * @private - */ - -function pdecode (str, hex) { - return String.fromCharCode(parseInt(hex, 16)) -} - -/** - * Percent encode a single character. - * - * @param {string} char - * @return {string} - * @private - */ - -function pencode (char) { - return '%' + String(char) - .charCodeAt(0) - .toString(16) - .toUpperCase() -} - -/** - * Quote a string for HTTP. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' -} - -/** - * Encode a Unicode string for HTTP (RFC 5987). - * - * @param {string} val - * @return {string} - * @private - */ - -function ustring (val) { - var str = String(val) - - // percent encode as UTF-8 - var encoded = encodeURIComponent(str) - .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode) - - return 'UTF-8\'\'' + encoded -} - -/** - * Class for parsed Content-Disposition header for v8 optimization - * - * @public - * @param {string} type - * @param {object} parameters - * @constructor - */ - -function ContentDisposition (type, parameters) { - this.type = type - this.parameters = parameters -} diff --git a/Languages/APIs/movie-rating/node_modules/content-disposition/package.json b/Languages/APIs/movie-rating/node_modules/content-disposition/package.json deleted file mode 100644 index fee51de5a..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-disposition/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "content-disposition@0.5.3", - "_id": "content-disposition@0.5.3", - "_inBundle": false, - "_integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "_location": "/content-disposition", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "content-disposition@0.5.3", - "name": "content-disposition", - "escapedName": "content-disposition", - "rawSpec": "0.5.3", - "saveSpec": null, - "fetchSpec": "0.5.3" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "_shasum": "e130caf7e7279087c5616c2007d0485698984fbd", - "_spec": "content-disposition@0.5.3", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "bugs": { - "url": "https://github.com/jshttp/content-disposition/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "deprecated": false, - "description": "Create and parse Content-Disposition header", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "5.10.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.14.0", - "eslint-plugin-markdown": "1.0.0-rc.1", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.0.1", - "eslint-plugin-standard": "4.0.0", - "istanbul": "0.4.5", - "mocha": "5.2.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "homepage": "https://github.com/jshttp/content-disposition#readme", - "keywords": [ - "content-disposition", - "http", - "rfc6266", - "res" - ], - "license": "MIT", - "name": "content-disposition", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/content-disposition.git" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "version": "0.5.3" -} diff --git a/Languages/APIs/movie-rating/node_modules/content-type/HISTORY.md b/Languages/APIs/movie-rating/node_modules/content-type/HISTORY.md deleted file mode 100644 index 8f5cb7030..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-type/HISTORY.md +++ /dev/null @@ -1,24 +0,0 @@ -1.0.4 / 2017-09-11 -================== - - * perf: skip parameter parsing when no parameters - -1.0.3 / 2017-09-10 -================== - - * perf: remove argument reassignment - -1.0.2 / 2016-05-09 -================== - - * perf: enable strict mode - -1.0.1 / 2015-02-13 -================== - - * Improve missing `Content-Type` header error message - -1.0.0 / 2015-02-01 -================== - - * Initial implementation, derived from `media-typer@0.3.0` diff --git a/Languages/APIs/movie-rating/node_modules/content-type/LICENSE b/Languages/APIs/movie-rating/node_modules/content-type/LICENSE deleted file mode 100644 index 34b1a2de3..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-type/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/content-type/README.md b/Languages/APIs/movie-rating/node_modules/content-type/README.md deleted file mode 100644 index 3ed67413c..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-type/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# content-type - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create and parse HTTP Content-Type header according to RFC 7231 - -## Installation - -```sh -$ npm install content-type -``` - -## API - -```js -var contentType = require('content-type') -``` - -### contentType.parse(string) - -```js -var obj = contentType.parse('image/svg+xml; charset=utf-8') -``` - -Parse a content type string. This will return an object with the following -properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The media type (the type and subtype, always lower case). - Example: `'image/svg+xml'` - - - `parameters`: An object of the parameters in the media type (name of parameter - always lower case). Example: `{charset: 'utf-8'}` - -Throws a `TypeError` if the string is missing or invalid. - -### contentType.parse(req) - -```js -var obj = contentType.parse(req) -``` - -Parse the `content-type` header from the given `req`. Short-cut for -`contentType.parse(req.headers['content-type'])`. - -Throws a `TypeError` if the `Content-Type` header is missing or invalid. - -### contentType.parse(res) - -```js -var obj = contentType.parse(res) -``` - -Parse the `content-type` header set on the given `res`. Short-cut for -`contentType.parse(res.getHeader('content-type'))`. - -Throws a `TypeError` if the `Content-Type` header is missing or invalid. - -### contentType.format(obj) - -```js -var str = contentType.format({type: 'image/svg+xml'}) -``` - -Format an object into a content type string. This will return a string of the -content type for the given object with the following properties (examples are -shown that produce the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'` - - - `parameters`: An object of the parameters in the media type (name of the - parameter will be lower-cased). Example: `{charset: 'utf-8'}` - -Throws a `TypeError` if the object contains an invalid type or parameter names. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/content-type.svg -[npm-url]: https://npmjs.org/package/content-type -[node-version-image]: https://img.shields.io/node/v/content-type.svg -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg -[travis-url]: https://travis-ci.org/jshttp/content-type -[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/content-type -[downloads-image]: https://img.shields.io/npm/dm/content-type.svg -[downloads-url]: https://npmjs.org/package/content-type diff --git a/Languages/APIs/movie-rating/node_modules/content-type/index.js b/Languages/APIs/movie-rating/node_modules/content-type/index.js deleted file mode 100644 index 6ce03f208..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-type/index.js +++ /dev/null @@ -1,222 +0,0 @@ -/*! - * content-type - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 - * - * parameter = token "=" ( token / quoted-string ) - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE - * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text - * obs-text = %x80-FF - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - */ -var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g -var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ -var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 - * - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - * obs-text = %x80-FF - */ -var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g - -/** - * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 - */ -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp to match type in RFC 7231 sec 3.1.1.1 - * - * media-type = type "/" subtype - * type = token - * subtype = token - */ -var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * Module exports. - * @public - */ - -exports.format = format -exports.parse = parse - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @public - */ - -function format (obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var parameters = obj.parameters - var type = obj.type - - if (!type || !TYPE_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - var string = type - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - if (!TOKEN_REGEXP.test(param)) { - throw new TypeError('invalid parameter name') - } - - string += '; ' + param + '=' + qstring(parameters[param]) - } - } - - return string -} - -/** - * Parse media type to object. - * - * @param {string|object} string - * @return {Object} - * @public - */ - -function parse (string) { - if (!string) { - throw new TypeError('argument string is required') - } - - // support req/res-like objects as argument - var header = typeof string === 'object' - ? getcontenttype(string) - : string - - if (typeof header !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var index = header.indexOf(';') - var type = index !== -1 - ? header.substr(0, index).trim() - : header.trim() - - if (!TYPE_REGEXP.test(type)) { - throw new TypeError('invalid media type') - } - - var obj = new ContentType(type.toLowerCase()) - - // parse parameters - if (index !== -1) { - var key - var match - var value - - PARAM_REGEXP.lastIndex = index - - while ((match = PARAM_REGEXP.exec(header))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .substr(1, value.length - 2) - .replace(QESC_REGEXP, '$1') - } - - obj.parameters[key] = value - } - - if (index !== header.length) { - throw new TypeError('invalid parameter format') - } - } - - return obj -} - -/** - * Get content-type from req/res objects. - * - * @param {object} - * @return {Object} - * @private - */ - -function getcontenttype (obj) { - var header - - if (typeof obj.getHeader === 'function') { - // res-like - header = obj.getHeader('content-type') - } else if (typeof obj.headers === 'object') { - // req-like - header = obj.headers && obj.headers['content-type'] - } - - if (typeof header !== 'string') { - throw new TypeError('content-type header is missing from object') - } - - return header -} - -/** - * Quote a string if necessary. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - // no need to quote tokens - if (TOKEN_REGEXP.test(str)) { - return str - } - - if (str.length > 0 && !TEXT_REGEXP.test(str)) { - throw new TypeError('invalid parameter value') - } - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' -} - -/** - * Class to represent a content type. - * @private - */ -function ContentType (type) { - this.parameters = Object.create(null) - this.type = type -} diff --git a/Languages/APIs/movie-rating/node_modules/content-type/package.json b/Languages/APIs/movie-rating/node_modules/content-type/package.json deleted file mode 100644 index c7e17f984..000000000 --- a/Languages/APIs/movie-rating/node_modules/content-type/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "content-type@~1.0.4", - "_id": "content-type@1.0.4", - "_inBundle": false, - "_integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "_location": "/content-type", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "content-type@~1.0.4", - "name": "content-type", - "escapedName": "content-type", - "rawSpec": "~1.0.4", - "saveSpec": null, - "fetchSpec": "~1.0.4" - }, - "_requiredBy": [ - "/body-parser", - "/express" - ], - "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "_shasum": "e138cc75e040c727b1966fe5e5f8c9aee256fe3b", - "_spec": "content-type@~1.0.4", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "bugs": { - "url": "https://github.com/jshttp/content-type/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Create and parse HTTP Content-Type header", - "devDependencies": { - "eslint": "3.19.0", - "eslint-config-standard": "10.2.1", - "eslint-plugin-import": "2.7.0", - "eslint-plugin-node": "5.1.1", - "eslint-plugin-promise": "3.5.0", - "eslint-plugin-standard": "3.0.1", - "istanbul": "0.4.5", - "mocha": "~1.21.5" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "homepage": "https://github.com/jshttp/content-type#readme", - "keywords": [ - "content-type", - "http", - "req", - "res", - "rfc7231" - ], - "license": "MIT", - "name": "content-type", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/content-type.git" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" - }, - "version": "1.0.4" -} diff --git a/Languages/APIs/movie-rating/node_modules/cookie-signature/.npmignore b/Languages/APIs/movie-rating/node_modules/cookie-signature/.npmignore deleted file mode 100644 index f1250e584..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie-signature/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/Languages/APIs/movie-rating/node_modules/cookie-signature/History.md b/Languages/APIs/movie-rating/node_modules/cookie-signature/History.md deleted file mode 100644 index 78513cc3d..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie-signature/History.md +++ /dev/null @@ -1,38 +0,0 @@ -1.0.6 / 2015-02-03 -================== - -* use `npm test` instead of `make test` to run tests -* clearer assertion messages when checking input - - -1.0.5 / 2014-09-05 -================== - -* add license to package.json - -1.0.4 / 2014-06-25 -================== - - * corrected avoidance of timing attacks (thanks @tenbits!) - -1.0.3 / 2014-01-28 -================== - - * [incorrect] fix for timing attacks - -1.0.2 / 2014-01-28 -================== - - * fix missing repository warning - * fix typo in test - -1.0.1 / 2013-04-15 -================== - - * Revert "Changed underlying HMAC algo. to sha512." - * Revert "Fix for timing attacks on MAC verification." - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/Languages/APIs/movie-rating/node_modules/cookie-signature/Readme.md b/Languages/APIs/movie-rating/node_modules/cookie-signature/Readme.md deleted file mode 100644 index 2559e841b..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie-signature/Readme.md +++ /dev/null @@ -1,42 +0,0 @@ - -# cookie-signature - - Sign and unsign cookies. - -## Example - -```js -var cookie = require('cookie-signature'); - -var val = cookie.sign('hello', 'tobiiscool'); -val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); - -var val = cookie.sign('hello', 'tobiiscool'); -cookie.unsign(val, 'tobiiscool').should.equal('hello'); -cookie.unsign(val, 'luna').should.be.false; -``` - -## License - -(The MIT License) - -Copyright (c) 2012 LearnBoost <tj@learnboost.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Languages/APIs/movie-rating/node_modules/cookie-signature/index.js b/Languages/APIs/movie-rating/node_modules/cookie-signature/index.js deleted file mode 100644 index b8c9463a2..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie-signature/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Module dependencies. - */ - -var crypto = require('crypto'); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string."); - if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided."); - if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); - var str = val.slice(0, val.lastIndexOf('.')) - , mac = exports.sign(str, secret); - - return sha1(mac) == sha1(val) ? str : false; -}; - -/** - * Private - */ - -function sha1(str){ - return crypto.createHash('sha1').update(str).digest('hex'); -} diff --git a/Languages/APIs/movie-rating/node_modules/cookie-signature/package.json b/Languages/APIs/movie-rating/node_modules/cookie-signature/package.json deleted file mode 100644 index f16773ec1..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie-signature/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "cookie-signature@1.0.6", - "_id": "cookie-signature@1.0.6", - "_inBundle": false, - "_integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "_location": "/cookie-signature", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cookie-signature@1.0.6", - "name": "cookie-signature", - "escapedName": "cookie-signature", - "rawSpec": "1.0.6", - "saveSpec": null, - "fetchSpec": "1.0.6" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", - "_spec": "cookie-signature@1.0.6", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@learnboost.com" - }, - "bugs": { - "url": "https://github.com/visionmedia/node-cookie-signature/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Sign and unsign cookies", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "homepage": "https://github.com/visionmedia/node-cookie-signature#readme", - "keywords": [ - "cookie", - "sign", - "unsign" - ], - "license": "MIT", - "main": "index", - "name": "cookie-signature", - "repository": { - "type": "git", - "url": "git+https://github.com/visionmedia/node-cookie-signature.git" - }, - "scripts": { - "test": "mocha --require should --reporter spec" - }, - "version": "1.0.6" -} diff --git a/Languages/APIs/movie-rating/node_modules/cookie/HISTORY.md b/Languages/APIs/movie-rating/node_modules/cookie/HISTORY.md deleted file mode 100644 index da2bf243d..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie/HISTORY.md +++ /dev/null @@ -1,123 +0,0 @@ -0.4.0 / 2019-05-15 -================== - - * Add `SameSite=None` support - -0.3.1 / 2016-05-26 -================== - - * Fix `sameSite: true` to work with draft-7 clients - - `true` now sends `SameSite=Strict` instead of `SameSite` - -0.3.0 / 2016-05-26 -================== - - * Add `sameSite` option - - Replaces `firstPartyOnly` option, never implemented by browsers - * Improve error message when `encode` is not a function - * Improve error message when `expires` is not a `Date` - -0.2.4 / 2016-05-20 -================== - - * perf: enable strict mode - * perf: use for loop in parse - * perf: use string concatination for serialization - -0.2.3 / 2015-10-25 -================== - - * Fix cookie `Max-Age` to never be a floating point number - -0.2.2 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.2.1 / 2015-09-17 -================== - - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.2.0 / 2015-08-13 -================== - - * Add `firstPartyOnly` option - * Throw better error for invalid argument to parse - * perf: hoist regular expression - -0.1.5 / 2015-09-17 -================== - - * Fix regression when setting empty cookie value - - Ease the new restriction, which is just basic header-level validation - * Fix typo in invalid value errors - -0.1.4 / 2015-09-17 -================== - - * Throw better error for invalid argument to parse - * Throw on invalid values provided to `serialize` - - Ensures the resulting string is a valid HTTP header value - -0.1.3 / 2015-05-19 -================== - - * Reduce the scope of try-catch deopt - * Remove argument reassignments - -0.1.2 / 2014-04-16 -================== - - * Remove unnecessary files from npm package - -0.1.1 / 2014-02-23 -================== - - * Fix bad parse when cookie value contained a comma - * Fix support for `maxAge` of `0` - -0.1.0 / 2013-05-01 -================== - - * Add `decode` option - * Add `encode` option - -0.0.6 / 2013-04-08 -================== - - * Ignore cookie parts missing `=` - -0.0.5 / 2012-10-29 -================== - - * Return raw cookie value if value unescape errors - -0.0.4 / 2012-06-21 -================== - - * Use encode/decodeURIComponent for cookie encoding/decoding - - Improve server/client interoperability - -0.0.3 / 2012-06-06 -================== - - * Only escape special characters per the cookie RFC - -0.0.2 / 2012-06-01 -================== - - * Fix `maxAge` option to not throw error - -0.0.1 / 2012-05-28 -================== - - * Add more tests - -0.0.0 / 2012-05-28 -================== - - * Initial release diff --git a/Languages/APIs/movie-rating/node_modules/cookie/LICENSE b/Languages/APIs/movie-rating/node_modules/cookie/LICENSE deleted file mode 100644 index 058b6b4ef..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Roman Shtylman -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Languages/APIs/movie-rating/node_modules/cookie/README.md b/Languages/APIs/movie-rating/node_modules/cookie/README.md deleted file mode 100644 index 857fb77c7..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie/README.md +++ /dev/null @@ -1,253 +0,0 @@ -# cookie - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Basic HTTP cookie parser and serializer for HTTP servers. - -## Installation - -```sh -$ npm install cookie -``` - -## API - -```js -var cookie = require('cookie'); -``` - -### cookie.parse(str, options) - -Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs. -The `str` argument is the string representing a `Cookie` header value and `options` is an -optional object containing additional parsing options. - -```js -var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2'); -// { foo: 'bar', equation: 'E=mc^2' } -``` - -#### Options - -`cookie.parse` accepts these properties in the options object. - -##### decode - -Specifies a function that will be used to decode a cookie's value. Since the value of a cookie -has a limited character set (and must be a simple string), this function can be used to decode -a previously-encoded cookie value into a JavaScript string or other object. - -The default function is the global `decodeURIComponent`, which will decode any URL-encoded -sequences into their byte representations. - -**note** if an error is thrown from this function, the original, non-decoded cookie value will -be returned as the cookie's value. - -### cookie.serialize(name, value, options) - -Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the -name for the cookie, the `value` argument is the value to set the cookie to, and the `options` -argument is an optional object containing additional serialization options. - -```js -var setCookie = cookie.serialize('foo', 'bar'); -// foo=bar -``` - -#### Options - -`cookie.serialize` accepts these properties in the options object. - -##### domain - -Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no -domain is set, and most clients will consider the cookie to apply to only the current domain. - -##### encode - -Specifies a function that will be used to encode a cookie's value. Since value of a cookie -has a limited character set (and must be a simple string), this function can be used to encode -a value into a string suited for a cookie's value. - -The default function is the global `encodeURIComponent`, which will encode a JavaScript string -into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range. - -##### expires - -Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1]. -By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and -will delete it on a condition like exiting a web browser application. - -**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and -`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, -so if both are set, they should point to the same date and time. - -##### httpOnly - -Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy, -the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set. - -**note** be careful when setting this to `true`, as compliant clients will not allow client-side -JavaScript to see the cookie in `document.cookie`. - -##### maxAge - -Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2]. -The given number will be converted to an integer by rounding down. By default, no maximum age is set. - -**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and -`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, -so if both are set, they should point to the same date and time. - -##### path - -Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path -is considered the ["default path"][rfc-6265-5.1.4]. - -##### sameSite - -Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-03-4.1.2.7]. - - - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - - `false` will not set the `SameSite` attribute. - - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. - - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie. - - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - -More information about the different enforcement levels can be found in -[the specification][rfc-6265bis-03-4.1.2.7]. - -**note** This is an attribute that has not yet been fully standardized, and may change in the future. -This also means many clients may ignore this attribute until they understand it. - -##### secure - -Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy, -the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. - -**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to -the server in the future if the browser does not have an HTTPS connection. - -## Example - -The following example uses this module in conjunction with the Node.js core HTTP server -to prompt a user for their name and display it back on future visits. - -```js -var cookie = require('cookie'); -var escapeHtml = require('escape-html'); -var http = require('http'); -var url = require('url'); - -function onRequest(req, res) { - // Parse the query string - var query = url.parse(req.url, true, true).query; - - if (query && query.name) { - // Set a new cookie with the name - res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), { - httpOnly: true, - maxAge: 60 * 60 * 24 * 7 // 1 week - })); - - // Redirect back after setting cookie - res.statusCode = 302; - res.setHeader('Location', req.headers.referer || '/'); - res.end(); - return; - } - - // Parse the cookies on the request - var cookies = cookie.parse(req.headers.cookie || ''); - - // Get the visitor name set in the cookie - var name = cookies.name; - - res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - - if (name) { - res.write('

Welcome back, ' + escapeHtml(name) + '!

'); - } else { - res.write('

Hello, new visitor!

'); - } - - res.write('
'); - res.write(' '); - res.end('
'); -} - -http.createServer(onRequest).listen(3000); -``` - -## Testing - -```sh -$ npm test -``` - -## Benchmark - -``` -$ npm run bench - -> cookie@0.3.1 bench cookie -> node benchmark/index.js - - http_parser@2.8.0 - node@6.14.2 - v8@5.1.281.111 - uv@1.16.1 - zlib@1.2.11 - ares@1.10.1-DEV - icu@58.2 - modules@48 - napi@3 - openssl@1.0.2o - -> node benchmark/parse.js - - cookie.parse - - 6 tests completed. - - simple x 1,200,691 ops/sec ±1.12% (189 runs sampled) - decode x 1,012,994 ops/sec ±0.97% (186 runs sampled) - unquote x 1,074,174 ops/sec ±2.43% (186 runs sampled) - duplicates x 438,424 ops/sec ±2.17% (184 runs sampled) - 10 cookies x 147,154 ops/sec ±1.01% (186 runs sampled) - 100 cookies x 14,274 ops/sec ±1.07% (187 runs sampled) -``` - -## References - -- [RFC 6265: HTTP State Management Mechanism][rfc-6265] -- [Same-site Cookies][rfc-6265bis-03-4.1.2.7] - -[rfc-6265bis-03-4.1.2.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7 -[rfc-6265]: https://tools.ietf.org/html/rfc6265 -[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4 -[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1 -[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2 -[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3 -[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4 -[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5 -[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6 -[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3 - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master -[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master -[node-version-image]: https://badgen.net/npm/node/cookie -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/cookie -[npm-url]: https://npmjs.org/package/cookie -[npm-version-image]: https://badgen.net/npm/v/cookie -[travis-image]: https://badgen.net/travis/jshttp/cookie/master -[travis-url]: https://travis-ci.org/jshttp/cookie diff --git a/Languages/APIs/movie-rating/node_modules/cookie/index.js b/Languages/APIs/movie-rating/node_modules/cookie/index.js deleted file mode 100644 index 16f56c041..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie/index.js +++ /dev/null @@ -1,198 +0,0 @@ -/*! - * cookie - * Copyright(c) 2012-2014 Roman Shtylman - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -exports.parse = parse; -exports.serialize = serialize; - -/** - * Module variables. - * @private - */ - -var decode = decodeURIComponent; -var encode = encodeURIComponent; -var pairSplitRegExp = /; */; - -/** - * RegExp to match field-content in RFC 7230 sec 3.2 - * - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - * obs-text = %x80-FF - */ - -var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; - -/** - * Parse a cookie header. - * - * Parse the given cookie header string into an object - * The object has the various cookies as keys(names) => values - * - * @param {string} str - * @param {object} [options] - * @return {object} - * @public - */ - -function parse(str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string'); - } - - var obj = {} - var opt = options || {}; - var pairs = str.split(pairSplitRegExp); - var dec = opt.decode || decode; - - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - var eq_idx = pair.indexOf('='); - - // skip things that don't look like key=value - if (eq_idx < 0) { - continue; - } - - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - obj[key] = tryDecode(val, dec); - } - } - - return obj; -} - -/** - * Serialize data into a cookie header. - * - * Serialize the a name value pair into a cookie string suitable for - * http headers. An optional options object specified cookie parameters. - * - * serialize('foo', 'bar', { httpOnly: true }) - * => "foo=bar; httpOnly" - * - * @param {string} name - * @param {string} val - * @param {object} [options] - * @return {string} - * @public - */ - -function serialize(name, val, options) { - var opt = options || {}; - var enc = opt.encode || encode; - - if (typeof enc !== 'function') { - throw new TypeError('option encode is invalid'); - } - - if (!fieldContentRegExp.test(name)) { - throw new TypeError('argument name is invalid'); - } - - var value = enc(val); - - if (value && !fieldContentRegExp.test(value)) { - throw new TypeError('argument val is invalid'); - } - - var str = name + '=' + value; - - if (null != opt.maxAge) { - var maxAge = opt.maxAge - 0; - if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); - str += '; Max-Age=' + Math.floor(maxAge); - } - - if (opt.domain) { - if (!fieldContentRegExp.test(opt.domain)) { - throw new TypeError('option domain is invalid'); - } - - str += '; Domain=' + opt.domain; - } - - if (opt.path) { - if (!fieldContentRegExp.test(opt.path)) { - throw new TypeError('option path is invalid'); - } - - str += '; Path=' + opt.path; - } - - if (opt.expires) { - if (typeof opt.expires.toUTCString !== 'function') { - throw new TypeError('option expires is invalid'); - } - - str += '; Expires=' + opt.expires.toUTCString(); - } - - if (opt.httpOnly) { - str += '; HttpOnly'; - } - - if (opt.secure) { - str += '; Secure'; - } - - if (opt.sameSite) { - var sameSite = typeof opt.sameSite === 'string' - ? opt.sameSite.toLowerCase() : opt.sameSite; - - switch (sameSite) { - case true: - str += '; SameSite=Strict'; - break; - case 'lax': - str += '; SameSite=Lax'; - break; - case 'strict': - str += '; SameSite=Strict'; - break; - case 'none': - str += '; SameSite=None'; - break; - default: - throw new TypeError('option sameSite is invalid'); - } - } - - return str; -} - -/** - * Try decoding a string using a decoding function. - * - * @param {string} str - * @param {function} decode - * @private - */ - -function tryDecode(str, decode) { - try { - return decode(str); - } catch (e) { - return str; - } -} diff --git a/Languages/APIs/movie-rating/node_modules/cookie/package.json b/Languages/APIs/movie-rating/node_modules/cookie/package.json deleted file mode 100644 index b68bcf942..000000000 --- a/Languages/APIs/movie-rating/node_modules/cookie/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "cookie@0.4.0", - "_id": "cookie@0.4.0", - "_inBundle": false, - "_integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "_location": "/cookie", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cookie@0.4.0", - "name": "cookie", - "escapedName": "cookie", - "rawSpec": "0.4.0", - "saveSpec": null, - "fetchSpec": "0.4.0" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "_shasum": "beb437e7022b3b6d49019d088665303ebe9c14ba", - "_spec": "cookie@0.4.0", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/express", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "bugs": { - "url": "https://github.com/jshttp/cookie/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "deprecated": false, - "description": "HTTP server cookie parsing and serialization", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "5.16.0", - "eslint-plugin-markdown": "1.0.0", - "istanbul": "0.4.5", - "mocha": "6.1.4" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "index.js" - ], - "homepage": "https://github.com/jshttp/cookie#readme", - "keywords": [ - "cookie", - "cookies" - ], - "license": "MIT", - "name": "cookie", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/cookie.git" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "version": "node scripts/version-history.js && git add HISTORY.md" - }, - "version": "0.4.0" -} diff --git a/Languages/APIs/movie-rating/node_modules/core-util-is/LICENSE b/Languages/APIs/movie-rating/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f9437..000000000 --- a/Languages/APIs/movie-rating/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/Languages/APIs/movie-rating/node_modules/core-util-is/README.md b/Languages/APIs/movie-rating/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b4149..000000000 --- a/Languages/APIs/movie-rating/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/Languages/APIs/movie-rating/node_modules/core-util-is/float.patch b/Languages/APIs/movie-rating/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05f..000000000 --- a/Languages/APIs/movie-rating/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/Languages/APIs/movie-rating/node_modules/core-util-is/lib/util.js b/Languages/APIs/movie-rating/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c0..000000000 --- a/Languages/APIs/movie-rating/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/Languages/APIs/movie-rating/node_modules/core-util-is/package.json b/Languages/APIs/movie-rating/node_modules/core-util-is/package.json deleted file mode 100644 index dc45f5d44..000000000 --- a/Languages/APIs/movie-rating/node_modules/core-util-is/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "core-util-is@1.0.2", - "_id": "core-util-is@1.0.2", - "_inBundle": false, - "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "_location": "/core-util-is", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "core-util-is@1.0.2", - "name": "core-util-is", - "escapedName": "core-util-is", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/verror" - ], - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_spec": "core-util-is@1.0.2", - "_where": "/Users/hegderajesh/Code/WebDev/APIs/movie-rating/node_modules/verror", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The `util.is*` functions introduced in Node v0.12.", - "devDependencies": { - "tap": "^2.3.0" - }, - "homepage": "https://github.com/isaacs/core-util-is#readme", - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "license": "MIT", - "main": "lib/util.js", - "name": "core-util-is", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "scripts": { - "test": "tap test.js" - }, - "version": "1.0.2" -} diff --git a/Languages/APIs/movie-rating/node_modules/core-util-is/test.js b/Languages/APIs/movie-rating/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65a..000000000 --- a/Languages/APIs/movie-rating/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/Languages/APIs/movie-rating/node_modules/dashdash/CHANGES.md b/Languages/APIs/movie-rating/node_modules/dashdash/CHANGES.md deleted file mode 100644 index d7c8f4ebe..000000000 --- a/Languages/APIs/movie-rating/node_modules/dashdash/CHANGES.md +++ /dev/null @@ -1,364 +0,0 @@ -# node-dashdash changelog - -## not yet released - -(nothing yet) - -## 1.14.1 - -- [issue #30] Change the output used by dashdash's Bash completion support to - indicate "there are no completions for this argument" to cope with different - sorting rules on different Bash/platforms. For example: - - $ triton -v -p test2 package get # before - ##-no -tritonpackage- completions-## - - $ triton -v -p test2 package get # after - ##-no-completion- -results-## - -## 1.14.0 - -- New `synopsisFromOpt(