@aligent/cdk-prerender-proxy 0.2.5-experimental → 0.2.5-experimental2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/error-response-construct.d.ts +0 -1
- package/lib/error-response-construct.js +4 -5
- package/lib/handlers/cache-control.ts +21 -0
- package/lib/handlers/error-response.ts +51 -0
- package/lib/handlers/node_modules/.package-lock.json +55 -0
- package/lib/handlers/node_modules/@types/aws-lambda/LICENSE +21 -0
- package/lib/handlers/node_modules/@types/aws-lambda/README.md +16 -0
- package/lib/handlers/node_modules/@types/aws-lambda/common/api-gateway.d.ts +79 -0
- package/lib/handlers/node_modules/@types/aws-lambda/common/cloudfront.d.ts +79 -0
- package/lib/handlers/node_modules/@types/aws-lambda/handler.d.ts +171 -0
- package/lib/handlers/node_modules/@types/aws-lambda/index.d.ts +85 -0
- package/lib/handlers/node_modules/@types/aws-lambda/package.json +210 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/alb.d.ts +48 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts +174 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +187 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts +51 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts +68 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts +20 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts +21 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts +8 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts +37 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts +104 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts +31 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts +32 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts +23 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts +11 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline.d.ts +55 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts +41 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts +22 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts +86 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts +44 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts +21 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts +119 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts +15 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts +22 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts +15 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts +31 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts +45 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts +39 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts +20 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts +65 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts +45 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/eventbridge.d.ts +18 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/iot.d.ts +28 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts +45 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts +28 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/lex.d.ts +116 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/msk.d.ts +21 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3-batch.d.ts +41 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3.d.ts +60 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/ses.d.ts +103 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/sns.d.ts +38 -0
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/sqs.d.ts +46 -0
- package/lib/handlers/node_modules/@types/node/LICENSE +21 -0
- package/lib/handlers/node_modules/@types/node/README.md +16 -0
- package/lib/handlers/node_modules/@types/node/assert/strict.d.ts +4 -0
- package/lib/handlers/node_modules/@types/node/assert.d.ts +124 -0
- package/lib/handlers/node_modules/@types/node/async_hooks.d.ts +226 -0
- package/lib/handlers/node_modules/@types/node/base.d.ts +19 -0
- package/lib/handlers/node_modules/@types/node/buffer.d.ts +84 -0
- package/lib/handlers/node_modules/@types/node/child_process.d.ts +526 -0
- package/lib/handlers/node_modules/@types/node/cluster.d.ts +262 -0
- package/lib/handlers/node_modules/@types/node/console.d.ts +133 -0
- package/lib/handlers/node_modules/@types/node/constants.d.ts +13 -0
- package/lib/handlers/node_modules/@types/node/crypto.d.ts +1580 -0
- package/lib/handlers/node_modules/@types/node/dgram.d.ts +141 -0
- package/lib/handlers/node_modules/@types/node/diagnostic_channel.d.ts +34 -0
- package/lib/handlers/node_modules/@types/node/dns/promises.d.ts +97 -0
- package/lib/handlers/node_modules/@types/node/dns.d.ts +322 -0
- package/lib/handlers/node_modules/@types/node/domain.d.ts +24 -0
- package/lib/handlers/node_modules/@types/node/events.d.ts +93 -0
- package/lib/handlers/node_modules/@types/node/fs/promises.d.ts +592 -0
- package/lib/handlers/node_modules/@types/node/fs.d.ts +2239 -0
- package/lib/handlers/node_modules/@types/node/globals.d.ts +655 -0
- package/lib/handlers/node_modules/@types/node/globals.global.d.ts +1 -0
- package/lib/handlers/node_modules/@types/node/http.d.ts +434 -0
- package/lib/handlers/node_modules/@types/node/http2.d.ts +976 -0
- package/lib/handlers/node_modules/@types/node/https.d.ts +36 -0
- package/lib/handlers/node_modules/@types/node/index.d.ts +58 -0
- package/lib/handlers/node_modules/@types/node/inspector.d.ts +3041 -0
- package/lib/handlers/node_modules/@types/node/module.d.ts +52 -0
- package/lib/handlers/node_modules/@types/node/net.d.ts +326 -0
- package/lib/handlers/node_modules/@types/node/os.d.ts +239 -0
- package/lib/handlers/node_modules/@types/node/package.json +232 -0
- package/lib/handlers/node_modules/@types/node/path.d.ts +163 -0
- package/lib/handlers/node_modules/@types/node/perf_hooks.d.ts +310 -0
- package/lib/handlers/node_modules/@types/node/process.d.ts +461 -0
- package/lib/handlers/node_modules/@types/node/punycode.d.ts +75 -0
- package/lib/handlers/node_modules/@types/node/querystring.d.ts +28 -0
- package/lib/handlers/node_modules/@types/node/readline.d.ts +192 -0
- package/lib/handlers/node_modules/@types/node/repl.d.ts +395 -0
- package/lib/handlers/node_modules/@types/node/stream/promises.d.ts +67 -0
- package/lib/handlers/node_modules/@types/node/stream.d.ts +471 -0
- package/lib/handlers/node_modules/@types/node/string_decoder.d.ts +7 -0
- package/lib/handlers/node_modules/@types/node/timers/promises.d.ts +21 -0
- package/lib/handlers/node_modules/@types/node/timers.d.ts +27 -0
- package/lib/handlers/node_modules/@types/node/tls.d.ts +793 -0
- package/lib/handlers/node_modules/@types/node/trace_events.d.ts +61 -0
- package/lib/handlers/node_modules/@types/node/ts3.6/assert.d.ts +98 -0
- package/lib/handlers/node_modules/@types/node/ts3.6/base.d.ts +68 -0
- package/lib/handlers/node_modules/@types/node/ts3.6/index.d.ts +7 -0
- package/lib/handlers/node_modules/@types/node/tty.d.ts +66 -0
- package/lib/handlers/node_modules/@types/node/url.d.ts +116 -0
- package/lib/handlers/node_modules/@types/node/util/types.d.ts +53 -0
- package/lib/handlers/node_modules/@types/node/util.d.ts +156 -0
- package/lib/handlers/node_modules/@types/node/v8.d.ts +198 -0
- package/lib/handlers/node_modules/@types/node/vm.d.ts +152 -0
- package/lib/handlers/node_modules/@types/node/wasi.d.ts +86 -0
- package/lib/handlers/node_modules/@types/node/worker_threads.d.ts +282 -0
- package/lib/handlers/node_modules/@types/node/zlib.d.ts +361 -0
- package/lib/handlers/node_modules/axios/CHANGELOG.md +685 -0
- package/lib/handlers/node_modules/axios/LICENSE +19 -0
- package/lib/handlers/node_modules/axios/README.md +800 -0
- package/lib/handlers/node_modules/axios/UPGRADE_GUIDE.md +162 -0
- package/lib/handlers/node_modules/axios/dist/axios.js +1756 -0
- package/lib/handlers/node_modules/axios/dist/axios.map +1 -0
- package/lib/handlers/node_modules/axios/dist/axios.min.js +3 -0
- package/lib/handlers/node_modules/axios/dist/axios.min.map +1 -0
- package/lib/handlers/node_modules/axios/index.d.ts +161 -0
- package/lib/handlers/node_modules/axios/index.js +1 -0
- package/lib/handlers/node_modules/axios/lib/adapters/README.md +37 -0
- package/lib/handlers/node_modules/axios/lib/adapters/http.js +303 -0
- package/lib/handlers/node_modules/axios/lib/adapters/xhr.js +179 -0
- package/lib/handlers/node_modules/axios/lib/axios.js +56 -0
- package/lib/handlers/node_modules/axios/lib/cancel/Cancel.js +19 -0
- package/lib/handlers/node_modules/axios/lib/cancel/CancelToken.js +57 -0
- package/lib/handlers/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/lib/handlers/node_modules/axios/lib/core/Axios.js +95 -0
- package/lib/handlers/node_modules/axios/lib/core/InterceptorManager.js +52 -0
- package/lib/handlers/node_modules/axios/lib/core/README.md +7 -0
- package/lib/handlers/node_modules/axios/lib/core/buildFullPath.js +20 -0
- package/lib/handlers/node_modules/axios/lib/core/createError.js +18 -0
- package/lib/handlers/node_modules/axios/lib/core/dispatchRequest.js +79 -0
- package/lib/handlers/node_modules/axios/lib/core/enhanceError.js +42 -0
- package/lib/handlers/node_modules/axios/lib/core/mergeConfig.js +87 -0
- package/lib/handlers/node_modules/axios/lib/core/settle.js +25 -0
- package/lib/handlers/node_modules/axios/lib/core/transformData.js +20 -0
- package/lib/handlers/node_modules/axios/lib/defaults.js +98 -0
- package/lib/handlers/node_modules/axios/lib/helpers/README.md +7 -0
- package/lib/handlers/node_modules/axios/lib/helpers/bind.js +11 -0
- package/lib/handlers/node_modules/axios/lib/helpers/buildURL.js +70 -0
- package/lib/handlers/node_modules/axios/lib/helpers/combineURLs.js +14 -0
- package/lib/handlers/node_modules/axios/lib/helpers/cookies.js +53 -0
- package/lib/handlers/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
- package/lib/handlers/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
- package/lib/handlers/node_modules/axios/lib/helpers/isAxiosError.js +11 -0
- package/lib/handlers/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
- package/lib/handlers/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- package/lib/handlers/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
- package/lib/handlers/node_modules/axios/lib/helpers/spread.js +27 -0
- package/lib/handlers/node_modules/axios/lib/utils.js +351 -0
- package/lib/handlers/node_modules/axios/package.json +86 -0
- package/lib/handlers/node_modules/buffer-from/LICENSE +21 -0
- package/lib/handlers/node_modules/buffer-from/index.js +69 -0
- package/lib/handlers/node_modules/buffer-from/package.json +19 -0
- package/lib/handlers/node_modules/buffer-from/readme.md +69 -0
- package/lib/handlers/node_modules/follow-redirects/LICENSE +18 -0
- package/lib/handlers/node_modules/follow-redirects/README.md +148 -0
- package/lib/handlers/node_modules/follow-redirects/debug.js +14 -0
- package/lib/handlers/node_modules/follow-redirects/http.js +1 -0
- package/lib/handlers/node_modules/follow-redirects/https.js +1 -0
- package/lib/handlers/node_modules/follow-redirects/index.js +531 -0
- package/lib/handlers/node_modules/follow-redirects/package.json +59 -0
- package/lib/handlers/node_modules/source-map/CHANGELOG.md +301 -0
- package/lib/handlers/node_modules/source-map/LICENSE +28 -0
- package/lib/handlers/node_modules/source-map/README.md +742 -0
- package/lib/handlers/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/lib/handlers/node_modules/source-map/dist/source-map.js +3233 -0
- package/lib/handlers/node_modules/source-map/dist/source-map.min.js +2 -0
- package/lib/handlers/node_modules/source-map/dist/source-map.min.js.map +1 -0
- package/lib/handlers/node_modules/source-map/lib/array-set.js +121 -0
- package/lib/handlers/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/lib/handlers/node_modules/source-map/lib/base64.js +67 -0
- package/lib/handlers/node_modules/source-map/lib/binary-search.js +111 -0
- package/lib/handlers/node_modules/source-map/lib/mapping-list.js +79 -0
- package/lib/handlers/node_modules/source-map/lib/quick-sort.js +114 -0
- package/lib/handlers/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/lib/handlers/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/lib/handlers/node_modules/source-map/lib/source-node.js +413 -0
- package/lib/handlers/node_modules/source-map/lib/util.js +488 -0
- package/lib/handlers/node_modules/source-map/package.json +73 -0
- package/lib/handlers/node_modules/source-map/source-map.d.ts +98 -0
- package/lib/handlers/node_modules/source-map/source-map.js +8 -0
- package/lib/handlers/node_modules/source-map-support/LICENSE.md +21 -0
- package/lib/handlers/node_modules/source-map-support/README.md +284 -0
- package/lib/handlers/node_modules/source-map-support/browser-source-map-support.js +114 -0
- package/lib/handlers/node_modules/source-map-support/package.json +31 -0
- package/lib/handlers/node_modules/source-map-support/register.js +1 -0
- package/lib/handlers/node_modules/source-map-support/source-map-support.js +604 -0
- package/lib/handlers/package-lock.json +108 -0
- package/lib/handlers/package.json +13 -0
- package/lib/handlers/prerender-check.ts +27 -0
- package/lib/handlers/prerender.ts +43 -0
- package/lib/handlers/tsconfig.json +24 -0
- package/lib/prerender-cf-cache-control-construct.d.ts +0 -1
- package/lib/prerender-cf-cache-control-construct.js +4 -5
- package/lib/prerender-check-construct.d.ts +0 -1
- package/lib/prerender-check-construct.js +4 -5
- package/lib/prerender-construct.d.ts +0 -1
- package/lib/prerender-construct.js +4 -5
- package/package.json +3 -3
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var bind = require('./helpers/bind');
|
|
4
|
+
|
|
5
|
+
/*global toString:true*/
|
|
6
|
+
|
|
7
|
+
// utils is a library of generic helper functions non-specific to axios
|
|
8
|
+
|
|
9
|
+
var toString = Object.prototype.toString;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Determine if a value is an Array
|
|
13
|
+
*
|
|
14
|
+
* @param {Object} val The value to test
|
|
15
|
+
* @returns {boolean} True if value is an Array, otherwise false
|
|
16
|
+
*/
|
|
17
|
+
function isArray(val) {
|
|
18
|
+
return toString.call(val) === '[object Array]';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Determine if a value is undefined
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} val The value to test
|
|
25
|
+
* @returns {boolean} True if the value is undefined, otherwise false
|
|
26
|
+
*/
|
|
27
|
+
function isUndefined(val) {
|
|
28
|
+
return typeof val === 'undefined';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Determine if a value is a Buffer
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} val The value to test
|
|
35
|
+
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
36
|
+
*/
|
|
37
|
+
function isBuffer(val) {
|
|
38
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
39
|
+
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Determine if a value is an ArrayBuffer
|
|
44
|
+
*
|
|
45
|
+
* @param {Object} val The value to test
|
|
46
|
+
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
47
|
+
*/
|
|
48
|
+
function isArrayBuffer(val) {
|
|
49
|
+
return toString.call(val) === '[object ArrayBuffer]';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Determine if a value is a FormData
|
|
54
|
+
*
|
|
55
|
+
* @param {Object} val The value to test
|
|
56
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
|
57
|
+
*/
|
|
58
|
+
function isFormData(val) {
|
|
59
|
+
return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Determine if a value is a view on an ArrayBuffer
|
|
64
|
+
*
|
|
65
|
+
* @param {Object} val The value to test
|
|
66
|
+
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
|
67
|
+
*/
|
|
68
|
+
function isArrayBufferView(val) {
|
|
69
|
+
var result;
|
|
70
|
+
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
71
|
+
result = ArrayBuffer.isView(val);
|
|
72
|
+
} else {
|
|
73
|
+
result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Determine if a value is a String
|
|
80
|
+
*
|
|
81
|
+
* @param {Object} val The value to test
|
|
82
|
+
* @returns {boolean} True if value is a String, otherwise false
|
|
83
|
+
*/
|
|
84
|
+
function isString(val) {
|
|
85
|
+
return typeof val === 'string';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Determine if a value is a Number
|
|
90
|
+
*
|
|
91
|
+
* @param {Object} val The value to test
|
|
92
|
+
* @returns {boolean} True if value is a Number, otherwise false
|
|
93
|
+
*/
|
|
94
|
+
function isNumber(val) {
|
|
95
|
+
return typeof val === 'number';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Determine if a value is an Object
|
|
100
|
+
*
|
|
101
|
+
* @param {Object} val The value to test
|
|
102
|
+
* @returns {boolean} True if value is an Object, otherwise false
|
|
103
|
+
*/
|
|
104
|
+
function isObject(val) {
|
|
105
|
+
return val !== null && typeof val === 'object';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Determine if a value is a plain Object
|
|
110
|
+
*
|
|
111
|
+
* @param {Object} val The value to test
|
|
112
|
+
* @return {boolean} True if value is a plain Object, otherwise false
|
|
113
|
+
*/
|
|
114
|
+
function isPlainObject(val) {
|
|
115
|
+
if (toString.call(val) !== '[object Object]') {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var prototype = Object.getPrototypeOf(val);
|
|
120
|
+
return prototype === null || prototype === Object.prototype;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Determine if a value is a Date
|
|
125
|
+
*
|
|
126
|
+
* @param {Object} val The value to test
|
|
127
|
+
* @returns {boolean} True if value is a Date, otherwise false
|
|
128
|
+
*/
|
|
129
|
+
function isDate(val) {
|
|
130
|
+
return toString.call(val) === '[object Date]';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Determine if a value is a File
|
|
135
|
+
*
|
|
136
|
+
* @param {Object} val The value to test
|
|
137
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
138
|
+
*/
|
|
139
|
+
function isFile(val) {
|
|
140
|
+
return toString.call(val) === '[object File]';
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Determine if a value is a Blob
|
|
145
|
+
*
|
|
146
|
+
* @param {Object} val The value to test
|
|
147
|
+
* @returns {boolean} True if value is a Blob, otherwise false
|
|
148
|
+
*/
|
|
149
|
+
function isBlob(val) {
|
|
150
|
+
return toString.call(val) === '[object Blob]';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Determine if a value is a Function
|
|
155
|
+
*
|
|
156
|
+
* @param {Object} val The value to test
|
|
157
|
+
* @returns {boolean} True if value is a Function, otherwise false
|
|
158
|
+
*/
|
|
159
|
+
function isFunction(val) {
|
|
160
|
+
return toString.call(val) === '[object Function]';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Determine if a value is a Stream
|
|
165
|
+
*
|
|
166
|
+
* @param {Object} val The value to test
|
|
167
|
+
* @returns {boolean} True if value is a Stream, otherwise false
|
|
168
|
+
*/
|
|
169
|
+
function isStream(val) {
|
|
170
|
+
return isObject(val) && isFunction(val.pipe);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Determine if a value is a URLSearchParams object
|
|
175
|
+
*
|
|
176
|
+
* @param {Object} val The value to test
|
|
177
|
+
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
178
|
+
*/
|
|
179
|
+
function isURLSearchParams(val) {
|
|
180
|
+
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Trim excess whitespace off the beginning and end of a string
|
|
185
|
+
*
|
|
186
|
+
* @param {String} str The String to trim
|
|
187
|
+
* @returns {String} The String freed of excess whitespace
|
|
188
|
+
*/
|
|
189
|
+
function trim(str) {
|
|
190
|
+
return str.replace(/^\s*/, '').replace(/\s*$/, '');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Determine if we're running in a standard browser environment
|
|
195
|
+
*
|
|
196
|
+
* This allows axios to run in a web worker, and react-native.
|
|
197
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
198
|
+
*
|
|
199
|
+
* web workers:
|
|
200
|
+
* typeof window -> undefined
|
|
201
|
+
* typeof document -> undefined
|
|
202
|
+
*
|
|
203
|
+
* react-native:
|
|
204
|
+
* navigator.product -> 'ReactNative'
|
|
205
|
+
* nativescript
|
|
206
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
207
|
+
*/
|
|
208
|
+
function isStandardBrowserEnv() {
|
|
209
|
+
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
|
210
|
+
navigator.product === 'NativeScript' ||
|
|
211
|
+
navigator.product === 'NS')) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
return (
|
|
215
|
+
typeof window !== 'undefined' &&
|
|
216
|
+
typeof document !== 'undefined'
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Iterate over an Array or an Object invoking a function for each item.
|
|
222
|
+
*
|
|
223
|
+
* If `obj` is an Array callback will be called passing
|
|
224
|
+
* the value, index, and complete array for each item.
|
|
225
|
+
*
|
|
226
|
+
* If 'obj' is an Object callback will be called passing
|
|
227
|
+
* the value, key, and complete object for each property.
|
|
228
|
+
*
|
|
229
|
+
* @param {Object|Array} obj The object to iterate
|
|
230
|
+
* @param {Function} fn The callback to invoke for each item
|
|
231
|
+
*/
|
|
232
|
+
function forEach(obj, fn) {
|
|
233
|
+
// Don't bother if no value provided
|
|
234
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Force an array if not already something iterable
|
|
239
|
+
if (typeof obj !== 'object') {
|
|
240
|
+
/*eslint no-param-reassign:0*/
|
|
241
|
+
obj = [obj];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (isArray(obj)) {
|
|
245
|
+
// Iterate over array values
|
|
246
|
+
for (var i = 0, l = obj.length; i < l; i++) {
|
|
247
|
+
fn.call(null, obj[i], i, obj);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
// Iterate over object keys
|
|
251
|
+
for (var key in obj) {
|
|
252
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
253
|
+
fn.call(null, obj[key], key, obj);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Accepts varargs expecting each argument to be an object, then
|
|
261
|
+
* immutably merges the properties of each object and returns result.
|
|
262
|
+
*
|
|
263
|
+
* When multiple objects contain the same key the later object in
|
|
264
|
+
* the arguments list will take precedence.
|
|
265
|
+
*
|
|
266
|
+
* Example:
|
|
267
|
+
*
|
|
268
|
+
* ```js
|
|
269
|
+
* var result = merge({foo: 123}, {foo: 456});
|
|
270
|
+
* console.log(result.foo); // outputs 456
|
|
271
|
+
* ```
|
|
272
|
+
*
|
|
273
|
+
* @param {Object} obj1 Object to merge
|
|
274
|
+
* @returns {Object} Result of all merge properties
|
|
275
|
+
*/
|
|
276
|
+
function merge(/* obj1, obj2, obj3, ... */) {
|
|
277
|
+
var result = {};
|
|
278
|
+
function assignValue(val, key) {
|
|
279
|
+
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
|
280
|
+
result[key] = merge(result[key], val);
|
|
281
|
+
} else if (isPlainObject(val)) {
|
|
282
|
+
result[key] = merge({}, val);
|
|
283
|
+
} else if (isArray(val)) {
|
|
284
|
+
result[key] = val.slice();
|
|
285
|
+
} else {
|
|
286
|
+
result[key] = val;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
291
|
+
forEach(arguments[i], assignValue);
|
|
292
|
+
}
|
|
293
|
+
return result;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Extends object a by mutably adding to it the properties of object b.
|
|
298
|
+
*
|
|
299
|
+
* @param {Object} a The object to be extended
|
|
300
|
+
* @param {Object} b The object to copy properties from
|
|
301
|
+
* @param {Object} thisArg The object to bind function to
|
|
302
|
+
* @return {Object} The resulting value of object a
|
|
303
|
+
*/
|
|
304
|
+
function extend(a, b, thisArg) {
|
|
305
|
+
forEach(b, function assignValue(val, key) {
|
|
306
|
+
if (thisArg && typeof val === 'function') {
|
|
307
|
+
a[key] = bind(val, thisArg);
|
|
308
|
+
} else {
|
|
309
|
+
a[key] = val;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
return a;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
317
|
+
*
|
|
318
|
+
* @param {string} content with BOM
|
|
319
|
+
* @return {string} content value without BOM
|
|
320
|
+
*/
|
|
321
|
+
function stripBOM(content) {
|
|
322
|
+
if (content.charCodeAt(0) === 0xFEFF) {
|
|
323
|
+
content = content.slice(1);
|
|
324
|
+
}
|
|
325
|
+
return content;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
module.exports = {
|
|
329
|
+
isArray: isArray,
|
|
330
|
+
isArrayBuffer: isArrayBuffer,
|
|
331
|
+
isBuffer: isBuffer,
|
|
332
|
+
isFormData: isFormData,
|
|
333
|
+
isArrayBufferView: isArrayBufferView,
|
|
334
|
+
isString: isString,
|
|
335
|
+
isNumber: isNumber,
|
|
336
|
+
isObject: isObject,
|
|
337
|
+
isPlainObject: isPlainObject,
|
|
338
|
+
isUndefined: isUndefined,
|
|
339
|
+
isDate: isDate,
|
|
340
|
+
isFile: isFile,
|
|
341
|
+
isBlob: isBlob,
|
|
342
|
+
isFunction: isFunction,
|
|
343
|
+
isStream: isStream,
|
|
344
|
+
isURLSearchParams: isURLSearchParams,
|
|
345
|
+
isStandardBrowserEnv: isStandardBrowserEnv,
|
|
346
|
+
forEach: forEach,
|
|
347
|
+
merge: merge,
|
|
348
|
+
extend: extend,
|
|
349
|
+
trim: trim,
|
|
350
|
+
stripBOM: stripBOM
|
|
351
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "axios",
|
|
3
|
+
"version": "0.21.1",
|
|
4
|
+
"description": "Promise based HTTP client for the browser and node.js",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "grunt test && bundlesize",
|
|
8
|
+
"start": "node ./sandbox/server.js",
|
|
9
|
+
"build": "NODE_ENV=production grunt build",
|
|
10
|
+
"preversion": "npm test",
|
|
11
|
+
"version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
|
|
12
|
+
"postversion": "git push && git push --tags",
|
|
13
|
+
"examples": "node ./examples/server.js",
|
|
14
|
+
"coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
15
|
+
"fix": "eslint --fix lib/**/*.js"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/axios/axios.git"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"xhr",
|
|
23
|
+
"http",
|
|
24
|
+
"ajax",
|
|
25
|
+
"promise",
|
|
26
|
+
"node"
|
|
27
|
+
],
|
|
28
|
+
"author": "Matt Zabriskie",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/axios/axios/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/axios/axios",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"bundlesize": "^0.17.0",
|
|
36
|
+
"coveralls": "^3.0.0",
|
|
37
|
+
"es6-promise": "^4.2.4",
|
|
38
|
+
"grunt": "^1.0.2",
|
|
39
|
+
"grunt-banner": "^0.6.0",
|
|
40
|
+
"grunt-cli": "^1.2.0",
|
|
41
|
+
"grunt-contrib-clean": "^1.1.0",
|
|
42
|
+
"grunt-contrib-watch": "^1.0.0",
|
|
43
|
+
"grunt-eslint": "^20.1.0",
|
|
44
|
+
"grunt-karma": "^2.0.0",
|
|
45
|
+
"grunt-mocha-test": "^0.13.3",
|
|
46
|
+
"grunt-ts": "^6.0.0-beta.19",
|
|
47
|
+
"grunt-webpack": "^1.0.18",
|
|
48
|
+
"istanbul-instrumenter-loader": "^1.0.0",
|
|
49
|
+
"jasmine-core": "^2.4.1",
|
|
50
|
+
"karma": "^1.3.0",
|
|
51
|
+
"karma-chrome-launcher": "^2.2.0",
|
|
52
|
+
"karma-coverage": "^1.1.1",
|
|
53
|
+
"karma-firefox-launcher": "^1.1.0",
|
|
54
|
+
"karma-jasmine": "^1.1.1",
|
|
55
|
+
"karma-jasmine-ajax": "^0.1.13",
|
|
56
|
+
"karma-opera-launcher": "^1.0.0",
|
|
57
|
+
"karma-safari-launcher": "^1.0.0",
|
|
58
|
+
"karma-sauce-launcher": "^1.2.0",
|
|
59
|
+
"karma-sinon": "^1.0.5",
|
|
60
|
+
"karma-sourcemap-loader": "^0.3.7",
|
|
61
|
+
"karma-webpack": "^1.7.0",
|
|
62
|
+
"load-grunt-tasks": "^3.5.2",
|
|
63
|
+
"minimist": "^1.2.0",
|
|
64
|
+
"mocha": "^5.2.0",
|
|
65
|
+
"sinon": "^4.5.0",
|
|
66
|
+
"typescript": "^2.8.1",
|
|
67
|
+
"url-search-params": "^0.10.0",
|
|
68
|
+
"webpack": "^1.13.1",
|
|
69
|
+
"webpack-dev-server": "^1.14.1"
|
|
70
|
+
},
|
|
71
|
+
"browser": {
|
|
72
|
+
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
73
|
+
},
|
|
74
|
+
"jsdelivr": "dist/axios.min.js",
|
|
75
|
+
"unpkg": "dist/axios.min.js",
|
|
76
|
+
"typings": "./index.d.ts",
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"follow-redirects": "^1.10.0"
|
|
79
|
+
},
|
|
80
|
+
"bundlesize": [
|
|
81
|
+
{
|
|
82
|
+
"path": "./dist/axios.min.js",
|
|
83
|
+
"threshold": "5kB"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016, 2018 Linus Unnebäck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var toString = Object.prototype.toString
|
|
2
|
+
|
|
3
|
+
var isModern = (
|
|
4
|
+
typeof Buffer.alloc === 'function' &&
|
|
5
|
+
typeof Buffer.allocUnsafe === 'function' &&
|
|
6
|
+
typeof Buffer.from === 'function'
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
function isArrayBuffer (input) {
|
|
10
|
+
return toString.call(input).slice(8, -1) === 'ArrayBuffer'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function fromArrayBuffer (obj, byteOffset, length) {
|
|
14
|
+
byteOffset >>>= 0
|
|
15
|
+
|
|
16
|
+
var maxLength = obj.byteLength - byteOffset
|
|
17
|
+
|
|
18
|
+
if (maxLength < 0) {
|
|
19
|
+
throw new RangeError("'offset' is out of bounds")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (length === undefined) {
|
|
23
|
+
length = maxLength
|
|
24
|
+
} else {
|
|
25
|
+
length >>>= 0
|
|
26
|
+
|
|
27
|
+
if (length > maxLength) {
|
|
28
|
+
throw new RangeError("'length' is out of bounds")
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return isModern
|
|
33
|
+
? Buffer.from(obj.slice(byteOffset, byteOffset + length))
|
|
34
|
+
: new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)))
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function fromString (string, encoding) {
|
|
38
|
+
if (typeof encoding !== 'string' || encoding === '') {
|
|
39
|
+
encoding = 'utf8'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!Buffer.isEncoding(encoding)) {
|
|
43
|
+
throw new TypeError('"encoding" must be a valid string encoding')
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return isModern
|
|
47
|
+
? Buffer.from(string, encoding)
|
|
48
|
+
: new Buffer(string, encoding)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function bufferFrom (value, encodingOrOffset, length) {
|
|
52
|
+
if (typeof value === 'number') {
|
|
53
|
+
throw new TypeError('"value" argument must not be a number')
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isArrayBuffer(value)) {
|
|
57
|
+
return fromArrayBuffer(value, encodingOrOffset, length)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (typeof value === 'string') {
|
|
61
|
+
return fromString(value, encodingOrOffset)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return isModern
|
|
65
|
+
? Buffer.from(value)
|
|
66
|
+
: new Buffer(value)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
module.exports = bufferFrom
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "buffer-from",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": "LinusU/buffer-from",
|
|
6
|
+
"files": [
|
|
7
|
+
"index.js"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "standard && node test"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"standard": "^7.1.2"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"buffer",
|
|
17
|
+
"buffer from"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Buffer From
|
|
2
|
+
|
|
3
|
+
A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install --save buffer-from
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
const bufferFrom = require('buffer-from')
|
|
15
|
+
|
|
16
|
+
console.log(bufferFrom([1, 2, 3, 4]))
|
|
17
|
+
//=> <Buffer 01 02 03 04>
|
|
18
|
+
|
|
19
|
+
const arr = new Uint8Array([1, 2, 3, 4])
|
|
20
|
+
console.log(bufferFrom(arr.buffer, 1, 2))
|
|
21
|
+
//=> <Buffer 02 03>
|
|
22
|
+
|
|
23
|
+
console.log(bufferFrom('test', 'utf8'))
|
|
24
|
+
//=> <Buffer 74 65 73 74>
|
|
25
|
+
|
|
26
|
+
const buf = bufferFrom('test')
|
|
27
|
+
console.log(bufferFrom(buf))
|
|
28
|
+
//=> <Buffer 74 65 73 74>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
### bufferFrom(array)
|
|
34
|
+
|
|
35
|
+
- `array` <Array>
|
|
36
|
+
|
|
37
|
+
Allocates a new `Buffer` using an `array` of octets.
|
|
38
|
+
|
|
39
|
+
### bufferFrom(arrayBuffer[, byteOffset[, length]])
|
|
40
|
+
|
|
41
|
+
- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer
|
|
42
|
+
- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0`
|
|
43
|
+
- `length` <Integer> How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset`
|
|
44
|
+
|
|
45
|
+
When passed a reference to the `.buffer` property of a TypedArray instance, the
|
|
46
|
+
newly created `Buffer` will share the same allocated memory as the TypedArray.
|
|
47
|
+
|
|
48
|
+
The optional `byteOffset` and `length` arguments specify a memory range within
|
|
49
|
+
the `arrayBuffer` that will be shared by the `Buffer`.
|
|
50
|
+
|
|
51
|
+
### bufferFrom(buffer)
|
|
52
|
+
|
|
53
|
+
- `buffer` <Buffer> An existing `Buffer` to copy data from
|
|
54
|
+
|
|
55
|
+
Copies the passed `buffer` data onto a new `Buffer` instance.
|
|
56
|
+
|
|
57
|
+
### bufferFrom(string[, encoding])
|
|
58
|
+
|
|
59
|
+
- `string` <String> A string to encode.
|
|
60
|
+
- `encoding` <String> The encoding of `string`. **Default:** `'utf8'`
|
|
61
|
+
|
|
62
|
+
Creates a new `Buffer` containing the given JavaScript string `string`. If
|
|
63
|
+
provided, the `encoding` parameter identifies the character encoding of
|
|
64
|
+
`string`.
|
|
65
|
+
|
|
66
|
+
## See also
|
|
67
|
+
|
|
68
|
+
- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
|
|
69
|
+
- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright 2014–present Olivier Lalonde <olalonde@gmail.com>, James Talmage <james@talmage.io>, Ruben Verborgh
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
17
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
18
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|