ai 1.1.0 → 2.0.1
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/LICENSE +10 -24
- package/dist/ai-stream.d.ts +18 -0
- package/dist/ai-stream.js +132 -0
- package/dist/ai-stream.mjs +13 -0
- package/dist/anthropic-stream.d.ts +5 -0
- package/dist/anthropic-stream.js +133 -0
- package/dist/anthropic-stream.mjs +8 -0
- package/dist/chunk-265FSSO4.mjs +91 -0
- package/dist/chunk-2L3ZO4UM.mjs +45 -0
- package/dist/chunk-GT4HKF2X.mjs +33 -0
- package/dist/chunk-JGDC3BXD.mjs +22 -0
- package/dist/chunk-NK2CVBLI.mjs +38 -0
- package/dist/chunk-PEYAHBDF.mjs +43 -0
- package/dist/chunk-TJMME6CL.mjs +24 -0
- package/dist/huggingface-stream.d.ts +5 -0
- package/dist/huggingface-stream.js +121 -0
- package/dist/huggingface-stream.mjs +8 -0
- package/dist/index.d.ts +131 -0
- package/dist/index.js +278 -0
- package/dist/index.mjs +35 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.js +12 -0
- package/dist/index.test.mjs +10 -0
- package/dist/langchain-stream.d.ts +12 -0
- package/dist/langchain-stream.js +102 -0
- package/dist/langchain-stream.mjs +8 -0
- package/dist/openai-stream.d.ts +5 -0
- package/dist/openai-stream.js +144 -0
- package/dist/openai-stream.mjs +8 -0
- package/dist/streaming-text-response.d.ts +17 -0
- package/dist/streaming-text-response.js +75 -0
- package/dist/streaming-text-response.mjs +9 -0
- package/package.json +78 -29
- package/react/dist/chunk-5PP6W52J.mjs +202 -0
- package/react/dist/chunk-6EH3SWMP.mjs +55 -0
- package/react/dist/chunk-PW6HSU2N.mjs +154 -0
- package/react/dist/index.d.ts +3 -0
- package/react/dist/index.js +424 -0
- package/react/dist/index.mjs +12 -0
- package/react/dist/types-f862f74a.d.ts +123 -0
- package/react/dist/use-chat.d.ts +42 -0
- package/react/dist/use-chat.js +276 -0
- package/react/dist/use-chat.mjs +8 -0
- package/react/dist/use-completion.d.ts +47 -0
- package/react/dist/use-completion.js +229 -0
- package/react/dist/use-completion.mjs +8 -0
- package/svelte/dist/chunk-6USBQIV6.mjs +177 -0
- package/svelte/dist/chunk-BQ64GHZ3.mjs +136 -0
- package/svelte/dist/chunk-CENOSGDG.mjs +493 -0
- package/svelte/dist/index.d.ts +4 -0
- package/svelte/dist/index.js +808 -0
- package/svelte/dist/index.mjs +11 -0
- package/svelte/dist/types-f862f74a.d.ts +123 -0
- package/svelte/dist/use-chat.d.ts +39 -0
- package/svelte/dist/use-chat.js +680 -0
- package/svelte/dist/use-chat.mjs +7 -0
- package/svelte/dist/use-completion.d.ts +38 -0
- package/svelte/dist/use-completion.js +640 -0
- package/svelte/dist/use-completion.mjs +7 -0
- package/.npmignore +0 -15
- package/.travis.yml +0 -4
- package/README.md +0 -21
- package/bin/ai.js +0 -22
- package/index.js +0 -37
- package/node_modules/request/.npmignore +0 -2
- package/node_modules/request/.travis.yml +0 -12
- package/node_modules/request/CHANGELOG.md +0 -954
- package/node_modules/request/LICENSE +0 -55
- package/node_modules/request/README.md +0 -421
- package/node_modules/request/index.js +0 -166
- package/node_modules/request/lib/cookies.js +0 -40
- package/node_modules/request/lib/copy.js +0 -8
- package/node_modules/request/lib/debug.js +0 -7
- package/node_modules/request/lib/getSafe.js +0 -34
- package/node_modules/request/lib/optional.js +0 -5
- package/node_modules/request/node_modules/aws-sign2/LICENSE +0 -55
- package/node_modules/request/node_modules/aws-sign2/README.md +0 -4
- package/node_modules/request/node_modules/aws-sign2/index.js +0 -202
- package/node_modules/request/node_modules/aws-sign2/package.json +0 -47
- package/node_modules/request/node_modules/forever-agent/LICENSE +0 -55
- package/node_modules/request/node_modules/forever-agent/README.md +0 -4
- package/node_modules/request/node_modules/forever-agent/index.js +0 -119
- package/node_modules/request/node_modules/forever-agent/package.json +0 -46
- package/node_modules/request/node_modules/form-data/License +0 -19
- package/node_modules/request/node_modules/form-data/Readme.md +0 -175
- package/node_modules/request/node_modules/form-data/lib/form_data.js +0 -351
- package/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +0 -3
- package/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +0 -19
- package/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1646
- package/node_modules/request/node_modules/form-data/node_modules/async/component.json +0 -11
- package/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +0 -1123
- package/node_modules/request/node_modules/form-data/node_modules/async/package.json +0 -60
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +0 -19
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +0 -132
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +0 -186
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +0 -2
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +0 -19
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +0 -7
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +0 -154
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +0 -99
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +0 -42
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +0 -6
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +0 -38
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +0 -21
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +0 -14
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +0 -48
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +0 -15
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +0 -18
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +0 -13
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +0 -13
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +0 -7
- package/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +0 -61
- package/node_modules/request/node_modules/form-data/node_modules/mime/LICENSE +0 -19
- package/node_modules/request/node_modules/form-data/node_modules/mime/README.md +0 -66
- package/node_modules/request/node_modules/form-data/node_modules/mime/mime.js +0 -114
- package/node_modules/request/node_modules/form-data/node_modules/mime/package.json +0 -59
- package/node_modules/request/node_modules/form-data/node_modules/mime/test.js +0 -84
- package/node_modules/request/node_modules/form-data/node_modules/mime/types/mime.types +0 -1588
- package/node_modules/request/node_modules/form-data/node_modules/mime/types/node.types +0 -77
- package/node_modules/request/node_modules/form-data/package.json +0 -80
- package/node_modules/request/node_modules/hawk/.npmignore +0 -18
- package/node_modules/request/node_modules/hawk/.travis.yml +0 -5
- package/node_modules/request/node_modules/hawk/LICENSE +0 -24
- package/node_modules/request/node_modules/hawk/Makefile +0 -10
- package/node_modules/request/node_modules/hawk/README.md +0 -625
- package/node_modules/request/node_modules/hawk/example/usage.js +0 -78
- package/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- package/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- package/node_modules/request/node_modules/hawk/index.js +0 -1
- package/node_modules/request/node_modules/hawk/lib/browser.js +0 -507
- package/node_modules/request/node_modules/hawk/lib/client.js +0 -371
- package/node_modules/request/node_modules/hawk/lib/crypto.js +0 -118
- package/node_modules/request/node_modules/hawk/lib/index.js +0 -15
- package/node_modules/request/node_modules/hawk/lib/server.js +0 -523
- package/node_modules/request/node_modules/hawk/lib/utils.js +0 -183
- package/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +0 -18
- package/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +0 -5
- package/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +0 -24
- package/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +0 -11
- package/node_modules/request/node_modules/hawk/node_modules/boom/README.md +0 -6
- package/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- package/node_modules/request/node_modules/hawk/node_modules/boom/index.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +0 -207
- package/node_modules/request/node_modules/hawk/node_modules/boom/package.json +0 -64
- package/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +0 -245
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +0 -18
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +0 -5
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +0 -24
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -11
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +0 -6
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +0 -68
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +0 -65
- package/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +0 -101
- package/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +0 -18
- package/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +0 -5
- package/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -33
- package/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -10
- package/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +0 -436
- package/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- package/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -132
- package/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +0 -585
- package/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +0 -70
- package/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +0 -86
- package/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +0 -1078
- package/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +0 -18
- package/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +0 -5
- package/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +0 -24
- package/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +0 -11
- package/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +0 -68
- package/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +0 -16
- package/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +0 -25
- package/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +0 -1
- package/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +0 -409
- package/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +0 -65
- package/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +0 -359
- package/node_modules/request/node_modules/hawk/package.json +0 -70
- package/node_modules/request/node_modules/hawk/test/browser.js +0 -817
- package/node_modules/request/node_modules/hawk/test/client.js +0 -206
- package/node_modules/request/node_modules/hawk/test/crypto.js +0 -86
- package/node_modules/request/node_modules/hawk/test/index.js +0 -316
- package/node_modules/request/node_modules/hawk/test/message.js +0 -246
- package/node_modules/request/node_modules/hawk/test/readme.js +0 -98
- package/node_modules/request/node_modules/hawk/test/server.js +0 -686
- package/node_modules/request/node_modules/hawk/test/uri.js +0 -456
- package/node_modules/request/node_modules/hawk/test/utils.js +0 -120
- package/node_modules/request/node_modules/http-signature/.dir-locals.el +0 -6
- package/node_modules/request/node_modules/http-signature/.npmignore +0 -7
- package/node_modules/request/node_modules/http-signature/LICENSE +0 -18
- package/node_modules/request/node_modules/http-signature/README.md +0 -75
- package/node_modules/request/node_modules/http-signature/http_signing.md +0 -296
- package/node_modules/request/node_modules/http-signature/lib/index.js +0 -25
- package/node_modules/request/node_modules/http-signature/lib/parser.js +0 -304
- package/node_modules/request/node_modules/http-signature/lib/signer.js +0 -179
- package/node_modules/request/node_modules/http-signature/lib/util.js +0 -249
- package/node_modules/request/node_modules/http-signature/lib/verify.js +0 -42
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +0 -2
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +0 -19
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +0 -50
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +0 -13
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +0 -27
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +0 -267
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +0 -36
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +0 -317
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +0 -20
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +0 -63
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +0 -172
- package/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +0 -296
- package/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +0 -126
- package/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +0 -196
- package/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +0 -38
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +0 -71
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +0 -24
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/README +0 -82
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +0 -298
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +0 -245
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +0 -1485
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +0 -944
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +0 -36
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +0 -129
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +0 -839
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +0 -13
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +0 -13
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +0 -104
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +0 -19
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +0 -39
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +0 -14
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +0 -14
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +0 -17
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +0 -18
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +0 -15
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +0 -14
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +0 -767
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +0 -753
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +0 -638
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +0 -101
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +0 -53
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +0 -92
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +0 -451
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +0 -81
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +0 -95
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +0 -156
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +0 -50
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +0 -44
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +0 -42
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +0 -45
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +0 -28
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +0 -128
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +0 -28
- package/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +0 -31
- package/node_modules/request/node_modules/http-signature/package.json +0 -54
- package/node_modules/request/node_modules/json-stringify-safe/LICENSE +0 -27
- package/node_modules/request/node_modules/json-stringify-safe/README.md +0 -49
- package/node_modules/request/node_modules/json-stringify-safe/package.json +0 -51
- package/node_modules/request/node_modules/json-stringify-safe/stringify.js +0 -39
- package/node_modules/request/node_modules/json-stringify-safe/test.js +0 -128
- package/node_modules/request/node_modules/mime-types/.npmignore +0 -14
- package/node_modules/request/node_modules/mime-types/.travis.yml +0 -12
- package/node_modules/request/node_modules/mime-types/LICENSE +0 -22
- package/node_modules/request/node_modules/mime-types/Makefile +0 -9
- package/node_modules/request/node_modules/mime-types/README.md +0 -101
- package/node_modules/request/node_modules/mime-types/SOURCES.md +0 -17
- package/node_modules/request/node_modules/mime-types/component.json +0 -16
- package/node_modules/request/node_modules/mime-types/lib/custom.json +0 -27
- package/node_modules/request/node_modules/mime-types/lib/index.js +0 -75
- package/node_modules/request/node_modules/mime-types/lib/mime.json +0 -3317
- package/node_modules/request/node_modules/mime-types/lib/node.json +0 -55
- package/node_modules/request/node_modules/mime-types/package.json +0 -69
- package/node_modules/request/node_modules/node-uuid/.npmignore +0 -2
- package/node_modules/request/node_modules/node-uuid/LICENSE.md +0 -2
- package/node_modules/request/node_modules/node-uuid/README.md +0 -207
- package/node_modules/request/node_modules/node-uuid/benchmark/README.md +0 -53
- package/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +0 -174
- package/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +0 -34
- package/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +0 -34
- package/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +0 -84
- package/node_modules/request/node_modules/node-uuid/component.json +0 -18
- package/node_modules/request/node_modules/node-uuid/package.json +0 -54
- package/node_modules/request/node_modules/node-uuid/test/compare_v1.js +0 -63
- package/node_modules/request/node_modules/node-uuid/test/test.html +0 -17
- package/node_modules/request/node_modules/node-uuid/test/test.js +0 -228
- package/node_modules/request/node_modules/node-uuid/uuid.js +0 -245
- package/node_modules/request/node_modules/oauth-sign/LICENSE +0 -55
- package/node_modules/request/node_modules/oauth-sign/README.md +0 -4
- package/node_modules/request/node_modules/oauth-sign/index.js +0 -43
- package/node_modules/request/node_modules/oauth-sign/package.json +0 -49
- package/node_modules/request/node_modules/oauth-sign/test.js +0 -49
- package/node_modules/request/node_modules/qs/.jshintignore +0 -1
- package/node_modules/request/node_modules/qs/.jshintrc +0 -10
- package/node_modules/request/node_modules/qs/.npmignore +0 -18
- package/node_modules/request/node_modules/qs/.travis.yml +0 -4
- package/node_modules/request/node_modules/qs/LICENSE +0 -28
- package/node_modules/request/node_modules/qs/Makefile +0 -8
- package/node_modules/request/node_modules/qs/Readme.md +0 -120
- package/node_modules/request/node_modules/qs/index.js +0 -1
- package/node_modules/request/node_modules/qs/lib/index.js +0 -15
- package/node_modules/request/node_modules/qs/lib/parse.js +0 -151
- package/node_modules/request/node_modules/qs/lib/stringify.js +0 -52
- package/node_modules/request/node_modules/qs/lib/utils.js +0 -131
- package/node_modules/request/node_modules/qs/package.json +0 -61
- package/node_modules/request/node_modules/qs/test/parse.js +0 -236
- package/node_modules/request/node_modules/qs/test/stringify.js +0 -123
- package/node_modules/request/node_modules/stringstream/.npmignore +0 -15
- package/node_modules/request/node_modules/stringstream/.travis.yml +0 -4
- package/node_modules/request/node_modules/stringstream/LICENSE.txt +0 -4
- package/node_modules/request/node_modules/stringstream/README.md +0 -38
- package/node_modules/request/node_modules/stringstream/example.js +0 -27
- package/node_modules/request/node_modules/stringstream/package.json +0 -48
- package/node_modules/request/node_modules/stringstream/stringstream.js +0 -102
- package/node_modules/request/node_modules/tough-cookie/.jshintrc +0 -70
- package/node_modules/request/node_modules/tough-cookie/.npmignore +0 -3
- package/node_modules/request/node_modules/tough-cookie/.travis.yml +0 -8
- package/node_modules/request/node_modules/tough-cookie/LICENSE +0 -78
- package/node_modules/request/node_modules/tough-cookie/README.md +0 -412
- package/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +0 -239
- package/node_modules/request/node_modules/tough-cookie/lib/cookie.js +0 -1107
- package/node_modules/request/node_modules/tough-cookie/lib/memstore.js +0 -123
- package/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +0 -69
- package/node_modules/request/node_modules/tough-cookie/lib/store.js +0 -37
- package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +0 -20
- package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +0 -176
- package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +0 -87
- package/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +0 -528
- package/node_modules/request/node_modules/tough-cookie/package.json +0 -67
- package/node_modules/request/node_modules/tough-cookie/public-suffix.txt +0 -5229
- package/node_modules/request/node_modules/tough-cookie/test.js +0 -1625
- package/node_modules/request/node_modules/tunnel-agent/.jshintrc +0 -5
- package/node_modules/request/node_modules/tunnel-agent/LICENSE +0 -55
- package/node_modules/request/node_modules/tunnel-agent/README.md +0 -4
- package/node_modules/request/node_modules/tunnel-agent/index.js +0 -236
- package/node_modules/request/node_modules/tunnel-agent/package.json +0 -46
- package/node_modules/request/package.json +0 -77
- package/node_modules/request/request.js +0 -1428
- package/test/fixtures/github-response.json +0 -1367
- package/test/index.js +0 -55
@@ -1,55 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"text/vtt": [
|
3
|
-
"vtt"
|
4
|
-
],
|
5
|
-
"application/x-chrome-extension": [
|
6
|
-
"crx"
|
7
|
-
],
|
8
|
-
"text/x-component": [
|
9
|
-
"htc"
|
10
|
-
],
|
11
|
-
"text/cache-manifest": [
|
12
|
-
"manifest"
|
13
|
-
],
|
14
|
-
"application/octet-stream": [
|
15
|
-
"buffer"
|
16
|
-
],
|
17
|
-
"application/mp4": [
|
18
|
-
"m4p"
|
19
|
-
],
|
20
|
-
"audio/mp4": [
|
21
|
-
"m4a"
|
22
|
-
],
|
23
|
-
"video/MP2T": [
|
24
|
-
"ts"
|
25
|
-
],
|
26
|
-
"application/x-web-app-manifest+json": [
|
27
|
-
"webapp"
|
28
|
-
],
|
29
|
-
"text/x-lua": [
|
30
|
-
"lua"
|
31
|
-
],
|
32
|
-
"application/x-lua-bytecode": [
|
33
|
-
"luac"
|
34
|
-
],
|
35
|
-
"text/x-markdown": [
|
36
|
-
"markdown",
|
37
|
-
"md",
|
38
|
-
"mkd"
|
39
|
-
],
|
40
|
-
"text/plain": [
|
41
|
-
"ini"
|
42
|
-
],
|
43
|
-
"application/dash+xml": [
|
44
|
-
"mdp"
|
45
|
-
],
|
46
|
-
"font/opentype": [
|
47
|
-
"otf"
|
48
|
-
],
|
49
|
-
"application/json": [
|
50
|
-
"map"
|
51
|
-
],
|
52
|
-
"application/xml": [
|
53
|
-
"xsd"
|
54
|
-
]
|
55
|
-
}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "mime-types",
|
3
|
-
"description": "The ultimate javascript content-type utility.",
|
4
|
-
"version": "1.0.2",
|
5
|
-
"author": {
|
6
|
-
"name": "Jonathan Ong",
|
7
|
-
"email": "me@jongleberry.com",
|
8
|
-
"url": "http://jongleberry.com"
|
9
|
-
},
|
10
|
-
"contributors": [
|
11
|
-
{
|
12
|
-
"name": "Jeremiah Senkpiel",
|
13
|
-
"email": "fishrock123@rocketmail.com",
|
14
|
-
"url": "https://searchbeam.jit.su"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"repository": {
|
18
|
-
"type": "git",
|
19
|
-
"url": "https://github.com/expressjs/mime-types"
|
20
|
-
},
|
21
|
-
"license": "MIT",
|
22
|
-
"main": "lib",
|
23
|
-
"devDependencies": {
|
24
|
-
"co": "3",
|
25
|
-
"cogent": "0",
|
26
|
-
"mocha": "1",
|
27
|
-
"should": "3"
|
28
|
-
},
|
29
|
-
"engines": {
|
30
|
-
"node": ">= 0.8.0"
|
31
|
-
},
|
32
|
-
"scripts": {
|
33
|
-
"test": "make test"
|
34
|
-
},
|
35
|
-
"gitHead": "e82b23836eb42003b8346fb31769da2fb7eb54e8",
|
36
|
-
"bugs": {
|
37
|
-
"url": "https://github.com/expressjs/mime-types/issues"
|
38
|
-
},
|
39
|
-
"homepage": "https://github.com/expressjs/mime-types",
|
40
|
-
"_id": "mime-types@1.0.2",
|
41
|
-
"_shasum": "995ae1392ab8affcbfcb2641dd054e943c0d5dce",
|
42
|
-
"_from": "mime-types@~1.0.1",
|
43
|
-
"_npmVersion": "1.4.21",
|
44
|
-
"_npmUser": {
|
45
|
-
"name": "dougwilson",
|
46
|
-
"email": "doug@somethingdoug.com"
|
47
|
-
},
|
48
|
-
"maintainers": [
|
49
|
-
{
|
50
|
-
"name": "jongleberry",
|
51
|
-
"email": "jonathanrichardong@gmail.com"
|
52
|
-
},
|
53
|
-
{
|
54
|
-
"name": "fishrock123",
|
55
|
-
"email": "fishrock123@rocketmail.com"
|
56
|
-
},
|
57
|
-
{
|
58
|
-
"name": "dougwilson",
|
59
|
-
"email": "doug@somethingdoug.com"
|
60
|
-
}
|
61
|
-
],
|
62
|
-
"dist": {
|
63
|
-
"shasum": "995ae1392ab8affcbfcb2641dd054e943c0d5dce",
|
64
|
-
"tarball": "http://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz"
|
65
|
-
},
|
66
|
-
"directories": {},
|
67
|
-
"_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz",
|
68
|
-
"readme": "ERROR: No README data found!"
|
69
|
-
}
|
@@ -1,207 +0,0 @@
|
|
1
|
-
# node-uuid
|
2
|
-
|
3
|
-
Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
|
4
|
-
|
5
|
-
Features:
|
6
|
-
|
7
|
-
* Generate RFC4122 version 1 or version 4 UUIDs
|
8
|
-
* Runs in node.js and all browsers.
|
9
|
-
* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').
|
10
|
-
* Cryptographically strong random # generation on supporting platforms
|
11
|
-
* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )
|
12
|
-
* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
|
13
|
-
|
14
|
-
## Getting Started
|
15
|
-
|
16
|
-
Install it in your browser:
|
17
|
-
|
18
|
-
```html
|
19
|
-
<script src="uuid.js"></script>
|
20
|
-
```
|
21
|
-
|
22
|
-
Or in node.js:
|
23
|
-
|
24
|
-
```
|
25
|
-
npm install node-uuid
|
26
|
-
```
|
27
|
-
|
28
|
-
```javascript
|
29
|
-
var uuid = require('node-uuid');
|
30
|
-
```
|
31
|
-
|
32
|
-
Then create some ids ...
|
33
|
-
|
34
|
-
```javascript
|
35
|
-
// Generate a v1 (time-based) id
|
36
|
-
uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
|
37
|
-
|
38
|
-
// Generate a v4 (random) id
|
39
|
-
uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
|
40
|
-
```
|
41
|
-
|
42
|
-
## API
|
43
|
-
|
44
|
-
### uuid.v1([`options` [, `buffer` [, `offset`]]])
|
45
|
-
|
46
|
-
Generate and return a RFC4122 v1 (timestamp-based) UUID.
|
47
|
-
|
48
|
-
* `options` - (Object) Optional uuid state to apply. Properties may include:
|
49
|
-
|
50
|
-
* `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
|
51
|
-
* `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
|
52
|
-
* `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
|
53
|
-
* `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
|
54
|
-
|
55
|
-
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
|
56
|
-
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
|
57
|
-
|
58
|
-
Returns `buffer`, if specified, otherwise the string form of the UUID
|
59
|
-
|
60
|
-
Notes:
|
61
|
-
|
62
|
-
1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
|
63
|
-
|
64
|
-
Example: Generate string UUID with fully-specified options
|
65
|
-
|
66
|
-
```javascript
|
67
|
-
uuid.v1({
|
68
|
-
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
|
69
|
-
clockseq: 0x1234,
|
70
|
-
msecs: new Date('2011-11-01').getTime(),
|
71
|
-
nsecs: 5678
|
72
|
-
}); // -> "710b962e-041c-11e1-9234-0123456789ab"
|
73
|
-
```
|
74
|
-
|
75
|
-
Example: In-place generation of two binary IDs
|
76
|
-
|
77
|
-
```javascript
|
78
|
-
// Generate two ids in an array
|
79
|
-
var arr = new Array(32); // -> []
|
80
|
-
uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
|
81
|
-
uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
|
82
|
-
|
83
|
-
// Optionally use uuid.unparse() to get stringify the ids
|
84
|
-
uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
|
85
|
-
uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
|
86
|
-
```
|
87
|
-
|
88
|
-
### uuid.v4([`options` [, `buffer` [, `offset`]]])
|
89
|
-
|
90
|
-
Generate and return a RFC4122 v4 UUID.
|
91
|
-
|
92
|
-
* `options` - (Object) Optional uuid state to apply. Properties may include:
|
93
|
-
|
94
|
-
* `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
|
95
|
-
* `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
|
96
|
-
|
97
|
-
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
|
98
|
-
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
|
99
|
-
|
100
|
-
Returns `buffer`, if specified, otherwise the string form of the UUID
|
101
|
-
|
102
|
-
Example: Generate string UUID with fully-specified options
|
103
|
-
|
104
|
-
```javascript
|
105
|
-
uuid.v4({
|
106
|
-
random: [
|
107
|
-
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
|
108
|
-
0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
|
109
|
-
]
|
110
|
-
});
|
111
|
-
// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
|
112
|
-
```
|
113
|
-
|
114
|
-
Example: Generate two IDs in a single buffer
|
115
|
-
|
116
|
-
```javascript
|
117
|
-
var buffer = new Array(32); // (or 'new Buffer' in node.js)
|
118
|
-
uuid.v4(null, buffer, 0);
|
119
|
-
uuid.v4(null, buffer, 16);
|
120
|
-
```
|
121
|
-
|
122
|
-
### uuid.parse(id[, buffer[, offset]])
|
123
|
-
### uuid.unparse(buffer[, offset])
|
124
|
-
|
125
|
-
Parse and unparse UUIDs
|
126
|
-
|
127
|
-
* `id` - (String) UUID(-like) string
|
128
|
-
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used
|
129
|
-
* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0
|
130
|
-
|
131
|
-
Example parsing and unparsing a UUID string
|
132
|
-
|
133
|
-
```javascript
|
134
|
-
var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>
|
135
|
-
var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'
|
136
|
-
```
|
137
|
-
|
138
|
-
### uuid.noConflict()
|
139
|
-
|
140
|
-
(Browsers only) Set `uuid` property back to it's previous value.
|
141
|
-
|
142
|
-
Returns the node-uuid object.
|
143
|
-
|
144
|
-
Example:
|
145
|
-
|
146
|
-
```javascript
|
147
|
-
var myUuid = uuid.noConflict();
|
148
|
-
myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
|
149
|
-
```
|
150
|
-
|
151
|
-
## Deprecated APIs
|
152
|
-
|
153
|
-
Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.
|
154
|
-
|
155
|
-
### uuid([format [, buffer [, offset]]])
|
156
|
-
|
157
|
-
uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).
|
158
|
-
|
159
|
-
### uuid.BufferClass
|
160
|
-
|
161
|
-
The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.
|
162
|
-
|
163
|
-
## Testing
|
164
|
-
|
165
|
-
In node.js
|
166
|
-
|
167
|
-
```
|
168
|
-
> cd test
|
169
|
-
> node test.js
|
170
|
-
```
|
171
|
-
|
172
|
-
In Browser
|
173
|
-
|
174
|
-
```
|
175
|
-
open test/test.html
|
176
|
-
```
|
177
|
-
|
178
|
-
### Benchmarking
|
179
|
-
|
180
|
-
Requires node.js
|
181
|
-
|
182
|
-
```
|
183
|
-
npm install uuid uuid-js
|
184
|
-
node benchmark/benchmark.js
|
185
|
-
```
|
186
|
-
|
187
|
-
For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)
|
188
|
-
|
189
|
-
For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
|
190
|
-
|
191
|
-
## Release notes
|
192
|
-
|
193
|
-
### 1.4.0
|
194
|
-
|
195
|
-
* Improved module context detection
|
196
|
-
* Removed public RNG functions
|
197
|
-
|
198
|
-
### 1.3.2
|
199
|
-
|
200
|
-
* Improve tests and handling of v1() options (Issue #24)
|
201
|
-
* Expose RNG option to allow for perf testing with different generators
|
202
|
-
|
203
|
-
### 1.3.0
|
204
|
-
|
205
|
-
* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
|
206
|
-
* Support for node.js crypto API
|
207
|
-
* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# node-uuid Benchmarks
|
2
|
-
|
3
|
-
### Results
|
4
|
-
|
5
|
-
To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark
|
6
|
-
|
7
|
-
### Run them yourself
|
8
|
-
|
9
|
-
node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`.
|
10
|
-
|
11
|
-
To prepare and run the benchmark issue;
|
12
|
-
|
13
|
-
```
|
14
|
-
npm install uuid uuid-js
|
15
|
-
node benchmark/benchmark.js
|
16
|
-
```
|
17
|
-
|
18
|
-
You'll see an output like this one:
|
19
|
-
|
20
|
-
```
|
21
|
-
# v4
|
22
|
-
nodeuuid.v4(): 854700 uuids/second
|
23
|
-
nodeuuid.v4('binary'): 788643 uuids/second
|
24
|
-
nodeuuid.v4('binary', buffer): 1336898 uuids/second
|
25
|
-
uuid(): 479386 uuids/second
|
26
|
-
uuid('binary'): 582072 uuids/second
|
27
|
-
uuidjs.create(4): 312304 uuids/second
|
28
|
-
|
29
|
-
# v1
|
30
|
-
nodeuuid.v1(): 938086 uuids/second
|
31
|
-
nodeuuid.v1('binary'): 683060 uuids/second
|
32
|
-
nodeuuid.v1('binary', buffer): 1644736 uuids/second
|
33
|
-
uuidjs.create(1): 190621 uuids/second
|
34
|
-
```
|
35
|
-
|
36
|
-
* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library.
|
37
|
-
* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK.
|
38
|
-
|
39
|
-
If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file:
|
40
|
-
|
41
|
-
```
|
42
|
-
for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done;
|
43
|
-
```
|
44
|
-
|
45
|
-
If you're interested in how performance varies between different node versions, you can issue the above command multiple times.
|
46
|
-
|
47
|
-
You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot:
|
48
|
-
|
49
|
-
```
|
50
|
-
(cd benchmark/ && ./bench.sh)
|
51
|
-
```
|
52
|
-
|
53
|
-
This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then.
|
@@ -1,174 +0,0 @@
|
|
1
|
-
#!/opt/local/bin/gnuplot -persist
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# G N U P L O T
|
5
|
-
# Version 4.4 patchlevel 3
|
6
|
-
# last modified March 2011
|
7
|
-
# System: Darwin 10.8.0
|
8
|
-
#
|
9
|
-
# Copyright (C) 1986-1993, 1998, 2004, 2007-2010
|
10
|
-
# Thomas Williams, Colin Kelley and many others
|
11
|
-
#
|
12
|
-
# gnuplot home: http://www.gnuplot.info
|
13
|
-
# faq, bugs, etc: type "help seeking-assistance"
|
14
|
-
# immediate help: type "help"
|
15
|
-
# plot window: hit 'h'
|
16
|
-
set terminal postscript eps noenhanced defaultplex \
|
17
|
-
leveldefault color colortext \
|
18
|
-
solid linewidth 1.2 butt noclip \
|
19
|
-
palfuncparam 2000,0.003 \
|
20
|
-
"Helvetica" 14
|
21
|
-
set output 'bench.eps'
|
22
|
-
unset clip points
|
23
|
-
set clip one
|
24
|
-
unset clip two
|
25
|
-
set bar 1.000000 front
|
26
|
-
set border 31 front linetype -1 linewidth 1.000
|
27
|
-
set xdata
|
28
|
-
set ydata
|
29
|
-
set zdata
|
30
|
-
set x2data
|
31
|
-
set y2data
|
32
|
-
set timefmt x "%d/%m/%y,%H:%M"
|
33
|
-
set timefmt y "%d/%m/%y,%H:%M"
|
34
|
-
set timefmt z "%d/%m/%y,%H:%M"
|
35
|
-
set timefmt x2 "%d/%m/%y,%H:%M"
|
36
|
-
set timefmt y2 "%d/%m/%y,%H:%M"
|
37
|
-
set timefmt cb "%d/%m/%y,%H:%M"
|
38
|
-
set boxwidth
|
39
|
-
set style fill empty border
|
40
|
-
set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1
|
41
|
-
set style circle radius graph 0.02, first 0, 0
|
42
|
-
set dummy x,y
|
43
|
-
set format x "% g"
|
44
|
-
set format y "% g"
|
45
|
-
set format x2 "% g"
|
46
|
-
set format y2 "% g"
|
47
|
-
set format z "% g"
|
48
|
-
set format cb "% g"
|
49
|
-
set angles radians
|
50
|
-
unset grid
|
51
|
-
set key title ""
|
52
|
-
set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox
|
53
|
-
set key noinvert samplen 4 spacing 1 width 0 height 0
|
54
|
-
set key maxcolumns 2 maxrows 0
|
55
|
-
unset label
|
56
|
-
unset arrow
|
57
|
-
set style increment default
|
58
|
-
unset style line
|
59
|
-
set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0
|
60
|
-
unset style arrow
|
61
|
-
set style histogram clustered gap 2 title offset character 0, 0, 0
|
62
|
-
unset logscale
|
63
|
-
set offsets graph 0.05, 0.15, 0, 0
|
64
|
-
set pointsize 1.5
|
65
|
-
set pointintervalbox 1
|
66
|
-
set encoding default
|
67
|
-
unset polar
|
68
|
-
unset parametric
|
69
|
-
unset decimalsign
|
70
|
-
set view 60, 30, 1, 1
|
71
|
-
set samples 100, 100
|
72
|
-
set isosamples 10, 10
|
73
|
-
set surface
|
74
|
-
unset contour
|
75
|
-
set clabel '%8.3g'
|
76
|
-
set mapping cartesian
|
77
|
-
set datafile separator whitespace
|
78
|
-
unset hidden3d
|
79
|
-
set cntrparam order 4
|
80
|
-
set cntrparam linear
|
81
|
-
set cntrparam levels auto 5
|
82
|
-
set cntrparam points 5
|
83
|
-
set size ratio 0 1,1
|
84
|
-
set origin 0,0
|
85
|
-
set style data points
|
86
|
-
set style function lines
|
87
|
-
set xzeroaxis linetype -2 linewidth 1.000
|
88
|
-
set yzeroaxis linetype -2 linewidth 1.000
|
89
|
-
set zzeroaxis linetype -2 linewidth 1.000
|
90
|
-
set x2zeroaxis linetype -2 linewidth 1.000
|
91
|
-
set y2zeroaxis linetype -2 linewidth 1.000
|
92
|
-
set ticslevel 0.5
|
93
|
-
set mxtics default
|
94
|
-
set mytics default
|
95
|
-
set mztics default
|
96
|
-
set mx2tics default
|
97
|
-
set my2tics default
|
98
|
-
set mcbtics default
|
99
|
-
set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
|
100
|
-
set xtics norangelimit
|
101
|
-
set xtics ()
|
102
|
-
set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
|
103
|
-
set ytics autofreq norangelimit
|
104
|
-
set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0
|
105
|
-
set ztics autofreq norangelimit
|
106
|
-
set nox2tics
|
107
|
-
set noy2tics
|
108
|
-
set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
|
109
|
-
set cbtics autofreq norangelimit
|
110
|
-
set title ""
|
111
|
-
set title offset character 0, 0, 0 font "" norotate
|
112
|
-
set timestamp bottom
|
113
|
-
set timestamp ""
|
114
|
-
set timestamp offset character 0, 0, 0 font "" norotate
|
115
|
-
set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
|
116
|
-
set autoscale rfixmin
|
117
|
-
set autoscale rfixmax
|
118
|
-
set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
|
119
|
-
set autoscale tfixmin
|
120
|
-
set autoscale tfixmax
|
121
|
-
set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
|
122
|
-
set autoscale ufixmin
|
123
|
-
set autoscale ufixmax
|
124
|
-
set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
|
125
|
-
set autoscale vfixmin
|
126
|
-
set autoscale vfixmax
|
127
|
-
set xlabel ""
|
128
|
-
set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
|
129
|
-
set x2label ""
|
130
|
-
set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate
|
131
|
-
set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] )
|
132
|
-
set autoscale xfixmin
|
133
|
-
set autoscale xfixmax
|
134
|
-
set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] )
|
135
|
-
set autoscale x2fixmin
|
136
|
-
set autoscale x2fixmax
|
137
|
-
set ylabel ""
|
138
|
-
set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
|
139
|
-
set y2label ""
|
140
|
-
set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
|
141
|
-
set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] )
|
142
|
-
set autoscale yfixmin
|
143
|
-
set autoscale yfixmax
|
144
|
-
set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] )
|
145
|
-
set autoscale y2fixmin
|
146
|
-
set autoscale y2fixmax
|
147
|
-
set zlabel ""
|
148
|
-
set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
|
149
|
-
set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
|
150
|
-
set autoscale zfixmin
|
151
|
-
set autoscale zfixmax
|
152
|
-
set cblabel ""
|
153
|
-
set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
|
154
|
-
set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
|
155
|
-
set autoscale cbfixmin
|
156
|
-
set autoscale cbfixmax
|
157
|
-
set zero 1e-08
|
158
|
-
set lmargin -1
|
159
|
-
set bmargin -1
|
160
|
-
set rmargin -1
|
161
|
-
set tmargin -1
|
162
|
-
set pm3d explicit at s
|
163
|
-
set pm3d scansautomatic
|
164
|
-
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
|
165
|
-
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
|
166
|
-
set palette rgbformulae 7, 5, 15
|
167
|
-
set colorbox default
|
168
|
-
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
|
169
|
-
set loadpath
|
170
|
-
set fontpath
|
171
|
-
set fit noerrorvariables
|
172
|
-
GNUTERM = "aqua"
|
173
|
-
plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2
|
174
|
-
# EOF
|
@@ -1,34 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
# for a given node version run:
|
4
|
-
# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done;
|
5
|
-
|
6
|
-
PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte')
|
7
|
-
FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es)
|
8
|
-
INDICES=(2 3 2 3 2 2 2 2 2)
|
9
|
-
VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " )
|
10
|
-
TMPJOIN="tmp_join"
|
11
|
-
OUTPUT="bench_results.txt"
|
12
|
-
|
13
|
-
for I in ${!FILES[*]}; do
|
14
|
-
F=${FILES[$I]}
|
15
|
-
P=${PATTERNS[$I]}
|
16
|
-
INDEX=${INDICES[$I]}
|
17
|
-
echo "version $F" > $F
|
18
|
-
for V in $VERSIONS; do
|
19
|
-
(VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F
|
20
|
-
done
|
21
|
-
if [ $I == 0 ]; then
|
22
|
-
cat $F > $TMPJOIN
|
23
|
-
else
|
24
|
-
join $TMPJOIN $F > $OUTPUT
|
25
|
-
cp $OUTPUT $TMPJOIN
|
26
|
-
fi
|
27
|
-
rm $F
|
28
|
-
done
|
29
|
-
|
30
|
-
rm $TMPJOIN
|
31
|
-
|
32
|
-
gnuplot bench.gnu
|
33
|
-
convert -density 200 -resize 800x560 -flatten bench.eps bench.png
|
34
|
-
rm bench.eps
|
@@ -1,34 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Test performance of native C UUID generation
|
3
|
-
|
4
|
-
To Compile: cc -luuid benchmark-native.c -o benchmark-native
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <stdio.h>
|
8
|
-
#include <unistd.h>
|
9
|
-
#include <sys/time.h>
|
10
|
-
#include <uuid/uuid.h>
|
11
|
-
|
12
|
-
int main() {
|
13
|
-
uuid_t myid;
|
14
|
-
char buf[36+1];
|
15
|
-
int i;
|
16
|
-
struct timeval t;
|
17
|
-
double start, finish;
|
18
|
-
|
19
|
-
gettimeofday(&t, NULL);
|
20
|
-
start = t.tv_sec + t.tv_usec/1e6;
|
21
|
-
|
22
|
-
int n = 2e5;
|
23
|
-
for (i = 0; i < n; i++) {
|
24
|
-
uuid_generate(myid);
|
25
|
-
uuid_unparse(myid, buf);
|
26
|
-
}
|
27
|
-
|
28
|
-
gettimeofday(&t, NULL);
|
29
|
-
finish = t.tv_sec + t.tv_usec/1e6;
|
30
|
-
double dur = finish - start;
|
31
|
-
|
32
|
-
printf("%d uuids/sec", (int)(n/dur));
|
33
|
-
return 0;
|
34
|
-
}
|