diff options
| author | Kumar Priyansh <[email protected]> | 2020-01-03 18:34:23 +0530 |
|---|---|---|
| committer | Kumar Priyansh <[email protected]> | 2020-01-03 18:34:23 +0530 |
| commit | c3373becc9a1393b2e03c8cd6c154601481a60dd (patch) | |
| tree | a8a31f613aef864d8d481ed57dc2c97490dfd328 /cordova/node_modules/base64-js | |
| parent | 2917c8eda330a126b530dd83573670cbc98a4206 (diff) | |
| download | WeatherApp-c3373becc9a1393b2e03c8cd6c154601481a60dd.tar.xz WeatherApp-c3373becc9a1393b2e03c8cd6c154601481a60dd.zip | |
Rewriting the app from scratch with Swift 5
Diffstat (limited to 'cordova/node_modules/base64-js')
| -rwxr-xr-x | cordova/node_modules/base64-js/LICENSE | 21 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/README.md | 32 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/base64js.min.js | 1 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/index.js | 114 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/package.json | 66 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/test/big-data.js | 24 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/test/convert.js | 48 | ||||
| -rwxr-xr-x | cordova/node_modules/base64-js/test/url-safe.js | 18 |
8 files changed, 0 insertions, 324 deletions
diff --git a/cordova/node_modules/base64-js/LICENSE b/cordova/node_modules/base64-js/LICENSE deleted file mode 100755 index 96d3f68..0000000 --- a/cordova/node_modules/base64-js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - -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/cordova/node_modules/base64-js/README.md b/cordova/node_modules/base64-js/README.md deleted file mode 100755 index e546d86..0000000 --- a/cordova/node_modules/base64-js/README.md +++ /dev/null @@ -1,32 +0,0 @@ -base64-js -========= - -`base64-js` does basic base64 encoding/decoding in pure JS. - -[](http://travis-ci.org/beatgammit/base64-js) - -[](https://ci.testling.com/beatgammit/base64-js) - -Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. - -Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. - -## install - -With [npm](https://npmjs.org) do: - -`npm install base64-js` - -## methods - -`var base64 = require('base64-js')` - -`base64` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. - -* `byteLength` - Takes a base64 string and returns length of byte array -* `toByteArray` - Takes a base64 string and returns a byte array -* `fromByteArray` - Takes a byte array and returns a base64 string - -## license - -MIT diff --git a/cordova/node_modules/base64-js/base64js.min.js b/cordova/node_modules/base64-js/base64js.min.js deleted file mode 100755 index 22ad807..0000000 --- a/cordova/node_modules/base64-js/base64js.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,t;return function r(e,t,n){function o(i,a){if(!t[i]){if(!e[i]){var u=typeof require=="function"&&require;if(!a&&u)return u(i,!0);if(f)return f(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(r){var t=e[i][1][r];return o(t?t:r)},c,c.exports,r,e,t,n)}return t[i].exports}var f=typeof require=="function"&&require;for(var i=0;i<n.length;i++)o(n[i]);return o}({"/":[function(r,e,t){"use strict";t.byteLength=c;t.toByteArray=v;t.fromByteArray=s;var n=[];var o=[];var f=typeof Uint8Array!=="undefined"?Uint8Array:Array;var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var a=0,u=i.length;a<u;++a){n[a]=i[a];o[i.charCodeAt(a)]=a}o["-".charCodeAt(0)]=62;o["_".charCodeAt(0)]=63;function d(r){var e=r.length;if(e%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}return r[e-2]==="="?2:r[e-1]==="="?1:0}function c(r){return r.length*3/4-d(r)}function v(r){var e,t,n,i,a,u;var c=r.length;a=d(r);u=new f(c*3/4-a);n=a>0?c-4:c;var v=0;for(e=0,t=0;e<n;e+=4,t+=3){i=o[r.charCodeAt(e)]<<18|o[r.charCodeAt(e+1)]<<12|o[r.charCodeAt(e+2)]<<6|o[r.charCodeAt(e+3)];u[v++]=i>>16&255;u[v++]=i>>8&255;u[v++]=i&255}if(a===2){i=o[r.charCodeAt(e)]<<2|o[r.charCodeAt(e+1)]>>4;u[v++]=i&255}else if(a===1){i=o[r.charCodeAt(e)]<<10|o[r.charCodeAt(e+1)]<<4|o[r.charCodeAt(e+2)]>>2;u[v++]=i>>8&255;u[v++]=i&255}return u}function l(r){return n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[r&63]}function h(r,e,t){var n;var o=[];for(var f=e;f<t;f+=3){n=(r[f]<<16)+(r[f+1]<<8)+r[f+2];o.push(l(n))}return o.join("")}function s(r){var e;var t=r.length;var o=t%3;var f="";var i=[];var a=16383;for(var u=0,d=t-o;u<d;u+=a){i.push(h(r,u,u+a>d?d:u+a))}if(o===1){e=r[t-1];f+=n[e>>2];f+=n[e<<4&63];f+="=="}else if(o===2){e=(r[t-2]<<8)+r[t-1];f+=n[e>>10];f+=n[e>>4&63];f+=n[e<<2&63];f+="="}i.push(f);return i.join("")}},{}]},{},[])("/")}); diff --git a/cordova/node_modules/base64-js/index.js b/cordova/node_modules/base64-js/index.js deleted file mode 100755 index 8e806ac..0000000 --- a/cordova/node_modules/base64-js/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict' - -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function placeHoldersCount (b64) { - var len = b64.length - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 -} - -function byteLength (b64) { - // base64 is 4/3 + up to two characters of the original data - return b64.length * 3 / 4 - placeHoldersCount(b64) -} - -function toByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - var len = b64.length - placeHolders = placeHoldersCount(b64) - - arr = new Arr(len * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len - - var L = 0 - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] - arr[L++] = (tmp >> 16) & 0xFF - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[L++] = tmp & 0xFF - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var output = '' - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - output += lookup[tmp >> 2] - output += lookup[(tmp << 4) & 0x3F] - output += '==' - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) - output += lookup[tmp >> 10] - output += lookup[(tmp >> 4) & 0x3F] - output += lookup[(tmp << 2) & 0x3F] - output += '=' - } - - parts.push(output) - - return parts.join('') -} diff --git a/cordova/node_modules/base64-js/package.json b/cordova/node_modules/base64-js/package.json deleted file mode 100755 index 0d38483..0000000 --- a/cordova/node_modules/base64-js/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "[email protected]", - "_id": "[email protected]", - "_inBundle": true, - "_integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=", - "_location": "/cordova-ios/base64-js", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "[email protected]", - "name": "base64-js", - "escapedName": "base64-js", - "rawSpec": "1.2.0", - "saveSpec": null, - "fetchSpec": "1.2.0" - }, - "_requiredBy": [ - "/cordova-ios", - "/cordova-ios/plist" - ], - "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", - "_shasum": "a39992d723584811982be5e290bb6a53d86700f1", - "_spec": "[email protected]", - "_where": "/Users/brodybits/Documents/cordova/cordova-ios/node_modules/plist", - "author": { - "name": "T. Jameson Little", - "email": "[email protected]" - }, - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Base64 encoding/decoding in pure JS", - "devDependencies": { - "benchmark": "^2.1.0", - "browserify": "^13.0.0", - "standard": "*", - "tape": "4.x", - "uglify-js": "^2.6.2" - }, - "files": [ - "test", - "index.js", - "base64js.min.js" - ], - "homepage": "https://github.com/beatgammit/base64-js", - "keywords": [ - "base64" - ], - "license": "MIT", - "main": "index.js", - "name": "base64-js", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "scripts": { - "build": "browserify -s base64js -r ./ | uglifyjs -m > base64js.min.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "version": "1.2.0" -} diff --git a/cordova/node_modules/base64-js/test/big-data.js b/cordova/node_modules/base64-js/test/big-data.js deleted file mode 100755 index be16ebe..0000000 --- a/cordova/node_modules/base64-js/test/big-data.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tape') -var b64 = require('../') - -test('convert big data to base64', function (t) { - var b64str, arr, i, length - var big = new Uint8Array(64 * 1024 * 1024) - for (i = 0, length = big.length; i < length; ++i) { - big[i] = i % 256 - } - b64str = b64.fromByteArray(big) - arr = b64.toByteArray(b64str) - t.ok(equal(arr, big)) - t.end() -}) - -function equal (a, b) { - var i - var length = a.length - if (length !== b.length) return false - for (i = 0; i < length; ++i) { - if (a[i] !== b[i]) return false - } - return true -} diff --git a/cordova/node_modules/base64-js/test/convert.js b/cordova/node_modules/base64-js/test/convert.js deleted file mode 100755 index d68e105..0000000 --- a/cordova/node_modules/base64-js/test/convert.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tape') -var b64 = require('../') -var checks = [ - 'a', - 'aa', - 'aaa', - 'hi', - 'hi!', - 'hi!!', - 'sup', - 'sup?', - 'sup?!' -] - -test('convert to base64 and back', function (t) { - t.plan(checks.length * 2) - - for (var i = 0; i < checks.length; i++) { - var check = checks[i] - var b64Str, arr, str - - b64Str = b64.fromByteArray(map(check, function (char) { return char.charCodeAt(0) })) - - arr = b64.toByteArray(b64Str) - str = map(arr, function (byte) { return String.fromCharCode(byte) }).join('') - - t.equal(check, str, 'Checked ' + check) - t.equal(b64.byteLength(b64Str), arr.length, 'Checked length for ' + check) - } -}) - -function map (arr, callback) { - var res = [] - var kValue, mappedValue - - for (var k = 0, len = arr.length; k < len; k++) { - if ((typeof arr === 'string' && !!arr.charAt(k))) { - kValue = arr.charAt(k) - mappedValue = callback(kValue, k, arr) - res[k] = mappedValue - } else if (typeof arr !== 'string' && k in arr) { - kValue = arr[k] - mappedValue = callback(kValue, k, arr) - res[k] = mappedValue - } - } - return res -} diff --git a/cordova/node_modules/base64-js/test/url-safe.js b/cordova/node_modules/base64-js/test/url-safe.js deleted file mode 100755 index 3203b33..0000000 --- a/cordova/node_modules/base64-js/test/url-safe.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape') -var b64 = require('../') - -test('decode url-safe style base64 strings', function (t) { - var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff] - - var actual = b64.toByteArray('//++/++/++//') - for (var i = 0; i < actual.length; i++) { - t.equal(actual[i], expected[i]) - } - - actual = b64.toByteArray('__--_--_--__') - for (i = 0; i < actual.length; i++) { - t.equal(actual[i], expected[i]) - } - - t.end() -}) |
